Skip to content

Commit 44c1aad

Browse files
authored
Deprecate python-monitor monitor (#5501)
1 parent b63ac24 commit 44c1aad

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
- (Splunk) Deprecate cloudfoundry monitor ([#5495](https://github.com/signalfx/splunk-otel-collector/pull/5495))
77
- (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))
8-
8+
- (Splunk) Deprecate python-monitor monitor ([#5501](https://github.com/signalfx/splunk-otel-collector/pull/5501))
99
## v0.111.0
1010

1111

internal/signalfx-agent/pkg/monitors/subproc/signalfx/python/metadata.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
monitors:
22
- monitorType: python-monitor
33
doc: |
4+
**This monitor is deprecated and will be removed soon.**
45
This monitor allows you to generate metrics from a Python script.
56
67
Your Python code should be Python 2.7+ *AND* 3.0+ compatible. The Python

internal/signalfx-agent/pkg/monitors/subproc/signalfx/python/signalfx.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ import (
77
"encoding/json"
88
"os"
99
"strings"
10+
"time"
11+
12+
log "github.com/sirupsen/logrus"
1013

1114
"github.com/signalfx/signalfx-agent/pkg/core/config"
1215
"github.com/signalfx/signalfx-agent/pkg/monitors"
1316
"github.com/signalfx/signalfx-agent/pkg/monitors/subproc"
1417
"github.com/signalfx/signalfx-agent/pkg/monitors/subproc/signalfx"
1518
"github.com/signalfx/signalfx-agent/pkg/monitors/types"
19+
"github.com/signalfx/signalfx-agent/pkg/utils"
1620
)
1721

1822
func init() {
@@ -88,6 +92,8 @@ type PyMonitor struct {
8892
// Configure starts the subprocess and configures the plugin
8993
func (m *PyMonitor) Configure(conf *Config) error {
9094
runtimeConf := subproc.DefaultPythonRuntimeConfig(conf.BundleDir, "sfxmonitor")
95+
logger := utils.NewThrottledLogger(log.WithFields(log.Fields{"monitorType": monitorType, "monitorID": conf.MonitorID}), 30*time.Second)
96+
logger.Warn("python-monitor is deprecated and will be removed soon.")
9197
if conf.PythonBinary != "" {
9298
runtimeConf.Binary = conf.PythonBinary
9399
runtimeConf.Env = os.Environ()

0 commit comments

Comments
 (0)