Skip to content

Log exporter (or unbuffered output) for OTEL instrumentation #27362

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

Closed
maxmcd opened this issue Dec 13, 2024 · 2 comments
Closed

Log exporter (or unbuffered output) for OTEL instrumentation #27362

maxmcd opened this issue Dec 13, 2024 · 2 comments
Labels
otel suggestion suggestions for new features (yet to be agreed)

Comments

@maxmcd
Copy link

maxmcd commented Dec 13, 2024

related to: #26852

The new OTEL instrumentation (which is awesome btw), provides an opportunity to get log/request/metric information from the Deno process. There are some instances where I'd want to use this to get a live stream of log data from a running deno program. The only issue with the current setup is that it buffers up otel events every 1s.

At @val-town we patch the console object to capture granular log information in the Deno process and this has been quite messy. If there was a way to hook into the unbuffered stream of otel information we'd have a robust way to capture logs and server traces. We're sensitive to latency (people are waiting for logs to stream back), so the 1s delay means we can't migrate atm. Any thoughts on how we might get access to an unbuffered stream?

I believe adding the option to set the LogExporter for each telemetry type would print the unbuffered output to stdout.

Thanks!

@bartlomieju bartlomieju added suggestion suggestions for new features (yet to be agreed) otel labels Dec 13, 2024
@maxmcd maxmcd changed the title Console exporter (or unbuffered output) for OTEL instrumentation Log exporter (or unbuffered output) for OTEL instrumentation Dec 13, 2024
@lucacasonato
Copy link
Member

You can configure buffering with OTEL_BLRP_SCHEDULE_DELAY, OTEL_BLRP_EXPORT_TIMEOUT, OTEL_BLRP_MAX_QUEUE_SIZE, and OTEL_BLRP_MAX_EXPORT_BATCH_SIZE. Probably setting OTEL_BLRP_SCHEDULE_DELAY=1 or OTEL_BLRP_MAX_EXPORT_BATCH_SIZE=1 should work?

Do note that this will degrade performance very significantly

@maxmcd
Copy link
Author

maxmcd commented Dec 18, 2024

Ah nice, thank you.

edit:

I ended up configuring:

OTEL_BLRP_SCHEDULE_DELAY: "100",
OTEL_BSP_SCHEDULE_DELAY: "100",

@maxmcd maxmcd closed this as completed Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
otel suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

No branches or pull requests

3 participants