-
Notifications
You must be signed in to change notification settings - Fork 552
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: update hapi bindings to v21 #1491
Conversation
|
41a45e5
to
b85f015
Compare
@@ -57,11 +57,15 @@ export class HapiInstrumentation extends InstrumentationBase { | |||
protected init() { | |||
return new InstrumentationNodeModuleDefinition<typeof Hapi>( | |||
HapiComponentName, | |||
['>=17 <21'], | |||
['>=21'], |
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.
I guess the desupport of hapi 17 to 20 should be mentioned somewhere.
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.
Lol thats fair. I honestly don't know if we can't keep the support. Problem is not knowing isn't very useful.
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.
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.
>=21
is also quite the promise. Can we be sure 22, 23, 30, 50 are all supported?
Firstly, thank you @toddtarsi! I ran
|
Just noting, I was looking at it this weekend and I definitely just need to do the taz thing. Without that up, I am just going in circles a bit, sorry all! |
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
@toddtarsi sorry to bother, are you planning on finishing this one? I was working on something of my own and noticed that installing |
@IAmVisco - Nah. I'm not sure what the taz stuff is tbh. |
Sorry, mind linking what |
|
@toddtarsi Just tested some stuff locally - if you do P.S. I don't see any issues with TAV on the first glance, but might be wrong. |
Is there any chance this can get released? |
Looks like 2 tests failing. My guess it that this needs to be fixed, but also that there may need to be a new major or minor version to release a new version that depends on Hapi 21. One build can not unfortunately easily work for multiple versions of Hapi without a lot of casting to essentially using un-typed JS to get the job done, so not sure how TAV applies here. Trying to debug the errors, but the monkey patching is a little complicated.
I found a fix that allows the test to pass (instrumentation.ts, line:393), although I'm not positive what the implications are on a broader level.
And I haven't yet determined why the span completion count is only 1 instead of 2 in this other test. Happy to help test if @toddtarsi wants to update this pull request and get the tests passing. Some guidance from the author(s) would be good on what is necessary to get this merged outside of getting tests passing (e.g. versioning, etc.) Worst case, I guess a new NPM module can be created to support Hapi v21 in the meantime, but keeping things here would be ideal. |
Hi, @arimus. We try to correct and run a PATCHED version of the HAPI plugin to runs correctly with HAPI 21. In your last comment, you provided a fix but we don't know how you have implemented the getRootSpanMetadata(route). Could you provide the code of that function please? It will help us a lot. |
@here Is there anything that can be done to move this issue along? Anything I could do to help? |
@toddtarsi It looks to me as if the major hurdles came from upgrading type dependencies to hapi 21. What do you think about staying on This looks like it would work: nlochschmidt@a299190. I'd be happy to provide an alternative PR for hapi v21 support based on this. |
@toddtarsi I had a closer look at your PR today and I think it's possible to restore support for versions 17 to 20. My solution requires a few more main...nlochschmidt:opentelemetry-js-contrib:update-hapi-to-v21 I added If you want, you can pull my changes into this PR, otherwise I will create a new one. |
This PR can be closed. #1985 has been merged, which includes these changes. |
Thanks for updating here 🙏 |
Which problem is this PR solving?
Short description of the changes