Skip to content

Update metric names for Otel conventions#996

Merged
CVanF5 merged 6 commits intov3from
metrics-update
Mar 5, 2025
Merged

Update metric names for Otel conventions#996
CVanF5 merged 6 commits intov3from
metrics-update

Conversation

@CVanF5
Copy link
Collaborator

@CVanF5 CVanF5 commented Feb 24, 2025

Proposed changes

In an effort to be more consistent with the use of "count" and pluralization the following changes were made:

  1. Where "count" is used, ensure the type is "gauge" and not "sum"
  2. Where "count" is used remove pluralization from the name.
  3. Pluralization consistency. If the last word is a plural ensure the type is "sum"
  4. Fix unit names where applicable
  5. Where the unit is "bytes" remove byte from the name
  6. Replace abbreviated TX/RX with words

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@github-actions github-actions bot added chore Pull requests for routine tasks documentation Improvements or additions to documentation labels Feb 24, 2025
@CodeMonkeyF5
Copy link

CodeMonkeyF5 commented Feb 25, 2025

For the nginx.* metrics involving potential IO with both direction of either RX or TX need to know whether or not bi-directional is involved:

  • nginx.http.request.byte.io
  • nginx.stream.byte.io
  • nginx.http.upstream.peer.byte.io

If these are one direction only shouldn't need an attribute like nginx.io.direction and could include it in the name (e.g. nginx.stream.io.sent).

Ideally those metrics would also be consistent with the OTel attribute values and not use the abbreviated form of "RX" or "TX" and instead use "receive" and "transmit".

For any of the metric names containing the word "byte", this isn't really something we should use since the Unit (UCUM) describes that. So could go through and revise any that have ".byte" appearing in the name?

@CVanF5 CVanF5 force-pushed the metrics-update branch 2 times, most recently from 9fac86e to 667e23b Compare February 26, 2025 13:24
@CodeMonkeyF5
Copy link

LGTM!

@CVanF5 CVanF5 marked this pull request as ready for review February 27, 2025 16:58
@CVanF5 CVanF5 requested a review from a team as a code owner February 27, 2025 16:58
@CVanF5 CVanF5 merged commit 0efbefd into v3 Mar 5, 2025
20 checks passed
@CVanF5 CVanF5 deleted the metrics-update branch March 5, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Pull requests for routine tasks documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants