Skip to content

Conversation

@damemi
Copy link
Member

@damemi damemi commented Apr 18, 2024

Fixes #169

This does the following:

  • Sets span.Status for 4xx and 5xx codes in Client, and just 5xx codes in Server
  • Sets protocol.name when the protocol is not HTTP for both Client and Server
  • Generates a url.full attribute from the protocol+host+path for Client
  • Adds Probe tests to Client and Server instrumentation for changes
  • Adds a new opentelemetry/controller_test.go to check that the output gets exported as expected
  • Updates fixtures for HTTP and Gin to show new url.full field

This PR adds changes to the net/http eBPF instrumentation to copy the full set of fields from the *net/url.URL object in the Request to reconstruct a url.full attribute. It copies each field individually because the object is a pointer to an address in user space which would not be accessible by the auto-instrumentation agent. The agent reconstructs the Go URL object so that it can call url.String(), which uses logic and control flags in the original object to build the string representation (rather than building the string manually in the eBPF program).

@damemi damemi requested a review from a team April 18, 2024 16:48
Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

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

Overall looks good. Just the full URL and semconv versioning look like the only items that need to be addressed.

@damemi damemi force-pushed the issue-169 branch 3 times, most recently from 3352728 to 3401852 Compare May 6, 2024 17:43
@damemi
Copy link
Member Author

damemi commented May 6, 2024

I think test failure is unrelated and fixed by #820

@MrAlias
Copy link
Contributor

MrAlias commented May 8, 2024

@RonFed @grcevski please take another look at this and leave a review.

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!

Copy link
Contributor

@RonFed RonFed left a comment

Choose a reason for hiding this comment

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

Added a comment about the Makefile change, other than that looks great.

@MrAlias MrAlias added this to the v0.12.0-alpha milestone May 14, 2024
@damemi
Copy link
Member Author

damemi commented May 14, 2024

ready to merge @MrAlias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

Audit and update net/http instrumentation to comply with HTTP semantic conventions

4 participants