Skip to content

[receiver/tcpcheck] fix metric unit#45092

Merged
atoulme merged 1 commit intoopen-telemetry:mainfrom
atoulme:fix_unit
Jan 1, 2026
Merged

[receiver/tcpcheck] fix metric unit#45092
atoulme merged 1 commit intoopen-telemetry:mainfrom
atoulme:fix_unit

Conversation

@atoulme
Copy link
Contributor

@atoulme atoulme commented Dec 20, 2025

Description

Fix the unit metric from error to errors

@atoulme atoulme requested a review from a team as a code owner December 20, 2025 07:48
@atoulme atoulme requested a review from VihasMakwana December 20, 2025 07:48
@atoulme atoulme merged commit 8278048 into open-telemetry:main Jan 1, 2026
190 checks passed
@github-actions github-actions bot added this to the next release milestone Jan 1, 2026
m.data.SetName("tcpcheck.error")
m.data.SetDescription("Records errors occurring during TCP check.")
m.data.SetUnit("{error}")
m.data.SetUnit("{errors}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this contradict the docs? https://opentelemetry.io/docs/specs/semconv/general/metrics/#instrument-units

All non-units that use curly braces to annotate a quantity need to match the grammatical number of the quantity it represent. For example if measuring the number of individual requests to a process the unit would be {request}, not {requests}.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am confused. I was under the strong impression it was the other way around. I will open an issue.

seongpil0948 pushed a commit to seongpil0948/opentelemetry-collector-contrib that referenced this pull request Jan 10, 2026
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Fix the unit metric from `error` to `errors`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants