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 6 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 78.55%. Comparing base (e766187) to head (4b55bb8).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1244      +/-   ##
==========================================
+ Coverage   78.35%   78.55%   +0.20%     
==========================================
  Files         145      147       +2     
  Lines       14639    14743     +104     
==========================================
+ Hits        11470    11581     +111     
+ Misses       2570     2561       -9     
- Partials      599      601       +2     
Flag Coverage Δ
k8s-integration-test 59.99% <100.00%> (+0.39%) ⬆️
oats-test 34.19% <100.00%> (-0.16%) ⬇️
unittests 51.91% <100.00%> (-0.24%) ⬇️

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