softwaremill / tapir

Rapid development of self-documenting APIs
https://tapir.softwaremill.com
Apache License 2.0
1.36k stars 419 forks source link

Adjust OpenTelemetry metric names, add require attributes #4057

Open adamw opened 1 month ago

adamw commented 1 month ago

Currently OpenTelemetryMetrics reports metrics with names inherited from the Prometheus integration.

We should adjust this to conform to the recommended naming as specified by OpenTelemetry docs.

Moreover, alongside the metrics, we should report the required attributes; if optional attributes are feasible and make sense, they should be included as well.

Strict binary/source compatibility is not required, however we should aim at keeping the changes to the necessary minimum, as well as documenting migration path.

adamw commented 2 weeks ago

/bounty $500

algora-pbc[bot] commented 2 weeks ago

💎 $500 bounty • SoftwareMill

Steps to solve:

  1. Start working: Comment /attempt #4057 with your implementation plan
  2. Submit work: Create a pull request including /claim #4057 in the PR body to claim the bounty
  3. 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/tapir!

Add a bounty • Share on socials

Attempt Started (GMT+0) Solution
🔴 @sergiuszkierat Oct 28, 2024, 2:06:19 PM WIP
🟢 @varshith257 Oct 30, 2024, 11:23:08 AM #4122
iRevive commented 2 weeks ago

we should report the required attributes

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:

mobley-trent commented 2 weeks ago

/attempt #4057

adamw commented 1 week ago

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! :)

sergiuszkierat commented 3 days ago

/attempt #4057

algora-pbc[bot] commented 2 days ago

💡 @varshith257 submitted a pull request that claims the bounty. You can visit your bounty board to reward.

adamw commented 1 day ago

@varshith257 thanks for the PR - I think it would be good to /attempt the bounty so that people know there are others working on it. No idea how to resolve potential conflicts, I guess the first PR wins (though would be best to avoid such situations)

varshith257 commented 1 day ago

/attempt #4057

Algora profile Completed bounties Tech Active attempts Options
@varshith257 17 bounties from 9 projects
Go, Rust,
Scala & more
﹟4103
Cancel attempt
algora-pbc[bot] commented 1 day ago

[!NOTE] The user @sergiuszkierat is already attempting to complete issue #4057 and claim the bounty. We recommend checking in on @sergiuszkierat's progress, and potentially collaborating, before starting a new solution.

varshith257 commented 1 day ago

@adamw I will fix the conflicts and push changes by EOD

sergiuszkierat commented 1 day ago

@varshith257 thanks for the PR - I think it would be good to /attempt the bounty so that people know there are others working on it. No idea how to resolve potential conflicts, I guess the first PR wins (though would be best to avoid such situations)

Yeah. No worries. As I wrote here, I abandoned it. From my perspective the another approach might be doing some assessment. I know it is tougher for @adamw but the potential solution might be even better. Nevertheless, let's keep things simple. As a rule of thumb we can assume that first green and accepted PR wins.

Btw, I can't officially cancel my attempt, some stupid 401 exception without any idea how to resolve it :no_mouth:

adamw commented 1 day ago

@sergiuszkierat Thanks for letting us know, I've sent Algora info that there's some problem with the bot

sergiuszkierat commented 1 day ago

@adamw Thanks, Algora's bot uses invalid ids here That one is not mine, but it belongs to @varshith257. I've prepared the valid link with my unique username from Algora but got the same effect :shrug:

adamw commented 1 day ago

@sergiuszkierat according to Algora, it happened because the developer was not logged in on Algora when clicking the link.

zcesur commented 1 day ago

Hi @sergiuszkierat, you were getting the 401 because you haven't linked your Github account on Algora (which means our app was not able to authorize the cancellation request)

I've double checked the links and they are correct. Everyone has the same cancellation link (with the given bounty's ID) since we rely on who you're logged in as to determine which attempt to cancel

Sorry for the confusion, hope this makes sense! We've canceled your attempt

sergiuszkierat commented 1 day ago

@zcesur Thanks for your assistance and quick reaction. Honestly, it is still not clear how to link Github account on Algora as my settings panel seems not to have that option :thinking:

zcesur commented 1 day ago

@sergiuszkierat You can link your Github account using the Solve bounties onboarding we have on the dashboard

We'll definitely improve the onboarding (and a lot more) with the new major version we're launching soon!

sergiuszkierat commented 13 hours ago

@zcesur Yeah, this is what I've missed. Thanks man!