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

inject labels #63

Merged
merged 7 commits into from Jul 9, 2020
Merged

inject labels #63

merged 7 commits into from Jul 9, 2020

Conversation

YANYZP
Copy link
Contributor

@YANYZP YANYZP commented Jul 6, 2020

Put the logic of injecting labels into span in the trace_proto.go because

  1. The semantic of injecting labels is on the level of building spans, not implementing trace exporter.
  2. func protoFromSpanData would be used by both func ExportSpan() and func ExportSpans() in trace.go. It would have duplicate callings if we put the code in trace.go or cloudtrace.go.

@YANYZP
Copy link
Contributor Author

YANYZP commented Jul 6, 2020

Tested it by client.go on GCE and got non-duplicate results

Copy link
Contributor

@nilebox nilebox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the comment about keys in the unique set.
Also, would be nice to add a unit test confirming that the code behaves as expected.

exporter/trace/trace_proto.go Outdated Show resolved Hide resolved
exporter/trace/trace_proto.go Outdated Show resolved Hide resolved
@YANYZP
Copy link
Contributor Author

YANYZP commented Jul 8, 2020

Ready for final review

@nilebox nilebox merged commit 7e69963 into GoogleCloudPlatform:master Jul 9, 2020
@nilebox
Copy link
Contributor

nilebox commented Jul 9, 2020

@YANYZP Could you please send a separate PR with unit tests for this code?

@YANYZP
Copy link
Contributor Author

YANYZP commented Jul 9, 2020

Could you please send a separate PR with unit tests for this code?

Sure, will do.

@YANYZP YANYZP mentioned this pull request Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants