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

Refactor is_valid to be an instance attribute #1005

Merged
merged 4 commits into from
Aug 27, 2020

Conversation

ffe4
Copy link
Contributor

@ffe4 ffe4 commented Aug 17, 2020

Description

Refactoring of SpanContext.is_valid() to be a variable, rather than a method. This makes the API consistent with is_remote, which is defined similarly in the specification.

Since I am new to this project, I am not sure whether the removal of the method might break something downstream, but adding a deprecation warning would require also choosing a different name for the attribute.

Fixes #996

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated (where?)
  • Unit tests have been updated
  • Documentation has been removed (by removing the method)

@ffe4
Copy link
Contributor Author

ffe4 commented Aug 17, 2020

The build passed on my end, so it probably just needs a rerun.

@ffe4 ffe4 marked this pull request as ready for review August 17, 2020 21:39
@ffe4 ffe4 requested a review from a team August 17, 2020 21:39
@lzchen
Copy link
Contributor

lzchen commented Aug 18, 2020

Changelog

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

@lzchen lzchen merged commit f6a658e into open-telemetry:master Aug 27, 2020
@ffe4 ffe4 deleted the issue_996 branch August 27, 2020 17:53
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.

is_valid is currently a method on the SpanContext, the spec defines it as a bool flag
3 participants