Repository navigation
fix(observability): instrument broker and jobsink requests once - #9606
RajPrakash681 wants to merge 1 commit into
Conversation
|
Welcome @RajPrakash681! It looks like this is your first PR to knative/eventing 🎉 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: RajPrakash681 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @RajPrakash681. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
e4b6d82 to
6ef4596
Compare
|
/ok-to-test |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9606 +/- ##
==========================================
+ Coverage 51.33% 51.46% +0.12%
==========================================
Files 412 412
Lines 22189 22178 -11
==========================================
+ Hits 11391 11414 +23
+ Misses 9917 9880 -37
- Partials 881 884 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/retest |
| t.Fatal("Unable to create handler:", err) | ||
| } | ||
|
|
||
| httpPort := freeport.GetPort() |
There was a problem hiding this comment.
freeport.GetPort() releases the port before the receiver binds it, so another process can take it and waitForListener can mistake that listener for the receiver. Could the test bind to port 0, wait for Ready, and use GetPort() to get the assigned port?
| tp := sdktrace.NewTracerProvider(sdktrace.WithSyncer(exporter)) | ||
|
|
||
| prevMP, prevTP := otel.GetMeterProvider(), otel.GetTracerProvider() | ||
| otel.SetMeterProvider(mp) |
There was a problem hiding this comment.
The first calls to otel.SetMeterProvider and otel.SetTracerProvider make the original default providers forward to these test providers. Restoring the saved providers in t.Cleanup leaves that forwarding in place, so later tests can still send telemetry to this test’s reader and exporter. Could we isolate the global provider setup in a subprocess?
Signed-off-by: RajPrakash681 <rjnt452@gmail.com>
6ef4596 to
183f26c
Compare
Fixes #9605
Proposed Changes
http.server.request.durationand the HTTP body-size histograms, with one server span. Before, their handler was wrapped with otelhttp twice, so the requests it handled were counted twice.otel.NewHandlerbecomesotel.HandlerOptions: the meter and tracer providers and the span name formatter now go througheventingtls.NewServerManagerto the otelhttp handler that the receiver already creates.Pre-review Checklist
Release Note
Docs
None needed.