File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
internal/signalfx-agent/pkg/monitors/subproc/signalfx/python Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 5
5
6
6
- (Splunk) Deprecate cloudfoundry monitor ([ #5495 ] ( https://github.com/signalfx/splunk-otel-collector/pull/5495 ) )
7
7
- (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 ) )
9
9
## v0.111.0
10
10
11
11
Original file line number Diff line number Diff line change 1
1
monitors :
2
2
- monitorType : python-monitor
3
3
doc : |
4
+ **This monitor is deprecated and will be removed soon.**
4
5
This monitor allows you to generate metrics from a Python script.
5
6
6
7
Your Python code should be Python 2.7+ *AND* 3.0+ compatible. The Python
Original file line number Diff line number Diff line change @@ -7,12 +7,16 @@ import (
7
7
"encoding/json"
8
8
"os"
9
9
"strings"
10
+ "time"
11
+
12
+ log "github.com/sirupsen/logrus"
10
13
11
14
"github.com/signalfx/signalfx-agent/pkg/core/config"
12
15
"github.com/signalfx/signalfx-agent/pkg/monitors"
13
16
"github.com/signalfx/signalfx-agent/pkg/monitors/subproc"
14
17
"github.com/signalfx/signalfx-agent/pkg/monitors/subproc/signalfx"
15
18
"github.com/signalfx/signalfx-agent/pkg/monitors/types"
19
+ "github.com/signalfx/signalfx-agent/pkg/utils"
16
20
)
17
21
18
22
func init () {
@@ -88,6 +92,8 @@ type PyMonitor struct {
88
92
// Configure starts the subprocess and configures the plugin
89
93
func (m * PyMonitor ) Configure (conf * Config ) error {
90
94
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." )
91
97
if conf .PythonBinary != "" {
92
98
runtimeConf .Binary = conf .PythonBinary
93
99
runtimeConf .Env = os .Environ ()
You can’t perform that action at this time.
0 commit comments