Skip to content

Commit

Permalink
Set desired providers/converters instead of relying on defaults
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Helmuth <[email protected]>
  • Loading branch information
TylerHelmuth committed Jun 6, 2024
1 parent 52473e7 commit daaad63
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
21 changes: 21 additions & 0 deletions cmd/jaeger/internal/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ import (

"github.com/spf13/cobra"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/confmap"
"go.opentelemetry.io/collector/confmap/converter/expandconverter"
"go.opentelemetry.io/collector/confmap/provider/envprovider"
"go.opentelemetry.io/collector/confmap/provider/fileprovider"
"go.opentelemetry.io/collector/confmap/provider/httpprovider"
"go.opentelemetry.io/collector/confmap/provider/httpsprovider"
"go.opentelemetry.io/collector/confmap/provider/yamlprovider"
"go.opentelemetry.io/collector/otelcol"

"github.com/jaegertracing/jaeger/pkg/version"
Expand All @@ -30,6 +37,20 @@ func Command() *cobra.Command {
settings := otelcol.CollectorSettings{
BuildInfo: info,
Factories: Components,
ConfigProviderSettings: otelcol.ConfigProviderSettings{
ResolverSettings: confmap.ResolverSettings{
ProviderFactories: []confmap.ProviderFactory{
envprovider.NewFactory(),
fileprovider.NewFactory(),
httpprovider.NewFactory(),
httpsprovider.NewFactory(),
yamlprovider.NewFactory(),
},
ConverterFactories: []confmap.ConverterFactory{
expandconverter.NewFactory(),
},
},
},
}

cmd := otelcol.NewCommand(settings)
Expand Down
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ require (
go.opentelemetry.io/collector/config/configretry v0.102.1
go.opentelemetry.io/collector/config/configtls v0.102.1
go.opentelemetry.io/collector/confmap v0.102.1
go.opentelemetry.io/collector/confmap/converter/expandconverter v0.102.1
go.opentelemetry.io/collector/confmap/provider/envprovider v0.102.1
go.opentelemetry.io/collector/confmap/provider/fileprovider v0.102.1
go.opentelemetry.io/collector/confmap/provider/httpprovider v0.102.1
go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.102.1
go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.102.1
go.opentelemetry.io/collector/connector v0.102.1
go.opentelemetry.io/collector/connector/forwardconnector v0.102.1
go.opentelemetry.io/collector/consumer v0.102.1
Expand Down Expand Up @@ -186,12 +192,6 @@ require (
go.opentelemetry.io/collector/config/configopaque v1.9.0 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.102.1 // indirect
go.opentelemetry.io/collector/config/internal v0.102.1 // indirect
go.opentelemetry.io/collector/confmap/converter/expandconverter v0.102.1 // indirect
go.opentelemetry.io/collector/confmap/provider/envprovider v0.102.1 // indirect
go.opentelemetry.io/collector/confmap/provider/fileprovider v0.102.1 // indirect
go.opentelemetry.io/collector/confmap/provider/httpprovider v0.102.1 // indirect
go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.102.1 // indirect
go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.102.1 // indirect
go.opentelemetry.io/collector/exporter/debugexporter v0.102.1
go.opentelemetry.io/collector/extension/auth v0.102.1 // indirect
go.opentelemetry.io/collector/featuregate v1.9.0 // indirect
Expand Down

0 comments on commit daaad63

Please sign in to comment.