-
Notifications
You must be signed in to change notification settings - Fork 521
Add JSON support to OStreamSpanExporter #1111
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
Add JSON support to OStreamSpanExporter #1111
Conversation
|
Thanks for taking up this item. A couple of points, we can discuss if they don't make sense:
|
|
Thanks for your contribution. |
|
@deejgregor - Do you have any updates here. Thanks. |
621fb05 to
5e55a5b
Compare
Ah, yes. For some reason, I thought
+1. That will be a nicer way to go @lalitb thanks for your comments above, and after (finally) poking around a bit and understanding more, I think it makes sense to do both of these. |
@esigo I agree about not adding complexity to OStreamSpanExporter and I'll make a new exporter. What do you think about having the JSON exporter in the main repo, though, instead of contrib as you suggest? On one hand, its only dependency is nlohmann_json which is already used by other exporters in the main repo. On the other hand, since this exporter won't be abled by default since nlohmann_json isn't a base requirement, I'm not sure if this exporter will get much use, so maybe the contrib repo is the better place for it. Frankly, as I've finally started using a real exporter to Jaeger, my own need for a JSON exporter for testing is pretty much gone. I'm starting to wonder how much use a JSON exporter will be for others.... in particular, is this useful to contribute back at all, regardless of which repo it goes in? Curious on your thoughts (and anyone else's). |
Fixes #202.
Changes
I modeled this change on the Python implementation of ReadableSpan.to_json().
Right now, this only contains support for OStreamSpanExporter, but I'll see if I can add support for the other OStream exporters when I'm on end of year break. Any feedback on my approach in the meantime would be helpful before I do the other exporters. I'll also note that I'm barely familiar with C++, so please don't hesitate to point out even minor issues.
TODO
Complete handling of all
OwnedAttributeValuevariants inPopulateAttribute.Support JSON for
OStreamLogExporterandOStreamMetricsExporter.Any other refactoring opportunities?
CHANGELOG.mdupdated for non-trivial changesUnit tests have been added
Changes in public API reviewed