-
Notifications
You must be signed in to change notification settings - Fork 547
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
fix: Removed deprecated properties usage in Fastify instrumentation #1679
fix: Removed deprecated properties usage in Fastify instrumentation #1679
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1679 +/- ##
==========================================
- Coverage 91.76% 91.72% -0.04%
==========================================
Files 139 139
Lines 7125 7128 +3
Branches 1431 1433 +2
==========================================
Hits 6538 6538
- Misses 587 590 +3
|
Hi @pichlermarc. I'm confused by the GH workflow failure. Is it something that fails globally or just in my PR? I've tried |
@seidelmartin I'm looking into it, I think it may be both. Trying it on this branch makes it fail on the fastify intrumentation's |
@seidelmartin looks like I had an old revision checked out and |
@pichlermarc I'll try that. 👍🏻 |
@pichlermarc good news, after downgrading typescript to 4.7.4 all checks pass. |
Glad to hear. 🙂 Looks like now it's only missing CLA (see #1679 (comment)) and the lint step 🙂 |
Alright, all 🟢. |
Hi @pichlermarc, what will be the next step here to publish it as new version? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks @seidelmartin 🙂
Once this is merged, a release PR is created automatically.
@blumamir do we have any specific limitations on bumping typescript for a single package in this repo? 🤔 Since this package is not 1.0 yet, we can make a breaking change like bumping it for @opentelemetry/instrumentation-fastify
(it's needed for new versions of the package anyway). Thinking about it closer though, it'll likely affect @opentelemetry/auto-instrumentations-node
too by possibly requiring a later version for consumers.
To my latest understanding, if we use a newer typescript, we can break existing users with incompatible versions. But @Flarna will probably know best |
Newer typescript versions may generated .d.ts files which are incompatible with an older typescript version. While typescript brings a lot of benefits it adds also some compatibility burden... An update of typescript will for sure happen with SDK 2.0. |
Why do we need to bump the typescript version in the first place? is it so we can use Perhaps we can keep all current dependencies as they are and use |
I've updated fastify to v4.23.0 because it exposes new properties that instrumentation uses. Otherwise it still produces a lot of deprecation warnings. I can still downgrade it but then I wouldn't be able to test my changes. |
Guys, this is generating tons of errors in production, what's the ETA of this PR? |
Thanks to everyone for the feedback on the PR here. I've created a PR to add a @seidelmartin would you mind changing the dependencies back to |
Yes, I'll do that. |
@pichlermarc I've put back the version of those dependencies. |
@seidelmartin You may want to rebase to main as it appears you are out-of-date. |
370ed24
to
27d2eb9
Compare
27d2eb9
to
2d36152
Compare
@markrzen I've rebased to latest version. Can we proceed with it? What will be next steps? |
@seidelmartin I don't have access to approve, I am just another contributor like yourself. @pichlermarc Anything else to get this PR approved? |
Is anything missing to get this approved @pichlermarc? 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was just waiting for #1710 so that this does not get merged without the test-all-versions script running. I merged main again here, once the build passes I'll merge this PR 🙂
awesome! When will this be available @ Npm? |
Which problem is this PR solving?
Instrumentation has been using deprecated properties producing errors like
FastifyDeprecation: Request#context property access is deprecated. Please use "Request#routeConfig" or "Request#routeSchema" instead for accessing Route settings. The "Request#context" will be removed in fastify@5.
#1275
Short description of the changes
I've added getting deprecated properties from newly introduced
routeOptions
object in fastify request. It supports also old versions that doesn't have this object exposed. It has been introduced in fastify https://github.com/fastify/fastify/releases/tag/v4.23.0