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

Make setters and getters optional #1690

Merged
merged 29 commits into from
Mar 26, 2021
Merged

Conversation

ocelotl
Copy link
Contributor

@ocelotl ocelotl commented Mar 12, 2021

This PR makes optional the setters and getters from inject and extract.

Fixes #1644

Description

Removes setters and getters

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A

Does This PR Require a Contrib Repo Change?

Checklist:

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

@ocelotl ocelotl changed the title Remove setters and getters Make setters and getters optional Mar 26, 2021
ocelotl and others added 3 commits March 25, 2021 19:47
Co-authored-by: Leighton Chen <lechen@microsoft.com>
Co-authored-by: Leighton Chen <lechen@microsoft.com>
Co-authored-by: Leighton Chen <lechen@microsoft.com>
) -> None:
"""Uses the configured propagator to inject a Context into the carrier.

Args:
set_in_carrier: A setter function that can set values
setter: A `Setter` object that can set values
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be moved to below the context, ditto with the getter documentation above.

Suggested change
setter: A `Setter` object that can set values
setter: An optional `Setter` object that can set values

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.

LGTM

Copy link
Member

@aabmass aabmass left a comment

Choose a reason for hiding this comment

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

I resolved comments that were impossible to address, so just switching Dict to Mapping/MutableMapping remain

@codeboten
Copy link
Contributor

@aabmass @lonewolf3739 addressed the remaining comments, please take a quick look.

@srikanthccv
Copy link
Member

@aabmass @lonewolf3739 addressed the remaining comments, please take a quick look.

LGTM.

Copy link
Member

@aabmass aabmass 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 25edfef into open-telemetry:main Mar 26, 2021
@ocelotl ocelotl deleted the issue_1644 branch March 29, 2021 18:48
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.

Protect against Propagators receiving null Getter/Setter
7 participants