Skip to content

Commit fadd1be

Browse files
authored
[smartagent/hana] deprecate hana monitor in favor of saphana and sqlquery receivers (#7261)
1 parent 0ae4eaa commit fadd1be

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

.chloggen/deprecate_hana.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: deprecation
3+
4+
# The name of the component, or a single word describing the area of concern, (e.g. crosslink)
5+
component: hana
6+
7+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
8+
note: Deprecate the hana monitor
9+
10+
# One or more tracking issues related to the change
11+
issues: [7261]
12+
13+
# (Optional) One or more lines of additional information to render under the primary note.
14+
# These lines will be padded with 2 spaces and then inserted directly into the document.
15+
# Use pipe (|) for multiline entries.
16+
subtext: |
17+
The hana monitor is deprecated and will removed on or after May 2026. Please use the
18+
[saphana](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/saphanareceiver)
19+
and [sqlquery](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/sqlqueryreceiver) receivers instead.

internal/signalfx-agent/pkg/monitors/hana/metadata.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
monitors:
22
- monitorType: hana
33
doc: |
4+
**The HANA monitor is deprecated and will be removed on or after May 2026.
5+
Please use the sqlquery receiver and the saphana receiver instead.**
46
This monitor sends SQL queries to an SAP Hana database, emitting the results as metrics.
57
68
```yaml

internal/signalfx-agent/pkg/monitors/hana/monitor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func configureSQLMonitor(output types.Output, monCfg config.MonitorConfig, connS
102102
DBDriver: "hdb",
103103
Queries: queries(maxExpensiveQueries),
104104
LogQueries: logQueries,
105-
})
105+
}, "[NOTICE] The hana monitor is deprecated and will removed on or after May 2026. Please use the saphana and sqlquery receivers instead.")
106106
}
107107

108108
func (m *Monitor) Shutdown() {

internal/signalfx-agent/pkg/monitors/sql/monitor.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,12 @@ type Monitor struct {
152152
}
153153

154154
// Configure the monitor and kick off metric gathering
155-
func (m *Monitor) Configure(conf *Config) error {
155+
func (m *Monitor) Configure(conf *Config, deprecationWarning ...string) error {
156156
m.logger = logrus.WithField("monitorType", conf.Type).WithField("monitorID", conf.MonitorID)
157157
m.ctx, m.cancel = context.WithCancel(context.Background())
158+
for _, warning := range deprecationWarning {
159+
m.logger.Warn(warning)
160+
}
158161

159162
// This will "open" a database by verifying that the config is sane but
160163
// generally won't try and connect to it. If it does attempt to connect

0 commit comments

Comments
 (0)