-
Notifications
You must be signed in to change notification settings - Fork 835
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
OtlpJsonLoggingSpanExporter
doesn't respect the File Exporter format
#6749
Comments
I think OtlpJsonLoggingSpanExporter is not relate with the File Exporter in Specification.
|
Thanks for the explanation. Is there an alternative in opentelemetry-java to write traces to a FileExporter-compliant JSON lines file? I'm writing a JVM-based CLI application and would like to append spans to a JSON lines file for consumption with local tools (like Jaeger UI). |
I do not found an alternative. maybe you can implement a exporter or setup a collector |
I face the same problem with logs emitted by the |
Closing as this is resolved with the new OTLP stdout exporters: Available for reference in |
Apparently the
Basically, the file looks like this: {"resourceSpans":[...]}{"resourceSpans":[...]} Instead of: {"resourceSpans":[...]}
{"resourceSpans":[...]} |
@joffrey-bion, I faced the same problem with I think @zeitlinger fixed this in @zeitlinger 's PR is merged and should be released in otel-java v1.44.0 something like next week and soon after in the otel-java-instrumentation agent v2.10.0. |
Describe the bug
The log files produced by
OtlpJsonLoggingSpanExporter
contain JSON lines, but each line is missing the{ "resourceSpans": [ ... ] }
wrapper described here:https://opentelemetry.io/docs/specs/otel/protocol/file-exporter/#examples
Steps to reproduce
Use this kind of configuration:
And check the output files after producing some spans.
What did you expect to see?
A file that looks like the examples in the specification:
What did you see instead?
A file containing directly the object with the
"resource"
key on each line:What version and what artifacts are you using?
Artifacts:
Version: 1.42.1
How did you reference these artifacts? (excerpt from your
build.gradle
,pom.xml
, etc) My Gradle catalog:Environment
Compiler: Corretto 21
OS: Windows
Additional context
This is a CLI application exporting telemetry in log files (for which JSON lines are important), and visualization is done in Jaeger UI after the fact.
The text was updated successfully, but these errors were encountered: