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: batch span processor environment config #1755

Merged
merged 4 commits into from
Dec 23, 2020

Conversation

mwear
Copy link
Member

@mwear mwear commented Dec 17, 2020

Which problem is this PR solving?

Short description of the changes

  • This PR adds environment variable configuration to the batch span processor for two of the four environment variables defined in the spec: OTEL_BSP_SCHEDULE_DELAY_MILLIS and OTEL_BSP_MAX_EXPORT_BATCH_SIZE.
  • There are two additional environment variables defined in the spec that do not apply to the current JS BatchSpanProcessor implementation: OTEL_BSP_EXPORT_TIMEOUT_MILLIS and OTEL_BSP_MAX_QUEUE_SIZE. We don't enforce a max queue size, or a timeout on export. We can discuss whether or not we should, and if that work should be part of this PR or not.
  • The adopts the spec defaults of 512 spans per batch, and a delay of 5000ms, which is different than the previous values of 100 spans and 20000ms. With these changes we will send more spans, more frequently.

@mwear mwear added release:required-for-ga size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 17, 2020
@codecov
Copy link

codecov bot commented Dec 17, 2020

Codecov Report

Merging #1755 (afdb51a) into master (d77a8b9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1755   +/-   ##
=======================================
  Coverage   92.18%   92.18%           
=======================================
  Files         165      165           
  Lines        5594     5595    +1     
  Branches     1204     1206    +2     
=======================================
+ Hits         5157     5158    +1     
  Misses        437      437           
Impacted Files Coverage Δ
...ckages/opentelemetry-core/src/utils/environment.ts 87.23% <ø> (ø)
...telemetry-tracing/src/export/BatchSpanProcessor.ts 90.90% <100.00%> (+0.13%) ⬆️

@mwear mwear added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 17, 2020
@dyladan dyladan added the enhancement New feature or request label Dec 22, 2020
@dyladan dyladan merged commit 392c43f into open-telemetry:master Dec 23, 2020
pichlermarc pushed a commit to dynatrace-oss-contrib/opentelemetry-js that referenced this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Batch Span Processor environment config
3 participants