Skip to content

Commit

Permalink
fix nil panic
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
  • Loading branch information
mblaschke committed Jun 19, 2024
1 parent ddcb51f commit 5d89809
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions loganalytics/prober.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ func (p *LogAnalyticsProber) Init() {
),
)
}
}

func (p *LogAnalyticsProber) SetAzureClient(client *armclient.ArmClient) {
p.Azure.Client = client

tagManagerConfig, err := p.Azure.Client.TagManager.ParseTagConfig(p.Conf.Azure.ResourceTags)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func NewLogAnalyticsProber(w http.ResponseWriter, r *http.Request) *loganalytics
prober.QueryConfig = Config
prober.Conf = Opts
prober.UserAgent = UserAgent + gitTag
prober.Azure.Client = AzureClient
prober.SetAzureClient(AzureClient)
prober.EnableCache(metricCache)

return prober
Expand Down

0 comments on commit 5d89809

Please sign in to comment.