Skip to content

Commit

Permalink
Handle possible nil profiling config
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien-f committed Nov 16, 2023
1 parent 5b4010d commit 95acc55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/scrape/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func LabelsByProfiles(lb *labels.Builder, c *config.ProfilingConfig) ([]labels.L

if len(c.PprofConfig) > 0 {
for profilingType, profilingConfig := range c.PprofConfig {
if *profilingConfig.Enabled {
if profilingConfig.Enabled != nil && *profilingConfig.Enabled {
lb.Set(ProfilePath, profilingConfig.Path)
lb.Set(ProfileName, profilingType)
res = append(res, lb.Labels())
Expand Down

0 comments on commit 95acc55

Please sign in to comment.