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

Zipkin: Update span boolean attribute conversion #1509

Merged
merged 4 commits into from Jan 14, 2021

Conversation

srikanthccv
Copy link
Member

Fixes #1508

@srikanthccv srikanthccv requested a review from a team as a code owner January 5, 2021 09:14
@srikanthccv srikanthccv requested review from owais and hectorhdzg and removed request for a team January 5, 2021 09:14
@@ -407,7 +411,7 @@ def _extract_tag_value_string_from_sequence(self, sequence: Sequence):
return json.dumps(tag_value_elements, separators=(",", ":"))

def _extract_tags_from_span(self, span: Span):
tags = self._extract_tags_from_dict(getattr(span, "attributes", None))
tags = self._extract_tags_from_dict(span.attributes)
Copy link
Contributor

Choose a reason for hiding this comment

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

Was there a specific reason we were using getattr?

Copy link
Contributor

@owais owais Jan 5, 2021

Choose a reason for hiding this comment

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

May be because API Span does not have "attributes" attribute and it might be used as a noop span in some situations? That'd be my guess.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. Better of just leave it then. @lonewolf3739

Copy link
Member Author

Choose a reason for hiding this comment

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

I dig into to see if I could find some relevant comments when this was added. #707 (comment) this was the discussion that introduced this.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am wondering If that is true we should be doing that all other attributes such as events, status, timestamps, kind and instrumentation_info etc.. and that should be done for not just zipkin but all exporters?

Copy link
Member Author

Choose a reason for hiding this comment

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

Does SpanProcessor not take care of discarding those DefaultSpans?

Copy link
Contributor

Choose a reason for hiding this comment

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

@toumorokoshi
Does this use case still apply?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this would happen (we check for DefaultSpan in the span processor and it should never reach the exporter).

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@lzchen lzchen merged commit baa2fcb into open-telemetry:master Jan 14, 2021
@srikanthccv srikanthccv deleted the zipkin-bool-attrs branch September 24, 2021 08:40
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.

Zipking Exporter: Boolean attribute values MUST use lower case strings "true" and "false"
4 participants