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

fix zipkinv2 translation error tag handling #2253

Merged

Conversation

ericmustin
Copy link
Contributor

Description:

This PR addresses #2214 and, by extension, open-telemetry/opentelemetry-collector-contrib#1644. ZipkinV2 internal translation was not taking into account the error tag. As mentioned in this Specification PR open-telemetry/opentelemetry-specification#1257, and confirmed by @owais , any presence of the error tag should be used to indicate a span status of Error and is also overriding on any other tag that denotes status for zipkin

Link to tracking Issue:

#2214

Testing:

Added a unit test to current zipkin translation tests

@ericmustin ericmustin requested a review from a team as a code owner December 4, 2020 14:27
@project-bot project-bot bot added this to In progress in Collector Dec 4, 2020
@ericmustin
Copy link
Contributor Author

hm, oddly seeing this error

go test ./... in ./exporter/alibabacloudlogserviceexporter
# github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter [github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter.test]
./tracedata_to_logservice.go:143:18: span.Status().IsNil undefined (type pdata.SpanStatus has no field or method IsNil)
FAIL	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter [build failed]
FAIL

Is that expected? I know some work around isNil has recently been done

@@ -164,6 +164,11 @@ func populateSpanStatus(tags map[string]string, status pdata.SpanStatus) {
delete(tags, tracetranslator.TagStatusMsg)
}
}

if _, ok := tags[tracetranslator.TagError]; ok {
Copy link
Member

Choose a reason for hiding this comment

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

does the value matter? true or false?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@bogdandrutu
Copy link
Member

Ignore the issue in the contrib tests, I sent open-telemetry/opentelemetry-collector-contrib#1757 to fix contrib

@codecov
Copy link

codecov bot commented Dec 12, 2020

Codecov Report

Merging #2253 (8a00493) into master (a16c599) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2253   +/-   ##
=======================================
  Coverage   92.05%   92.05%           
=======================================
  Files         272      272           
  Lines       15311    15326   +15     
=======================================
+ Hits        14094    14109   +15     
  Misses        837      837           
  Partials      380      380           
Impacted Files Coverage Δ
translator/trace/zipkin/zipkinv2_to_traces.go 89.95% <100.00%> (+0.16%) ⬆️
internal/data/spanid.go 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a16c599...8a00493. Read the comment docs.

@ericmustin
Copy link
Contributor Author

@bogdandrutu failing test looks unrelated to this PR fwiw

@ericmustin
Copy link
Contributor Author

@bogdandrutu would've been nice to see this get iincluded in v0.17 ...anything i can help with here?

@tigrannajaryan
Copy link
Member

@ericmustin v0.17 was released yesterday. @bogdandrutu OK to merge this?

@ericmustin
Copy link
Contributor Author

@bogdandrutu lmk if anything else needed here to merge, i believe this is relevant to some end users onboarding with otel so would love to be able to fit into next release 🙇

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Dec 27, 2020
@ericmustin
Copy link
Contributor Author

@bogdandrutu it's been 9 days so a bit concerned this may fall thru the cracks, just a friendly ping here, this is blocking an end user so would love to be able to see this get in for the next release to help with adoption.

@carlosalberto
Copy link
Contributor

@ericmustin Most of the OTel community is on break, so I would expect a review from Monday, January 4th (around that date people will start to come back). That also means no releases during the next days.

Other than that, let's definitely get an early review by then. cc @tigrannajaryan

@github-actions github-actions bot removed the Stale label Dec 28, 2020
@@ -128,3 +143,23 @@ func generateTraceSingleSpanMinmalResource() pdata.Traces {
rsc.Attributes().UpsertString(conventions.AttributeServiceName, "SoleAttr")
return td
}

func generateTraceSingleSpanErrorStatus() pdata.Traces {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a nit but perhaps generateTraceOneSpanOneTraceID (or just testdata.GenerateTraceDataOneSpan) could be reused to make this even simpler?

Collector automation moved this from In progress to Reviewer approved Jan 4, 2021
Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

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

LGTM, just waiting for @bogdandrutu to make sure he does not have any further comments.

@bogdandrutu bogdandrutu merged commit b229230 into open-telemetry:master Jan 4, 2021
Collector automation moved this from Reviewer approved to Done Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Collector
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

7 participants