opentelemetry-rust icon indicating copy to clipboard operation
opentelemetry-rust copied to clipboard

[Feature]: OTLP File Exporter

Open joshwlewis opened this issue 10 months ago • 4 comments

Related Problems?

Prior to #2040, the opentelemetry-stdout crate was able to export in a format compatible with the OTLP File Exporter specification here. Passing in a file as the writer allowed the exporter to export to a file, and the default JSON serializer was compatible with the spec (example setup here). Since #2040, a writer can no longer be passed in, and the format is not JSON.

Describe the solution you'd like:

I'd love to see a FileExporter that complies with https://opentelemetry.io/docs/specs/otel/protocol/file-exporter.

Considered Alternatives

No response

Additional Context

There is some discussion here about whether this functionality is strictly required for SDKs.

I may have to roll my own OTLP File Exporter soon. I could potentially contribute it back to this library if desired.

joshwlewis avatar Feb 04 '25 15:02 joshwlewis

Happy to host it in the contrib repo. (Or even this repo.) Feel free to send a PR.

cijothomas avatar Feb 04 '25 16:02 cijothomas

@joshwlewis hi, are you actively working on this?

berkus avatar Feb 25 '25 16:02 berkus

@berkus, no I'm not working on it at the moment. I have aspirations to do it, but haven't found the bandwidth just yet. Feel free to tackle it if you want. If it's of interest or help, I did roll my own (for traces only): https://github.com/heroku/libcnb.rs/blob/108faf180d8368011eae62c0fc5acc28b8d8119a/libcnb/src/tracing.rs#L126-L176

joshwlewis avatar Feb 26 '25 22:02 joshwlewis

@joshwlewis got it, thank you for the update!

berkus avatar Feb 27 '25 12:02 berkus