Skip to content
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

Fix span name for HTTPClient calls #1244

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

marctc
Copy link
Contributor

@marctc marctc commented Oct 9, 2024

We are generating metrics like:

traces_spanmetrics_latency_count{source="beyla",span_kind="SPAN_KIND_CLIENT",span_name="GET",status_code="0"} 390

missing the route information in span name. This PR fixes this issue

@marctc marctc marked this pull request as ready for review October 9, 2024 15:44
@codecov-commenter
Copy link

codecov-commenter commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 34.10%. Comparing base (e766187) to head (f4c2ca6).
Report is 10 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (e766187) and HEAD (f4c2ca6). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (e766187) HEAD (f4c2ca6)
unittests 1 0
k8s-integration-test 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1244       +/-   ##
===========================================
- Coverage   78.35%   34.10%   -44.25%     
===========================================
  Files         145      142        -3     
  Lines       14639    14560       -79     
===========================================
- Hits        11470     4966     -6504     
- Misses       2570     9152     +6582     
+ Partials      599      442      -157     
Flag Coverage Δ
k8s-integration-test ?
oats-test 34.10% <100.00%> (-0.25%) ⬇️
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I guess we may need to adjust bunch of tests for this to pass.

@@ -752,7 +752,7 @@ func testNestedHTTPTracesKProbes(t *testing.T) {

// Check the information of the java parent span
res = trace.FindByOperationName("GET /jtrace")
require.Len(t, res, 1)
require.Len(t, res, 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, I guess now multiple spans will match with the same URL path. I think we need to extend FindOperationByName to use an optional parameter which is the span kind and look for the server span. Otherwise many other tests will have an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants