-
Notifications
You must be signed in to change notification settings - Fork 837
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
feat(core): add seconds converter utility #4945
Conversation
This looks good. Are you working on a PR to update the metric semconv for the http instrumentation? |
Can look into it. |
I was just asking. The PR description mentions this is "Minor addition of a utility for another PR that uses that utility." so I was wondering what the other PR is. |
I'm asking for 2 reasons
edit: if you want to work on updating the http instrumentation for metrics that's fine. I've opened a PR for client traces and I have server traces completed but no PR opened yet. I started working on metrics but didn't get as far. |
@dyladan go ahead, do you have a link for visibility? the utility is for converting the HR time to seconds. You’ll notice the current usage of the milliseconds version in the http instrumentation. If we can get this merged in, you just might be able to use it in your PR |
Open PR for client traces here: #4940 Still in draft because I'm finishing up testing. I'm asking what the motivation is for this PR. You mention in the description that this enables another PR but you don't say what that PR is. |
@dyladan yours is way more refined. I thought no one was working on it. Please don’t let this hold you up. I will wait for your stable semconv implementation with earnest |
@dyladan are you planning to use this for the semconv update in the http instrumentation? 🤔 |
I think there's probably no need. It's pretty easy to just use the existing function and divide by 1000 |
Which problem is this PR solving?
api.HrTime
has no utility to convert to float seconds forhttp.server.request.duration
andhttp.client.request.duration
semantic conventions.Short description of the changes
Minor addition of a utility for another PR that uses that utility. Simply converts
api.HrTime
to seconds.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: