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

[logs] prevent None from causing problems #2410

Merged
merged 4 commits into from
Jan 26, 2022

Conversation

codeboten
Copy link
Contributor

If the trace or span ID is None for a log entry, the result would raise an error, this change prevents that.

If the trace or span ID is None for a log entry, the result would raise an error, this change prevents that.
@codeboten codeboten requested a review from a team January 26, 2022 04:53
Copy link
Member

@srikanthccv srikanthccv left a comment

Choose a reason for hiding this comment

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

log records created from logging lib would have empty span context and do not throw error. I imagine this is happening when you are creating log record instance directly?

opentelemetry-sdk/src/opentelemetry/sdk/_logs/__init__.py Outdated Show resolved Hide resolved
Alex Boten and others added 2 commits January 26, 2022 08:29
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
@codeboten
Copy link
Contributor Author

Test added @ocelotl

@ocelotl ocelotl added the Approve Public API check This label shows that the public symbols added or changed in a PR are strictly necessary label Jan 26, 2022
@ocelotl ocelotl enabled auto-merge (squash) January 26, 2022 16:49
@ocelotl ocelotl merged commit 44e9b55 into open-telemetry:main Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approve Public API check This label shows that the public symbols added or changed in a PR are strictly necessary
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants