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

Update opentelemetry dependency #1169

Merged
merged 11 commits into from
Aug 24, 2021

Conversation

joefreeman
Copy link
Member

Description

This updates the (optional) opentelemetry dependency from 0.17b0 to 1.4.1.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Documentation

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@joefreeman joefreeman changed the title Update opentelemetry Update opentelemetry dependency Aug 24, 2021
@botberry
Copy link
Member

botberry commented Aug 24, 2021

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:


This release adds support for the latest version of the optional opentelemetry dependency.


Here's the preview release card for twitter:

Here's the tweet text:

🆕 Release (next) is out! Thanks to Joe Freeman for the PR 👏

Get it here 👉 https://github.com/strawberry-graphql/strawberry/releases/tag/(next)

@@ -76,7 +76,7 @@ async def resolve(self, _next, root, info, *args, **kwargs):

return result

with self._tracer.use_span(self._root_span):
with trace.use_span(self._root_span):
Copy link
Member

Choose a reason for hiding this comment

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

why was this changed? 😊

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like it got moved in open-telemetry/opentelemetry-python#1668 🤷

Copy link
Member

Choose a reason for hiding this comment

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

gotcha! thanks for explaing! 😊

pyproject.toml Outdated
opentelemetry-api = "^0.17b0"
opentelemetry-sdk = "^0.17b0"
opentelemetry-api = "^1.4.1"
opentelemetry-sdk = "^1.4.1"
Copy link
Member Author

Choose a reason for hiding this comment

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

I guess this might be an annoying upgrade for anyone who is using opentelemetry==0.17b0?

Copy link
Member

Choose a reason for hiding this comment

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

it could be, maybe we can handle both versions? we only have two places where we had to change our code, so maybe we can do it

@codecov
Copy link

codecov bot commented Aug 24, 2021

Codecov Report

Merging #1169 (ae12492) into main (b4c24bb) will decrease coverage by 0.08%.
The diff coverage is 57.14%.

@@            Coverage Diff             @@
##             main    #1169      +/-   ##
==========================================
- Coverage   97.53%   97.44%   -0.09%     
==========================================
  Files          87       87              
  Lines        3286     3291       +5     
  Branches      472      473       +1     
==========================================
+ Hits         3205     3207       +2     
- Misses         44       46       +2     
- Partials       37       38       +1     

@joefreeman
Copy link
Member Author

it could be, maybe we can handle both versions? we only have two places where we had to change our code, so maybe we can do it

Something like this?

I'm not sure how to specify the version to allow the 0.17b0 pre-release, but prevent from using pre-releases after 1.4.1 (i.e., 1.10a0). Any ideas?

@patrick91
Copy link
Member

I'm not sure how to specify the version to allow the 0.17b0 pre-release, but prevent from using pre-releases after 1.4.1 (i.e., 1.10a0). Any ideas?

mhm, we could allow any version before 2? <2?

@joefreeman
Copy link
Member Author

mhm, we could allow any version before 2? <2?

I think that still installs 1.10a0 though. Maybe not a big deal, but I think I've found what I was looking for: "^0.17b0 || ~1.4" - I think that requires either the specific version we want to keep for backwards compatibility, or something 1.4ish.

@patrick91
Copy link
Member

@joefreeman sounds good to me 😊 thanks!

Copy link
Member

@patrick91 patrick91 left a comment

Choose a reason for hiding this comment

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

💯

@patrick91 patrick91 merged commit e230571 into strawberry-graphql:main Aug 24, 2021
@joefreeman joefreeman deleted the update-opentelemetry branch August 24, 2021 18:11
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.

3 participants