diff --git a/CHANGELOG.md b/CHANGELOG.md index 76566328c9..afe3961758 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ - (Splunk) Deprecate cloudfoundry monitor ([#5495](https://github.com/signalfx/splunk-otel-collector/pull/5495)) - (Splunk) Deprecate the heroku observer. Use the [resource detection observer with heroku detector](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor#heroku) instead. ([#5496](https://github.com/signalfx/splunk-otel-collector/pull/5496)) - +- (Splunk) Deprecate python-monitor monitor ([#5501](https://github.com/signalfx/splunk-otel-collector/pull/5501)) ## v0.111.0 diff --git a/internal/signalfx-agent/pkg/monitors/subproc/signalfx/python/metadata.yaml b/internal/signalfx-agent/pkg/monitors/subproc/signalfx/python/metadata.yaml index 440ee575a3..0190159f41 100644 --- a/internal/signalfx-agent/pkg/monitors/subproc/signalfx/python/metadata.yaml +++ b/internal/signalfx-agent/pkg/monitors/subproc/signalfx/python/metadata.yaml @@ -1,6 +1,7 @@ monitors: - monitorType: python-monitor doc: | + **This monitor is deprecated and will be removed soon.** This monitor allows you to generate metrics from a Python script. Your Python code should be Python 2.7+ *AND* 3.0+ compatible. The Python diff --git a/internal/signalfx-agent/pkg/monitors/subproc/signalfx/python/signalfx.go b/internal/signalfx-agent/pkg/monitors/subproc/signalfx/python/signalfx.go index 4d45a2b650..c07b4d1e62 100644 --- a/internal/signalfx-agent/pkg/monitors/subproc/signalfx/python/signalfx.go +++ b/internal/signalfx-agent/pkg/monitors/subproc/signalfx/python/signalfx.go @@ -5,8 +5,11 @@ package python import ( "encoding/json" + "github.com/signalfx/signalfx-agent/pkg/utils" + log "github.com/sirupsen/logrus" "os" "strings" + "time" "github.com/signalfx/signalfx-agent/pkg/core/config" "github.com/signalfx/signalfx-agent/pkg/monitors" @@ -88,6 +91,8 @@ type PyMonitor struct { // Configure starts the subprocess and configures the plugin func (m *PyMonitor) Configure(conf *Config) error { runtimeConf := subproc.DefaultPythonRuntimeConfig(conf.BundleDir, "sfxmonitor") + logger := utils.NewThrottledLogger(log.WithFields(log.Fields{"monitorType": monitorType, "monitorID": conf.MonitorID}), 30*time.Second) + logger.Warn("python-monitor is deprecated and will be removed soon.") if conf.PythonBinary != "" { runtimeConf.Binary = conf.PythonBinary runtimeConf.Env = os.Environ()