-
Notifications
You must be signed in to change notification settings - Fork 417
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 OStreamSpanExporter #183
Conversation
Tests build and pass when running locally and in docker container but fail in this CI jobs, looking into it |
Renamed to OStreamSpanExporter. Also added setting the TraceID / SpanID in tests so the tests do not break when IDs begin to be randomly generated. This is rebased with master as well |
exporters/ostream/include/opentelemetry/exporters/ostream/span_exporter.h
Outdated
Show resolved
Hide resolved
exporters/ostream/include/opentelemetry/exporters/ostream/span_exporter.h
Outdated
Show resolved
Hide resolved
exporters/ostream/include/opentelemetry/exporters/ostream/span_exporter.h
Outdated
Show resolved
Hide resolved
exporters/ostream/include/opentelemetry/exporters/ostream/span_exporter.h
Outdated
Show resolved
Hide resolved
exporters/ostream/include/opentelemetry/exporters/ostream/span_exporter.h
Outdated
Show resolved
Hide resolved
exporters/ostream/include/opentelemetry/exporters/ostream/span_exporter.h
Outdated
Show resolved
Hide resolved
exporters/ostream/include/opentelemetry/exporters/ostream/span_exporter.h
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please find my comments.
Thanks for the feedback @reyang let me know if I missed anything |
void printAttributes(std::unordered_map<std::string, sdktrace::SpanDataAttributeValue> map) | ||
{ | ||
int size = map.size(); | ||
int num = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
num
is a confusing name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to i. This branch is merged this master already
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor suggestions.
Design document can be found here |
This PR implements the span half of the StreamExporter described in issue (#89). This exporter will not be used in production code, but rather in explorations or examples. This SpanExporter takes data in from the SpanProcessor in the form of recordables. The exporter then takes the recordables and gets all of the relevant data out of it and sends it to an ostream. The default configuration is to send the recordable data to stdout. The StreamMetricsExporter will be included in a future PR.
This PR includes tests for cout, cerr and clog as well as the shutdown function.
This PR also replaces the stub stdout_exporter in the simple tracing example (#86)