Skip to content

Commit

Permalink
chore: replace deprecated ConfigProvider with ConfigProviderSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
kasia-kujawa committed Mar 7, 2024
1 parent e9e81ae commit c978dd4
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions otelcolbuilder/cmd/configprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,9 @@ func UseCustomConfigProvider(params *otelcol.CollectorSettings) error {

// create the config provider using the locations
if len(locations) > 0 {
params.ConfigProvider, err = NewConfigProvider(locations)
if err != nil {
return err
}
params.ConfigProviderSettings = NewConfigProviderSettings(locations)
} else {
settings := NewOpAmpConfigProviderSettings(opAmpPath.Value.String())
params.ConfigProvider, err = otelcol.NewConfigProvider(settings)
if err != nil {
return err
}
params.ConfigProviderSettings = NewOpAmpConfigProviderSettings(opAmpPath.Value.String())
}

return nil
Expand Down

0 comments on commit c978dd4

Please sign in to comment.