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 schema_url to Resource #1871

Merged
merged 40 commits into from
Jun 1, 2021

Conversation

dgetu
Copy link
Contributor

@dgetu dgetu commented May 25, 2021

#1862

A change in the OTel specification requires a new schema_url field in the Resource class. This change implements the field, updates the Resource factory method and merge method, updates the behavior of OTELResourceDetector when aggregating Resources, and modifies tests which used the old constructor signature.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

All tox tests were ran on Python 3.9. Three tests were made or substantively modified, with a number of others modified for failing to conform to the new constructor signature.

Does This PR Require a Contrib Repo Change?

  • The OTel specification has changed which prompted this PR to update the method interfaces of opentelemetry-api/ or opentelemetry-sdk/

  • Yes.

  • No.

Checklist:

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

dgetu and others added 26 commits May 21, 2021 14:25
Co-authored-by: Eddy Lin <[email protected]>
…elemetry-python into add-schema_url-attribute
Improves readability from the last commit
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 25, 2021

CLA Signed

The committers are authorized under a signed CLA.

@dgetu dgetu marked this pull request as ready for review May 25, 2021 22:48
@dgetu dgetu requested review from a team, codeboten and ocelotl and removed request for a team May 25, 2021 22:48
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.

Thanks for taking this on, making the schema_url an optional argument would prevent the need to change all the calls to it in the tests. It will also prevent this from being a breaking change for users.

@dgetu dgetu requested a review from codeboten May 26, 2021 18:09
@dgetu dgetu requested a review from lzchen May 27, 2021 18:29
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.

Nice I think this is getting pretty close, please take a look at my comments and update the branch!

opentelemetry-sdk/tests/trace/test_trace.py Outdated Show resolved Hide resolved
@lzchen lzchen merged commit 56495ed into open-telemetry:main Jun 1, 2021
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.

5 participants