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

[Trace SDK] Send resource once to processor and exporter, and not with every span #1830

Merged
merged 18 commits into from
May 30, 2024

Conversation

lalitb
Copy link
Member

@lalitb lalitb commented May 24, 2024

Fixes #1124

Changes

The changes were done earlier for Logs SDK in #1636 . Creating similar PR for Trace SDK.

Stress test: (~ 12% improvement)
before:

Number of threads: 16
Throughput: 9,432,600 iterations/sec
Throughput: 9,403,800 iterations/sec

after:

Number of threads: 16
Throughput: 11,028,400 iterations/sec
Throughput: 11,029,800 iterations/sec

Benchmarks: (~10% improvement):
start-end-span/always-sample:
before: 297.20, after: 269.55

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@lalitb lalitb requested a review from a team May 24, 2024 20:11
@lalitb lalitb added the integration tests Run integration tests label May 24, 2024
Copy link

codecov bot commented May 24, 2024

Codecov Report

Attention: Patch coverage is 58.22785% with 33 lines in your changes are missing coverage. Please review.

Project coverage is 74.4%. Comparing base (7cad751) to head (a39b460).
Report is 1 commits behind head on main.

Current head a39b460 differs from pull request most recent head fa1e527

Please upload reports for the commit fa1e527 to get more accurate results.

Files Patch % Lines
opentelemetry-stdout/src/trace/exporter.rs 0.0% 11 Missing ⚠️
opentelemetry-otlp/src/exporter/http/mod.rs 0.0% 10 Missing ⚠️
opentelemetry-stdout/src/trace/transform.rs 0.0% 7 Missing ⚠️
opentelemetry-otlp/src/exporter/http/trace.rs 0.0% 4 Missing ⚠️
opentelemetry-sdk/src/trace/span_processor.rs 93.3% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1830     +/-   ##
=======================================
- Coverage   74.4%   74.4%   -0.1%     
=======================================
  Files        122     122             
  Lines      19767   19807     +40     
=======================================
+ Hits       14723   14750     +27     
- Misses      5044    5057     +13     

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

Copy link
Contributor

@TommyCpp TommyCpp 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. Thanks

@cijothomas cijothomas merged commit 84c23a3 into open-telemetry:main May 30, 2024
19 of 20 checks passed
23Skidoo added a commit to primait/prima_tracing.rs that referenced this pull request Jul 22, 2024
AFAICT this is now needed because of open-telemetry/opentelemetry-rust#1830

(mentioned in https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-sdk/CHANGELOG.md#v0240)

Replacing install_batch with install_simple also works.
23Skidoo added a commit to primait/prima_tracing.rs that referenced this pull request Jul 23, 2024
AFAICT this is now needed because of open-telemetry/opentelemetry-rust#1830

(mentioned in https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-sdk/CHANGELOG.md#v0240)

Replacing install_batch with install_simple also works.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration tests Run integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance: send resource data to span processors once, not for every span when it ends
3 participants