Skip to content

Commit

Permalink
http monitor: add missing monitorID logger field (#3261)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmfitzpatrick authored Jun 14, 2023
1 parent cbe3d9b commit 8dd99b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/signalfx-agent/pkg/monitors/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ import (
"time"

"github.com/signalfx/golib/v3/datapoint"
"github.com/sirupsen/logrus"

"github.com/signalfx/signalfx-agent/pkg/core/common/auth"
"github.com/signalfx/signalfx-agent/pkg/core/common/httpclient"
"github.com/signalfx/signalfx-agent/pkg/core/config"
"github.com/signalfx/signalfx-agent/pkg/monitors"
"github.com/signalfx/signalfx-agent/pkg/monitors/types"
"github.com/signalfx/signalfx-agent/pkg/utils"
"github.com/sirupsen/logrus"
)

func init() {
Expand Down Expand Up @@ -71,7 +72,7 @@ type Monitor struct {
// Configure and kick off internal metric collection
func (m *Monitor) Configure(conf *Config) (err error) {
m.conf = conf
m.logger = logrus.WithFields(logrus.Fields{"monitorType": m.monitorName})
m.logger = logrus.WithFields(logrus.Fields{"monitorType": m.monitorName, "monitorID": m.conf.MonitorID})
// Ignore certificate error which will be checked after
m.conf.SkipVerify = true

Expand Down

0 comments on commit 8dd99b8

Please sign in to comment.