Skip to content

feat: add span processor benchmarks #2980

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

Conversation

paullegranddc
Copy link
Contributor

Adds a benchmark creating a span and dropping it, without an exporter.
The goal is to estimate the cost of the SDK creating, dropping spans and passing them to the span processors.

This benchmark gives the following results. As it can be seen, the cost of processing span grows almost linearly with the

  Chip:	Apple M1 Max
  Total Number of Cores:	10 (8 performance and 2 efficiency)
SpanProcessorApi/0_processors
    time:   [339.66 ns 340.56 ns 341.47 ns]
SpanProcessorApi/1_processors
    time:   [373.10 ns 374.36 ns 375.60 ns]
SpanProcessorApi/2_processors
    time:   [803.10 ns 804.99 ns 807.03 ns]
SpanProcessorApi/4_processors
    time:   [1.2096 µs 1.2137 µs 1.2179 µs]

Fixes #
Design discussion issue (if applicable) #

Changes

Please provide a brief description of the changes here.

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)

Adds a benchmark creating a span and dropping it, without an exporter.

The goal is to estimate the cost of the SDK running without the exporter
@paullegranddc
Copy link
Contributor Author

paullegranddc commented May 20, 2025

The benchmark in this PR has been pulled into #2962

Copy link

codecov bot commented May 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.3%. Comparing base (8499914) to head (6049ffb).

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2980   +/-   ##
=====================================
  Coverage   81.3%   81.3%           
=====================================
  Files        126     126           
  Lines      24375   24375           
=====================================
  Hits       19827   19827           
  Misses      4548    4548           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant