Skip to content

Commit

Permalink
depreciated fucntion
Browse files Browse the repository at this point in the history
  • Loading branch information
vasireddy99 committed Apr 29, 2022
1 parent bd84730 commit 29d6f49
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,16 @@ func getConfig() string {
}

func NewCollector(factories component.Factories) *Collector {

cfgSet := service.ConfigProviderSettings{}
cfgSet.Locations = []string{getConfig()}
cfgProvider,err := service.NewConfigProvider(cfgSet)
col := &Collector{
factories: factories,
configProvider: service.MustNewDefaultConfigProvider([]string{getConfig()}, nil),
configProvider: cfgProvider,
}
if err != nil{
panic(err)
}
return col
}
Expand Down

0 comments on commit 29d6f49

Please sign in to comment.