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

Send span links to Cloud Trace #178

Merged
merged 3 commits into from
Jul 7, 2021
Merged

Conversation

aabmass
Copy link
Contributor

@aabmass aabmass commented Jul 1, 2021

Fixes #176

@aabmass aabmass marked this pull request as ready for review July 1, 2021 22:22
@aabmass aabmass requested a review from a team July 1, 2021 22:23
Copy link
Contributor

@dashpole dashpole left a comment

Choose a reason for hiding this comment

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

Looks good overall.

@@ -178,11 +180,36 @@ func protoFromReadOnlySpan(s sdktrace.ReadOnlySpan, defaultTraceAttributes []att
sp.TimeEvents.DroppedAnnotationsCount = clip32(droppedAnnotationsCount)
}

// TODO(ymotongpoo): add implementations for Links
sp.Links = linksProtoFromLinks(s.Links())
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sp.Links = linksProtoFromLinks(s.Links())
spanLinks := s.Links()
numLinks := len(spanLinks)
numLinksToKeep := numLinks
if numLinksToKeep > maxNumLinks {
numLinksToKeep = maxNumLinks
}
sp.Links = linksProtoFromLinks(spanLinks[:numLinksToKeep])
sp.Links.DroppedLinksCount = clip32(numLinks - numLinksToKeep)

exporter/trace/trace_proto.go Outdated Show resolved Hide resolved
@aabmass aabmass merged commit e3dd96d into GoogleCloudPlatform:main Jul 7, 2021
@aabmass aabmass deleted the links branch July 7, 2021 18:03
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.

Implement links in trace exporter
5 participants