Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mysqlreceiver): deprecate mysql.locked_connects in favor of mysql.connection.errors #23274

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .chloggen/drosiek-deprecate-locked-connects.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use this changelog template to create an entry for release notes.
# If your change doesn't affect end users, such as a test fix or a tooling change,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: deprecation

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: mysqlreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "deprecate `mysql.locked_connects` in favor of `mysql.connection.errors`"

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [14138]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
2 changes: 1 addition & 1 deletion receiver/mysqlreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ The total time of I/O wait events for an index.

### mysql.locked_connects

The number of attempts to connect to locked user accounts.
[DEPRECATED] The number of attempts to connect to locked user accounts.

| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion receiver/mysqlreceiver/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ metrics:
attributes: [schema, table_name, write_lock_type]
mysql.locked_connects:
enabled: true
description: The number of attempts to connect to locked user accounts.
description: "[DEPRECATED] The number of attempts to connect to locked user accounts."
unit: 1
sum:
value_type: int
Expand Down
4 changes: 4 additions & 0 deletions receiver/mysqlreceiver/scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ func (m *mySQLScraper) start(_ context.Context, _ component.Host) error {
}
m.sqlclient = sqlclient

if m.config.MetricsBuilderConfig.Metrics.MysqlLockedConnects.Enabled {
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")
}

return nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ resourceMetrics:
timeUnixNano: "1674545265375344000"
isMonotonic: true
unit: "1"
- description: The number of attempts to connect to locked user accounts.
- description: "[DEPRECATED] The number of attempts to connect to locked user accounts."
name: mysql.locked_connects
sum:
aggregationTemporality: 2
Expand Down
2 changes: 1 addition & 1 deletion receiver/mysqlreceiver/testdata/scraper/expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ resourceMetrics:
timeUnixNano: "1644862687825772000"
isMonotonic: true
unit: "1"
- description: The number of attempts to connect to locked user accounts.
- description: "[DEPRECATED] The number of attempts to connect to locked user accounts."
name: mysql.locked_connects
sum:
aggregationTemporality: 2
Expand Down