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

Closed

Conversation

varshith257
Copy link
Contributor

@varshith257 varshith257 commented Oct 29, 2024

/claim #4057
Closes #4057

@varshith257
Copy link
Contributor Author

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

@varshith257
Copy link
Contributor Author

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

@sergiuszkierat
Copy link
Member

@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 force-pushed the refactor/OTEL-attributes branch from 585a57a to 9fd29dc Compare October 30, 2024 12:11
@varshith257 varshith257 marked this pull request as ready for review October 30, 2024 17:21
@varshith257
Copy link
Contributor Author

@adamw It's ready for your review

@varshith257
Copy link
Contributor Author

varshith257 commented Oct 31, 2024 via email

@varshith257 varshith257 force-pushed the refactor/OTEL-attributes branch from 453389b to ca9550f Compare November 2, 2024 11:36
@varshith257 varshith257 changed the title refactor: prometheus attributes format to otel attributes refactor!: prometheus attributes format to otel attributes Nov 3, 2024
@varshith257 varshith257 force-pushed the refactor/OTEL-attributes branch from 38bf6fd to b433cda Compare November 8, 2024 05:35
@varshith257 varshith257 requested a review from adamw November 8, 2024 05:35
@varshith257
Copy link
Contributor 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
Contributor 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
Contributor 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
Contributor 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
Contributor 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
Contributor 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 varshith257 force-pushed the refactor/OTEL-attributes branch from e4449d4 to bd34265 Compare November 9, 2024 13:00
@varshith257 varshith257 requested a review from adamw November 10, 2024 18:32
@varshith257 varshith257 force-pushed the refactor/OTEL-attributes branch from bd34265 to 325a66b Compare November 10, 2024 18:32
@varshith257
Copy link
Contributor 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 :)

@adamw
Copy link
Member

adamw commented Nov 28, 2024

I'm closing this due to inactivity - please reopen if you'd like to work on the issue.

@adamw adamw closed this Nov 28, 2024
@varshith257
Copy link
Contributor Author

@adamw I have occupied with my university exams so I haven't made time to look close again. I just bit lost track of it. I think the only review work left is to make optional attributes. I have tried in my local but doesn't work what we outlined it expecting for Right.

Do you have any suggestions on it?

@adamw
Copy link
Member

adamw commented Nov 28, 2024

@varshith257 well you have to change the code so that it works with optionals. I won't write the code for you, sorry :)

@varshith257
Copy link
Contributor Author

@adamw I mean do you have any suggestions to make it to get work done quickly? Or else I will take a look again and fix it this weekend, my exams will be completed

@adamw
Copy link
Member

adamw commented Nov 28, 2024

@varshith257 no, you have to make this work with optionals, there's no cutting corners. I'll only accept solutions which fully meet the initial criteria and are well-written.

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