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

refactor!: prometheus attributes format to otel attributes #4122

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

varshith257
Copy link

@varshith257 varshith257 commented Oct 29, 2024

/claim #4057
Closes #4057

@varshith257
Copy link
Author

@sergiuszkierat I just worked this a few days ago and haven't pushed here :)

@varshith257
Copy link
Author

Just need tweaks here to this PR. Once it is done I will tag you here

@sergiuszkierat
Copy link

@sergiuszkierat I just worked this a few days ago and haven't pushed here :)

@varshith257 Thanks for letting me know. Better late than never 😅 I can freely switch to another task

@varshith257 varshith257 marked this pull request as ready for review October 30, 2024 17:21
@varshith257
Copy link
Author

@adamw It's ready for your review

@varshith257
Copy link
Author

varshith257 commented Oct 31, 2024 via email

@varshith257 varshith257 changed the title refactor: prometheus attributes format to otel attributes refactor!: prometheus attributes format to otel attributes Nov 3, 2024
@varshith257
Copy link
Author

@adamw Done!

},
"error.type" -> {
case Left(ex) => ex.getClass.getSimpleName
case Right(_) => ""
Copy link
Member

Choose a reason for hiding this comment

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

I think if the response is a Right we shouldn't add any attributes

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it will helps.Will make changes for it

Copy link
Author

Choose a reason for hiding this comment

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

@adamw The scala compiler is hungry to handle Right case?
WDYT the better way what you are thinking of?

Copy link
Author

@varshith257 varshith257 Nov 11, 2024

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

ah, well I guess this would have to return an Option[String], not a String, and then you would report only the defined labels

Copy link
Author

@varshith257 varshith257 Nov 16, 2024

Choose a reason for hiding this comment

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

@adamw It's getting a bit tricky making "error.type" to Option[String]. In that case, if we make forResponse then h http.response.status_code could go None for bad req?

Copy link
Author

Choose a reason for hiding this comment

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

I made this comment 3 days before but don't know why not posted here lol

Copy link
Member

Choose a reason for hiding this comment

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

yes, if an attribute is None we don't include it, if it's a Some we do

@varshith257
Copy link
Author

varshith257 commented Nov 16, 2024

@adamw Can you approve workflows? I have no access to my desktop for now and I have made this commit through mobile :)

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.

Adjust OpenTelemetry metric names, add require attributes
3 participants