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

Clarity on OTEL_BSP_SCHEDULE_DELAY usage / meaning #7059

Closed
JDUNNIN opened this issue Jan 30, 2025 · 3 comments
Closed

Clarity on OTEL_BSP_SCHEDULE_DELAY usage / meaning #7059

JDUNNIN opened this issue Jan 30, 2025 · 3 comments

Comments

@JDUNNIN
Copy link

JDUNNIN commented Jan 30, 2025

I've been trying to understand the usage of OTEL_BSP_SCHEDULE_DELAY from reading the documentation here which describes it as:

Delay interval (in milliseconds) between two consecutive exports

Also looking at the BatchSpanProcessor.java code in conjunction.

From the text alone I'm not clear on the expected behaviour.

One option is that when an export takes place, the BatchSpanProcessor would then wait OTEL_BSP_SCHEDULE_DELAY time, before then exporting the next batch. If that is correct at all, is an "export" considered as the whole queue size divided into OTEL_BSP_MAX_EXPORT_BATCH_SIZE chunks (+ the remainder) all being sent in separate requests?

I suppose part of my question is about understanding exactly what an "export" consists of i.e. Is it sending one batch of spans or sending all the queued spans in chunks of OTEL_BSP_MAX_EXPORT_BATCH_SIZE?

The alternative is that each OTEL_BSP_MAX_EXPORT_BATCH_SIZE chunk of spans is sent as soon as that many spans are available and that OTEL_BSP_SCHEDULE_DELAY is actually a max wait time between exports, for the rare case that the queue size is smaller than OTEL_BSP_MAX_EXPORT_BATCH_SIZE at the end of OTEL_BSP_SCHEDULE_DELAY.

Any clarification would be greatly appreciated thanks!

@trask
Copy link
Member

trask commented Jan 30, 2025

The alternative is that each OTEL_BSP_MAX_EXPORT_BATCH_SIZE chunk of spans is sent as soon as that many spans are available and that OTEL_BSP_SCHEDULE_DELAY is actually a max wait time between exports, for the rare case that the queue size is smaller than OTEL_BSP_MAX_EXPORT_BATCH_SIZE at the end of OTEL_BSP_SCHEDULE_DELAY.

this is correct

@breedx-splk
Copy link
Contributor

Agree with @trask that your assessment is correct. Please feel free to reopen if you have more questions or would like to discuss further.

@JDUNNIN
Copy link
Author

JDUNNIN commented Feb 3, 2025

Thank you for confirming behaviour 👍

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

No branches or pull requests

3 participants