Allow customising the exported batching interval · Issue #2005 · census-instrumentation/opencensus-java · GitHub
Skip to content
This repository was archived by the owner on Dec 23, 2023. It is now read-only.
This repository was archived by the owner on Dec 23, 2023. It is now read-only.

Allow customising the exported batching interval #2005

Open

Description

@glenjamin

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

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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions