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

Bug fix: Serialize event attributes properly #1246

Merged
merged 4 commits into from
Oct 16, 2020

Conversation

lzchen
Copy link
Contributor

@lzchen lzchen commented Oct 15, 2020

Since Event s as part of a Span are immutable, the attributes associated with them were created to be immutable as well (MappingProxyType) here. These did not serialize properly since we missed the type check here. Simply adding the type check and returning the underlying dictionary if attempting to format the immutable attributes is the solution.

@lzchen lzchen requested review from a team, aabmass and ocelotl and removed request for a team October 15, 2020 20:26
@owais
Copy link
Contributor

owais commented Oct 15, 2020

Nice! LGTM with a non-blocking comment.

Can we add a simple test to catch similar regressions in future?

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

@codeboten codeboten merged commit 5554152 into open-telemetry:master Oct 16, 2020
@lzchen lzchen deleted the console branch October 16, 2020 14:05
srikanthccv pushed a commit to srikanthccv/opentelemetry-python that referenced this pull request Nov 1, 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.

3 participants