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 thread.id attribute to Spans #1513

Merged
merged 3 commits into from
Sep 25, 2023
Merged

feat: add thread.id attribute to Spans #1513

merged 3 commits into from
Sep 25, 2023

Conversation

sdaubin
Copy link
Contributor

@sdaubin sdaubin commented Sep 19, 2023

Overview

Knowing the thread id of different spans allows the UI to accurately calculate the exclusive time of segments. thread.id is a standard OTel attribute and they recommend that it be reported for all spans.

https://opentelemetry.io/docs/specs/otel/trace/semantic_conventions/span-general/

Attribute Type Description Examples Requirement Level
thread.id int Current “managed” thread ID (as opposed to OS thread ID). 42 Recommended

Related Github Issue

Include a link to the related GitHub issue, if applicable

Testing

The agent includes a suite of tests which should be used to
verify your changes don't break existing functionality. These tests will run with
Github Actions when a pull request is made. More details on running the tests locally can be found
here,

Checks

[ ] Are your contributions backwards compatible with relevant frameworks and APIs?
[ ] Does your code contain any breaking changes? Please describe.
[ ] Does your code introduce any new dependencies? Please describe.

@codecov-commenter
Copy link

Codecov Report

Merging #1513 (26b4b1d) into main (2c20813) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##               main    #1513   +/-   ##
=========================================
  Coverage     70.60%   70.60%           
- Complexity     9744     9747    +3     
=========================================
  Files           813      813           
  Lines         39264    39268    +4     
  Branches       5962     5963    +1     
=========================================
+ Hits          27722    27727    +5     
+ Misses         8857     8854    -3     
- Partials       2685     2687    +2     
Files Coverage Δ
.../com/newrelic/agent/attributes/AttributeNames.java 0.00% <ø> (ø)
...elic/agent/service/analytics/SpanEventFactory.java 88.19% <100.00%> (+0.22%) ⬆️
...java/com/newrelic/agent/tracers/DefaultTracer.java 59.39% <100.00%> (+0.11%) ⬆️

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@meiao meiao merged commit b50676a into main Sep 25, 2023
102 checks passed
@meiao meiao deleted the sdaubin/span-thread-id branch September 25, 2023 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants