Skip to content

[Exporter] Add OTLP File Exporter for Traces #7230

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

Open
ashish159357 opened this issue Mar 31, 2025 · 3 comments
Open

[Exporter] Add OTLP File Exporter for Traces #7230

ashish159357 opened this issue Mar 31, 2025 · 3 comments
Labels
Feature Request Suggest an idea for this project

Comments

@ashish159357
Copy link

Problem :
Many existing systems use technologies like ZeroMQ (ZMQ), Kafka, RabbitMQ, etc., for data communication. However, to export traces from the OpenTelemetry Java Agent to such systems, developers must implement HTTP/gRPC support in their infrastructure, either to receive traces directly from the agent or via the OpenTelemetry Collector.

This requirement adds unnecessary complexity for developers who prefer using their own transport mechanisms.

Solution :
The OpenTelemetry Java Agent supported an exporter that writes traces to a file in OTLP format, developers would gain greater flexibility. They could then build a custom utility to read traces from the file and forward them using their preferred tech stack—without modifying their backend to support HTTP/gRPC.

This exporter enables them to:

  • Write traces to a file in OTLP format.

  • Build a custom utility to read traces from the file and forward them to their backend using their preferred tech stack.

  • Fully customize their utility and backend while leveraging OpenTelemetry's protobuf library for trace processing.

@ashish159357 ashish159357 added the Feature Request Suggest an idea for this project label Mar 31, 2025
@jack-berg
Copy link
Member

Check out OtlpStdout{Signal}Exporters. They export spans / metrics / logs to a configurable OutputStream (defaults to stdout, but could be a rotating file output stream if you're willing to write some custom code). These are the java implementation of the OTLP file exporter from the spec.

The contents are meant to be read by collector's OTLP JSON file reciever.

This blog post details a concrete example of this.

@ashish159357
Copy link
Author

for writing traces in protobuf format I have to write code.

@jack-berg
Copy link
Member

@jack-berg jack-berg added needs author feedback Waiting for additional feedback from the author and removed needs author feedback Waiting for additional feedback from the author labels Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Suggest an idea for this project
Projects
None yet
Development

No branches or pull requests

2 participants