Skip to content

Commit 553d7a4

Browse files
rogercollatoulme
andauthored
[chore] reference hostcapabilities.ComponentFactory interface (#39453)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Use core collector API for interface validation open-telemetry/opentelemetry-collector#12789 <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes <!--Describe what testing was performed and which tests were added.--> #### Testing <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.--> Co-authored-by: Antoine Toulme <[email protected]>
1 parent 32c72a7 commit 553d7a4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

receiver/receivercreator/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ require (
2525
go.opentelemetry.io/collector/receiver v1.30.0
2626
go.opentelemetry.io/collector/receiver/receivertest v0.124.0
2727
go.opentelemetry.io/collector/semconv v0.124.0
28+
go.opentelemetry.io/collector/service/hostcapabilities v0.124.0
2829
go.uber.org/goleak v1.3.0
2930
go.uber.org/multierr v1.11.0
3031
go.uber.org/zap v1.27.0
@@ -96,7 +97,6 @@ require (
9697
go.opentelemetry.io/collector/processor/xprocessor v0.124.0 // indirect
9798
go.opentelemetry.io/collector/receiver/xreceiver v0.124.0 // indirect
9899
go.opentelemetry.io/collector/service v0.124.0 // indirect
99-
go.opentelemetry.io/collector/service/hostcapabilities v0.124.0 // indirect
100100
go.opentelemetry.io/contrib/bridges/otelzap v0.10.0 // indirect
101101
go.opentelemetry.io/contrib/otelconf v0.15.0 // indirect
102102
go.opentelemetry.io/contrib/propagators/b3 v1.35.0 // indirect

receiver/receivercreator/receiver.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"go.opentelemetry.io/collector/component"
1212
"go.opentelemetry.io/collector/consumer"
1313
"go.opentelemetry.io/collector/receiver"
14+
"go.opentelemetry.io/collector/service/hostcapabilities"
1415

1516
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer"
1617
)
@@ -38,7 +39,7 @@ func newReceiverCreator(params receiver.Settings, cfg *Config) receiver.Metrics
3839
// host is an interface that the component.Host passed to receivercreator's Start function must implement
3940
type host interface {
4041
component.Host
41-
GetFactory(component.Kind, component.Type) component.Factory
42+
hostcapabilities.ComponentFactory
4243
}
4344

4445
// Start receiver_creator.

0 commit comments

Comments
 (0)