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

Add required argument to initialize Span #1136

Conversation

ahlaw
Copy link
Contributor

@ahlaw ahlaw commented Sep 18, 2020

Description

Adding a parameter to SDK Span constructor. An additional argument is now required to call the Span constructor, else an Exception is raised. This is to discourage callers from creating Spans directly.

Fixes #1000

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Unit test to verify an exception will be thrown when the constructor is called without the additional argument
  • Tox suite to check no existing functionality has been broken

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added

@ahlaw ahlaw marked this pull request as ready for review September 18, 2020 17:01
@ahlaw ahlaw requested a review from a team September 18, 2020 17:01
@lzchen lzchen added the release:required-for-ga To be resolved before GA release label Sep 21, 2020
@ahlaw ahlaw closed this Oct 1, 2020
@ahlaw ahlaw deleted the 1000-disallow-direct-span-creation branch October 1, 2020 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:required-for-ga To be resolved before GA release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implementations MUST NOT allow callers to create Spans directly
2 participants