From 52e3afe38ae78eb31f442d26c55968efa87d9d27 Mon Sep 17 00:00:00 2001 From: Paulo Janotti Date: Wed, 31 Jan 2024 11:17:48 -0800 Subject: [PATCH] Log a deprecation notice as warning for asptnet and dotnet monitors (#4229) --- .../signalfx-agent/pkg/monitors/aspdotnet/aspdotnet_windows.go | 1 + internal/signalfx-agent/pkg/monitors/dotnet/dotnet_windows.go | 1 + 2 files changed, 2 insertions(+) diff --git a/internal/signalfx-agent/pkg/monitors/aspdotnet/aspdotnet_windows.go b/internal/signalfx-agent/pkg/monitors/aspdotnet/aspdotnet_windows.go index 7e2f435032..1b44c5acff 100644 --- a/internal/signalfx-agent/pkg/monitors/aspdotnet/aspdotnet_windows.go +++ b/internal/signalfx-agent/pkg/monitors/aspdotnet/aspdotnet_windows.go @@ -21,6 +21,7 @@ var logger = logrus.WithField("monitorType", monitorType) // Configure the monitor and kick off metric syncing func (m *Monitor) Configure(conf *Config) error { m.logger = logger.WithField("monitorID", conf.MonitorID) + m.logger.Warn("[NOTICE] The " + monitorType + " monitor is deprecated and will be removed in a future release. For more information visit https://docs.splunk.com/observability/en/gdi/monitors-languages/asp-dot-net.html") perfcounterConf := &winperfcounters.Config{ CountersRefreshInterval: conf.CountersRefreshInterval, PrintValid: conf.PrintValid, diff --git a/internal/signalfx-agent/pkg/monitors/dotnet/dotnet_windows.go b/internal/signalfx-agent/pkg/monitors/dotnet/dotnet_windows.go index 0a88ffb4e8..85f55a3789 100644 --- a/internal/signalfx-agent/pkg/monitors/dotnet/dotnet_windows.go +++ b/internal/signalfx-agent/pkg/monitors/dotnet/dotnet_windows.go @@ -21,6 +21,7 @@ var logger = logrus.WithField("monitorType", monitorType) // Configure the monitor and kick off metric syncing func (m *Monitor) Configure(conf *Config) error { m.logger = logger.WithField("monitorID", conf.MonitorID) + m.logger.Warn("[NOTICE] The " + monitorType + " monitor is deprecated and will be removed in a future release. For more information visit https://docs.splunk.com/observability/en/gdi/monitors-languages/microsoft-dotnet.html") perfcounterConf := &winperfcounters.Config{ CountersRefreshInterval: conf.CountersRefreshInterval, PrintValid: conf.PrintValid,