Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Allow customising the exported batching interval #2005

Open
glenjamin opened this issue Jan 28, 2020 · 0 comments
Open

Allow customising the exported batching interval #2005

glenjamin opened this issue Jan 28, 2020 · 0 comments

Comments

@glenjamin
Copy link

Is your feature request related to a problem? If so, please describe it.

Currently, batching of reported span is handled by the SpanExporterImpl class, which is final and not customisable at runtime.

There is a hard-coded 5 second interval for batches being flushed

private static final Duration EXPORTER_SCHEDULE_DELAY = Duration.create(5, 0);

As we instrument more of our application, we find increasingly less need for traditional application logs.

However, when running tests or developing locally, it is desirable to have the trace spans appear on STDOUT in close to real time, having them batched moves them further way from the activity being performed.

This is especially annoying in tests, where the output from one test can end up leaking into another.

Describe the solution you'd like.

The ability to customise the batching interval, or disable batching altogether

Describe alternatives you've considered.

I tried using reflection to mess with the private member holding the span exporter, but was unable to construct a replacement because spanexporter is final.

Additional context.

Nothing I can think of.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant