Skip to content

Refactor is_valid to be an instance attribute#1005

Merged
lzchen merged 4 commits intoopen-telemetry:masterfrom
ffe4:issue_996
Aug 27, 2020
Merged

Refactor is_valid to be an instance attribute#1005
lzchen merged 4 commits intoopen-telemetry:masterfrom
ffe4:issue_996

Conversation

@ffe4
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

lzchen commented Aug 18, 2020

Changelog

Copy link
Copy Markdown
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