Skip to content

Commit b90c362

Browse files
committed
Deprecate python-monitor monitor
1 parent b63ac24 commit b90c362

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
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 ([#](https://github.com/signalfx/splunk-otel-collector/pull/))
99
## v0.111.0
1010

1111

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const (
1616
MessageTypeNone MessageType = 0
1717
MessageTypeConfigure MessageType = 1
1818
MessageTypeConfigureResult MessageType = 2
19-
MessageTypeShutdown MessageType = 3
2019
MessageTypeLog MessageType = 4
2120
)
2221

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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ package python
55

66
import (
77
"encoding/json"
8+
"github.com/signalfx/signalfx-agent/pkg/utils"
9+
log "github.com/sirupsen/logrus"
810
"os"
911
"strings"
12+
"time"
1013

1114
"github.com/signalfx/signalfx-agent/pkg/core/config"
1215
"github.com/signalfx/signalfx-agent/pkg/monitors"
@@ -88,6 +91,8 @@ type PyMonitor struct {
8891
// Configure starts the subprocess and configures the plugin
8992
func (m *PyMonitor) Configure(conf *Config) error {
9093
runtimeConf := subproc.DefaultPythonRuntimeConfig(conf.BundleDir, "sfxmonitor")
94+
logger := utils.NewThrottledLogger(log.WithFields(log.Fields{"monitorType": monitorType, "monitorID": conf.MonitorID}), 30*time.Second)
95+
logger.Warn("python-monitor is deprecated and will be removed soon.")
9196
if conf.PythonBinary != "" {
9297
runtimeConf.Binary = conf.PythonBinary
9398
runtimeConf.Env = os.Environ()

0 commit comments

Comments
 (0)