opentelemetry-js
opentelemetry-js copied to clipboard
feat(core): add seconds converter utility
trafficstars
Which problem is this PR solving?
api.HrTime has no utility to convert to float seconds for http.server.request.duration and http.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.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
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
- [x] #hrTimeToSeconds unit test
Checklist:
- [x] Followed the style guidelines of this project
- [x] Unit tests have been added
- [x] Documentation has been updated