Skip to content
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

Merged
merged 44 commits into from
Jul 21, 2020
Merged

Conversation

HudsonHumphries
Copy link
Member

@HudsonHumphries HudsonHumphries commented Jul 16, 2020

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)

@HudsonHumphries HudsonHumphries requested a review from a team July 16, 2020 16:19
@HudsonHumphries
Copy link
Member Author

Tests build and pass when running locally and in docker container but fail in this CI jobs, looking into it

@HudsonHumphries
Copy link
Member Author

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

@HudsonHumphries HudsonHumphries changed the title Add StreamSpanExporter Add OStreamSpanExporter Jul 21, 2020
Copy link
Member

@reyang reyang left a 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.

@HudsonHumphries
Copy link
Member Author

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;
Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member

@reyang reyang left a 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.

@reyang reyang added the pr:please-merge This PR is ready to be merged by a Maintainer (rebased, CI passed, has enough valid approvals, etc.) label Jul 21, 2020
@reyang reyang merged commit a815620 into open-telemetry:master Jul 21, 2020
@reyang
Copy link
Member

reyang commented Jul 21, 2020

#167

@HudsonHumphries
Copy link
Member Author

Design document can be found here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:please-merge This PR is ready to be merged by a Maintainer (rebased, CI passed, has enough valid approvals, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants