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

feat: Add new span attributes to more closely match OTel spec #1976

Merged
merged 7 commits into from
Oct 20, 2023

Conversation

chynesNR
Copy link
Member

This was trickier than first expected for a few reasons:

  • For database calls, we want the port, but what we store is the "port, path, or ID" and we don't record which it is. I had to split out the port at creation time.
  • The "known values" for database providers that OTel uses are close to, but not exactly the same as, the ones we use
  • The request for managed Thread ID doesn't really align with the way .NET handles async work. For now at least, we'll only provide the Thread ID if all Segments occur on the same thread.
  • Both database calls and HTTP requests now have server.address and server.port attributes, but they're optional for database calls (making them Agent attributes) and required for HTTP requests (making them Intrinsic attributes)

Resolves #1942

Author Checklist

  • Unit tests, Integration tests, and Unbounded tests completed
  • Performance testing completed with satisfactory results (if required)

Reviewer Checklist

  • Perform code review
  • Pull request was adequately tested (new/existing tests, performance tests)

Copy link
Member

@tippmar-nr tippmar-nr left a comment

Choose a reason for hiding this comment

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

Looks good!

@codecov-commenter
Copy link

codecov-commenter commented Oct 13, 2023

Codecov Report

Merging #1976 (f1f3232) into main (651386c) will increase coverage by 0.08%.
Report is 23 commits behind head on main.
The diff coverage is 91.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1976      +/-   ##
==========================================
+ Coverage   83.52%   83.60%   +0.08%     
==========================================
  Files         402      402              
  Lines       24593    24728     +135     
==========================================
+ Hits        20541    20675     +134     
- Misses       4052     4053       +1     
Files Coverage Δ
...gent/Core/Attributes/AttributeDefinitionService.cs 95.15% <100.00%> (+0.21%) ⬆️
...ewRelic/Agent/Core/Segments/ExternalSegmentData.cs 98.33% <100.00%> (+0.05%) ⬆️
src/Agent/NewRelic/Agent/Core/Segments/Segment.cs 93.56% <100.00%> (+0.14%) ⬆️
...nt/NewRelic/Agent/Core/Transactions/Transaction.cs 82.30% <100.00%> (ø)
...gent/NewRelic/Agent/Core/Wrapper/WrapperService.cs 75.88% <100.00%> (ø)
...wRelic.Agent.Extensions/Parsing/IConnectionInfo.cs 100.00% <100.00%> (ø)
...c.Agent.Extensions/Providers/Wrapper/MethodCall.cs 100.00% <100.00%> (ø)
...arsing/ConnectionString/IConnectionStringParser.cs 94.73% <100.00%> (ø)
...g/ConnectionString/IbmDb2ConnectionStringParser.cs 96.15% <100.00%> (ø)
...ng/ConnectionString/MsSqlConnectionStringParser.cs 84.74% <100.00%> (ø)
... and 7 more

... and 6 files with indirect coverage changes

@chynesNR chynesNR merged commit 9500d4d into main Oct 20, 2023
67 checks passed
@chynesNR chynesNR deleted the feature/otel-span-attributes branch October 20, 2023 15:44
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.

Add Span attributes to move closer to OTel spec
4 participants