-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Create metrics.Factory adapter for OTEL Metrics #5661
Conversation
Signed-off-by: Wise-Wizard <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5661 +/- ##
=======================================
Coverage 96.38% 96.38%
=======================================
Files 329 334 +5
Lines 16060 16141 +81
=======================================
+ Hits 15479 15558 +79
- Misses 404 405 +1
- Partials 177 178 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Wise-Wizard <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]> Signed-off-by: Saransh Shankar <[email protected]>
Signed-off-by: Wise-Wizard <[email protected]>
…into OTEL_Metrics
Signed-off-by: Wise-Wizard <[email protected]>
tested via ``` $ go test -benchmem -benchtime=5s -bench=Benchmark ./internal/metrics/ ``` before: ``` BenchmarkPrometheusCounter-10 856818336 6.875 ns/op 0 B/op 0 allocs/op BenchmarkOTELCounter-10 146044255 40.92 ns/op 32 B/op 2 allocs/op ``` after: `` BenchmarkPrometheusCounter-10 855046669 6.924 ns/op 0 B/op 0 allocs/op BenchmarkOTELCounter-10 293330721 21.05 ns/op 16 B/op 1 allocs/op ``` Signed-off-by: Yuri Shkuro <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run make fmt
to add headers
I fixed perf by 2x in 4a99291. For some reason OTEL counter still does a memory allocation for each Inc() call. We should open an upstream ticket for that. |
Oh that's great! |
Signed-off-by: Wise-Wizard <[email protected]>
Actually, your benchmark is incorrect. You are not initializing OTEL SDK, so the benchmark is actually going to noop implementation (even more surprising why it performs an allocation in no-op mode). |
Yes I do realise that, I wrote the benchmark first and just ran it with no-op implementation for the looks of it expecting a very low time to be taken. |
I am quite sure that the perf hit is coming from that one still remaining allocation. |
Signed-off-by: Wise-Wizard <[email protected]>
Signed-off-by: Wise-Wizard <[email protected]>
Signed-off-by: Wise-Wizard <[email protected]>
Signed-off-by: Wise-Wizard <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]> Signed-off-by: Saransh Shankar <[email protected]>
Signed-off-by: Wise-Wizard <[email protected]>
Signed-off-by: Wise-Wizard <[email protected]>
Signed-off-by: Wise-Wizard <[email protected]>
Signed-off-by: Wise-Wizard <[email protected]>
Signed-off-by: Wise-Wizard <[email protected]>
Signed-off-by: Wise-Wizard <[email protected]>
Signed-off-by: Wise-Wizard <[email protected]>
Signed-off-by: Wise-Wizard <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]> Signed-off-by: Saransh Shankar <[email protected]>
Signed-off-by: Wise-Wizard <[email protected]>
Signed-off-by: Wise-Wizard <[email protected]>
Which problem is this PR solving?
This PR addresses a part of the issue #5633
Description of the changes
This is a Draft PR to bridge the OTEL Metrics instead of using Internal Metrics to minimize code changes.
How was this change tested?
The changes were tested by running the following command:
make test
Checklist
for jaeger: make lint test
for jaeger-ui: yarn lint
andyarn test