Skip to content

Commit 1c84fb2

Browse files
sumo-drosiekdjaglowskicrobert-1
authored
feat(mysqlreceiver): deprecate mysql. locked_connects in favor of mysql.connection.errors (open-telemetry#23274)
**Description:** deprecate `mysql.locked_accounts` in favor of `mysql.connection.errors` ``` 2023-06-12T08:29:43.306+0200 info service/telemetry.go:104 Setting up own telemetry... 2023-06-12T08:29:43.306+0200 info service/telemetry.go:127 Serving Prometheus metrics {"address": ":8888", "level": "Basic"} 2023-06-12T08:29:43.306+0200 info [email protected]/exporter.go:275 Development component. May change in the future. {"kind": "exporter", "data_type": "metrics", "name": "logging"} 2023-06-12T08:29:43.308+0200 info service/service.go:131 Starting otelcontribcol... {"Version": "0.79.0-dev", "NumCPU": 16} 2023-06-12T08:29:43.308+0200 info extensions/extensions.go:30 Starting extensions... 2023-06-12T08:29:43.308+0200 warn [email protected]/scraper.go:60 `mysql.locked_connects` is deprecated and is going to be set as optional in `v0.80.0` and removed in `v0.81.0`. Please use `mysql.connection.errors` instead {"kind": "receiver", "name": "mysql", "data_type": "metrics"} 2023-06-12T08:29:43.308+0200 info service/service.go:148 Everything is ready. Begin running and processing data. ^C2023-06-12T08:29:44.055+0200 info otelcol/collector.go:227 Received signal from OS {"signal": "interrupt"} 2023-06-12T08:29:44.056+0200 info service/service.go:157 Starting shutdown... ``` --------- Signed-off-by: Dominik Rosiek <[email protected]> Co-authored-by: Daniel Jaglowski <[email protected]> Co-authored-by: Curtis Robert <[email protected]>
1 parent c8cf780 commit 1c84fb2

File tree

8 files changed

+30
-6
lines changed

8 files changed

+30
-6
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Use this changelog template to create an entry for release notes.
2+
# If your change doesn't affect end users, such as a test fix or a tooling change,
3+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
4+
5+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
6+
change_type: deprecation
7+
8+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
9+
component: mysqlreceiver
10+
11+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
12+
note: "deprecate `mysql.locked_connects` in favor of `mysql.connection.errors`"
13+
14+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
15+
issues: [14138]
16+
17+
# (Optional) One or more lines of additional information to render under the primary note.
18+
# These lines will be padded with 2 spaces and then inserted directly into the document.
19+
# Use pipe (|) for multiline entries.
20+
subtext:

receiver/mysqlreceiver/documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ The total time of I/O wait events for an index.
148148
149149
### mysql.locked_connects
150150
151-
The number of attempts to connect to locked user accounts.
151+
[DEPRECATED] The number of attempts to connect to locked user accounts.
152152
153153
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
154154
| ---- | ----------- | ---------- | ----------------------- | --------- |

receiver/mysqlreceiver/internal/metadata/generated_metrics.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/mysqlreceiver/internal/metadata/generated_metrics_test.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/mysqlreceiver/metadata.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ metrics:
445445
attributes: [schema, table_name, write_lock_type]
446446
mysql.locked_connects:
447447
enabled: true
448-
description: The number of attempts to connect to locked user accounts.
448+
description: "[DEPRECATED] The number of attempts to connect to locked user accounts."
449449
unit: 1
450450
sum:
451451
value_type: int

receiver/mysqlreceiver/scraper.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ func (m *mySQLScraper) start(_ context.Context, _ component.Host) error {
5656
}
5757
m.sqlclient = sqlclient
5858

59+
if m.config.MetricsBuilderConfig.Metrics.MysqlLockedConnects.Enabled {
60+
m.logger.Warn("`mysql.locked_connects` is deprecated and is going to be set as optional in `v0.81.0` and removed in `v0.82.0`. Please use `mysql.connection.errors` instead")
61+
}
62+
5963
return nil
6064
}
6165

receiver/mysqlreceiver/testdata/integration/expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ resourceMetrics:
302302
timeUnixNano: "1674545265375344000"
303303
isMonotonic: true
304304
unit: "1"
305-
- description: The number of attempts to connect to locked user accounts.
305+
- description: "[DEPRECATED] The number of attempts to connect to locked user accounts."
306306
name: mysql.locked_connects
307307
sum:
308308
aggregationTemporality: 2

receiver/mysqlreceiver/testdata/scraper/expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ resourceMetrics:
622622
timeUnixNano: "1644862687825772000"
623623
isMonotonic: true
624624
unit: "1"
625-
- description: The number of attempts to connect to locked user accounts.
625+
- description: "[DEPRECATED] The number of attempts to connect to locked user accounts."
626626
name: mysql.locked_connects
627627
sum:
628628
aggregationTemporality: 2

0 commit comments

Comments
 (0)