Skip to content

Commit 830397b

Browse files
authored
receiver.CreateSettings -> Settings in "Building a receiver" (#5711)
1 parent c104118 commit 830397b

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

content/en/docs/collector/building/receiver.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,8 @@ and it requires the following parameters:
500500
`receiver.Traces` instance and it requires the following parameters:
501501
- `context.Context`: the reference to the Collector's `context.Context` so your
502502
trace receiver can properly manage its execution context.
503-
- `receiver.CreateSettings`: the reference to some of the Collector's settings
504-
under which your receiver is created.
503+
- `receiver.Settings`: the reference to some of the Collector's settings under
504+
which your receiver is created.
505505
- `component.Config`: the reference for the receiver config settings passed by
506506
the Collector to the factory so it can properly read its settings from the
507507
Collector config.
@@ -514,7 +514,7 @@ Start by adding the bootstrap code to properly implement the
514514
code to your `factory.go` file:
515515

516516
```go
517-
func createTracesReceiver(_ context.Context, params receiver.CreateSettings, baseCfg component.Config, consumer consumer.Traces) (receiver.Traces, error) {
517+
func createTracesReceiver(_ context.Context, params receiver.Settings, baseCfg component.Config, consumer consumer.Traces) (receiver.Traces, error) {
518518
return nil, nil
519519
}
520520
```
@@ -564,7 +564,7 @@ func createDefaultConfig() component.Config {
564564
}
565565
}
566566

567-
func createTracesReceiver(_ context.Context, params receiver.CreateSettings, baseCfg component.Config, consumer consumer.Traces) (receiver.Traces, error) {
567+
func createTracesReceiver(_ context.Context, params receiver.Settings, baseCfg component.Config, consumer consumer.Traces) (receiver.Traces, error) {
568568
return nil, nil
569569
}
570570

@@ -775,8 +775,7 @@ as part of the `createTracesReceiver()` function parameters that your receiver
775775
actually requires to work properly like its configuration settings
776776
(`component.Config`), the next `Consumer` in the pipeline that will consume the
777777
generated traces (`consumer.Traces`) and the Collector's logger so the
778-
`tailtracer` receiver can add meaningful events to it
779-
(`receiver.CreateSettings`).
778+
`tailtracer` receiver can add meaningful events to it (`receiver.Settings`).
780779

781780
Given that all this information will only be made available to the receiver at
782781
the moment it's instantiated by the factory, the `tailtracerReceiver` type will
@@ -910,7 +909,7 @@ func createDefaultConfig() component.Config {
910909
}
911910
}
912911

913-
func createTracesReceiver(_ context.Context, params receiver.CreateSettings, baseCfg component.Config, consumer consumer.Traces) (receiver.Traces, error) {
912+
func createTracesReceiver(_ context.Context, params receiver.Settings, baseCfg component.Config, consumer consumer.Traces) (receiver.Traces, error) {
914913

915914
logger := params.Logger
916915
tailtracerCfg := baseCfg.(*Config)
@@ -937,7 +936,7 @@ func NewFactory() receiver.Factory {
937936

938937
- Added a variable called `logger` and initialized it with the Collector's
939938
logger that is available as a field named `Logger` within the
940-
`receiver.CreateSettings` reference.
939+
`receiver.Settings` reference.
941940
- Added a variable called `tailtracerCfg` and initialized it by casting the
942941
`component.Config` reference to the `tailtracer` receiver `Config`.
943942
- Added a variable called `traceRcvr` and initialized it with the

0 commit comments

Comments
 (0)