Skip to content

fix: use correct message type attribute in metrics#1076

Merged
guillaumemichel merged 1 commit intolibp2p:masterfrom
diogo464:metric-attribute-fix
Apr 24, 2025
Merged

fix: use correct message type attribute in metrics#1076
guillaumemichel merged 1 commit intolibp2p:masterfrom
diogo464:metric-attribute-fix

Conversation

@diogo464
Copy link
Copy Markdown
Contributor

The message type attribute was being overwritten with "UNKNOWN" because attrOpt was given after attrSetOpt (which contained the message type from the context) in the varargs.
I removed the message type "UNKOWN" from RecordRequestSendOK since its only called once and the context that is passed in has the message type attribute set.

The images bellow show the problem with an example query in victoria metrics.
message-type-pre
message-type-post

@diogo464 diogo464 requested review from a team and guillaumemichel as code owners April 23, 2025 21:37
Copy link
Copy Markdown
Collaborator

@guillaumemichel guillaumemichel left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @diogo464

@guillaumemichel guillaumemichel merged commit 7cc3df8 into libp2p:master Apr 24, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants