Add OpenTelemetry attributes to the metrics backend
Currently the OpenTelemetryMetricsBackend reports a number of metrics, following the naming conventions of OpenTelemetry.
However, we only report raw metric values, without any of the attributes as defined here.
The goal of this issue is to report the metrics along with the required attributes. Optionally, we might include other attributes, if this is feasible and "makes sense".
The abstractions currently present in OpenTelemetryMetricsBackend might need updating/extending/refactoring; since this targets version 4 (yet unreleased), there are no compatibility requirements.
/bounty $500
💎 $500 bounty • SoftwareMill
Steps to solve:
- Start working: Comment
/attempt #2292with your implementation plan - Submit work: Create a pull request including
/claim #2292in the PR body to claim the bounty - Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts
Thank you for contributing to softwaremill/sttp!
Add a bounty • Share on socials
| Attempt | Started (GMT+0) | Solution |
|---|---|---|
| 🟢 @varshith257 | Oct 16, 2024, 1:10:58 PM | #2327 |
@adamw I have experience with OTEL and my experience through an internship and contributions to OTEL and Jaeger. I am throwing my hat to crack this /attempt #2292
| Algora profile | Completed bounties | Tech | Active attempts | Options |
|---|---|---|---|---|
| @varshith257 | 16 bounties from 8 projects | Scala, Rust, TypeScript & more |
Cancel attempt |
The goal of this issue is to report the metrics along with the required attributes
(copy-paste from https://github.com/softwaremill/tapir/issues/4057).
You can use OpenTelemetry semantic conventions to generate specs and use them in tests to ensure all required attributes are in place.
Here are a few examples:
- https://github.com/typelevel/otel4s/pull/773 - metric specs generator in otel4s
- https://github.com/typelevel/otel4s/blob/main/semconv/metrics/stable/src/main/scala/org/typelevel/otel4s/semconv/metrics/HttpMetrics.scala - generated spec
- https://github.com/http4s/http4s-otel4s-middleware/pull/129/files#diff-3f8cb430fb564f7ac7cc04d5658720b1566be69f3dddaac00721f7a69955cb3aR156-R182 - the test itself
@iRevive thanks, this looks interesting. @varshith257 if we could use this somehow to simplify / automate the testing, that would be great
As we are getting first PRs for the bounties, I've published our "How to prepare a good PR" guide. I should have probably done this right away, sorry! :)
💡 @varshith257 submitted a pull request that claims the bounty. You can visit your bounty board to reward.