-
Notifications
You must be signed in to change notification settings - Fork 825
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
Alternative format for console exporter? #3990
Comments
I'm pretty interested in a bring-your-own-formatter approach to the console exporter, and would happily contribute a PR. So approximately here, we might do something like: private _sendSpans(
spans: ReadableSpan[],
done?: (result: ExportResult) => void
): void {
// Could also do consoleExporter.export(spans);
for (const span of spans) {
consoleExporter.export((this._exportInfo(span)));
}
if (done) {
return done({ code: ExportResultCode.SUCCESS });
}
} I believe we could pass the formatter to the |
Mmm, yeah, that could be pretty great. And we could define a "custom" format as the default that we use if there's nothing used, but otherwise defer to one the user configures. |
Hmm, I'd rather have a specified format that we, as the JS SIG implement. 🤔 I think anything one could do with a custom formatter, one can also do by implementing the rather simple It could also allow people to misuse of the formatter to write a custom exporter. 😨 |
I think a lot of it comes down to preference, I wrote down my thoughts on it:
Yep, I think another reason that JSON was used is that it does not need extra dependencies to format, and it was quick and easy to do.
I think that would help, yes. 🙂
👍
This would highly depend on what's deemed necessary. As one is using the ConsoleExporter for troubleshooting, it could be very likely that the specific information you're trying to find is missing because it did not make the cut.
Yep, writing out strings for enum values instead of integers would definitely help. I run into that every time, then I have to look it up. 😅
Hmm, which ones are you thinking about? 🤔
Hmm, sometimes, one might want to troubleshoot resource detectors, so that's information that would help. Though it'd be great to know what users think about this. If they don't need it, It's probably fine to leave it out. 🤔
I like this though it seems very compact.
I like this one over 1; see reasoning about about resource attributes.
Not sure about this. Typing info might differ from language to language I'd assume. 🤔
I like this, probably also rather easy to implement.
I think I'd prefer the others over this one. I like having the span-numbering of the collector format to figure out when a new span begins. 🤔 |
Upon reflection, I think you're right - it's not particularly onerous to write your own |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was closed because it has been stale for 14 days with no activity. |
Related to: open-telemetry/opentelemetry-specification#3565
I'm curious how we might approach console output looking more readable for end-user local debugging scenarios.
Today, a span gets emitted looking (more or less) like this:
Some things that could improve perhaps:
Some ideas that come to mine for me are:
The text was updated successfully, but these errors were encountered: