-
Notifications
You must be signed in to change notification settings - Fork 764
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 Telemetry Console Exporter Json output #5588
Conversation
I definitely think some options/levers are going to be needed.
So my question is really which scenario is this for? Does this really fix/resolve the issue? |
ConsoleExporter is explicitly not recommended for production scenarios. There is no spec written for ensuring consistent output. And yes, performance is another concern. For scraping the stdout, a better option is to use collector, and have it output to stdout. |
Can you share couple of screenshots of the new behavior as well? |
Is this JSON format the same as the proto JSON format or a custom one? https://opentelemetry.io/docs/specs/otlp/#json-protobuf-encoding |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5588 +/- ##
==========================================
+ Coverage 83.38% 85.85% +2.47%
==========================================
Files 297 265 -32
Lines 12531 11321 -1210
==========================================
- Hits 10449 9720 -729
+ Misses 2082 1601 -481
Flags with carried forward coverage won't be shown. Click here to find out more.
|
It is not the proto json format is it just a serialized Activity |
@meijeran Could you reply to the above comment? We are trying to see the issues attempted to be resolved with this PR, so as to better review/guide! |
@cijothomas Great questions! The main reason I started this change is because of issue #5036 and some comments from this discussion. There were a few requests to standardize the console output, so this proposal is just an idea to see if we can make that work. If the goal is to scrape this data, I think having a dedicated exporter in contrib would be the way to go instead of relying on this. But I'm also curious why the other exporter options aren't enough for that. So, to answer your question, I'm not entirely sure if this fixes the issue completely, but it's something people have been asking for. Would love to hear more thoughts on this! |
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
Is it still worth to continue on this? Happy to help or figuring out to way to make this work |
I think yes, definitely something we want to improve. My suggestion: @meijeran would you clarify the goal here? I think it will be either 1) improving the readability of the stdout exporter or 2) supporting OTLP JSON file (including stdout) exporter for better interoperability. Once the goal is clear, depending on which one you want to tackle, I have different suggestions:
|
Goal 2) for us. The use case is: we are running apps on k8s. They are logging single line json (the standard dotnet log format/content) to stdout that is being tailed and shipped by promtail/grafana-agent/alloy. We now want to change the format to OTEL compliant logs without changing the sipping mechanism, i.e. keep the k8s stdout approach. |
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
@meijeran |
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
In case anyone find themselves here, I published this nuget package just to print the telemetry data in json format ozkanpakdil/opentelemetry-json-console-exporter#1 https://www.nuget.org/packages/Ozkanpakdil.OpenTelemetry.Exporter.Json.Console very easy to configure, check the readme |
Fixes #5036
Design discussion issue #
Changes
Please provide a brief description of the changes here.
This is an attempt to solve #5036, I switched the current output to a json variant.
I am not sure if we want to keep the original output as well and add the json variant as an extra option. According the comments in #4548 only one output format is highly favored.
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes