-
Notifications
You must be signed in to change notification settings - Fork 65
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
feat: Open telemetry integration and span Id fix for nodejs logging library #1497
Conversation
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.
Could you put the changes in protos/
in a separate PR? Not sure how related they are to the current changes.
package.json
Outdated
@@ -45,6 +45,8 @@ | |||
"postpublish": "./.kokoro/publish-min.sh" | |||
}, | |||
"dependencies": { | |||
"@opentelemetry/api": "^1.7.0", |
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.
Could you change this to be a peerDependency
?
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.
Good catch! Done.
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.
Hi @gkevinzheng,
It looks like our kokoro tests ran on NPM 6.14.18 which doesn't support auto-installment for peer-dependencies: https://github.blog/2020-10-13-presenting-v7-0-0-of-the-npm-cli/#
This is causing system test module not found test failure.
I have posted in JS-Team chat but it doesn't look like there is any solution so far. There is a plan to upgrade kokoro infra to Node18 but not sure when it will be done.
We will probably need to move this back to Dependencies
instead of peerDependencies
due to this limitation.
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.
Due to the limitation of low NPM version in kokoro system test infra, JS language team suggested us to import OpenTelemetry/api and re-export it for now to avoid test failure and guarantee compatibility : https://chat.google.com/room/AAAAW_Lho4o/ljx6XogZJMI
Once NPM version in Kokoro infra has upgraded, I will change this to peer dependency again.
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.
Mostly LGTM, but see if you can reduce those dependencies
Yea I was trying to remove these as well, but it looks like owlbot committed this automatically to this PR after I removed them: c254669 |
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.
LGTM
Removed proto changes. |
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.
Didn't look at the tests too closely but LGTM from an OTel perspective
@@ -59,7 +59,8 @@ | |||
"on-finished": "^2.3.0", | |||
"pumpify": "^2.0.1", | |||
"stream-events": "^1.0.5", | |||
"uuid": "^9.0.0" | |||
"uuid": "^9.0.0", | |||
"@opentelemetry/api": "^1.7.0" |
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.
Would peerDependency work better here?
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.
Yea there was some back and forth discussions here: #1497 (comment)
Basically system test would fail for now if it is imported as peer dependency since our kokoro runs on NPM 6, which doesn't install peer dependency automatically. JS language team suggested us to import OpenTelemetry/api and re-export it for now to avoid test failure and guarantee compatibility : https://chat.google.com/room/AAAAW_Lho4o/ljx6XogZJMI
Once NPM version in Kokoro infra has upgraded, I can change this to peer dependency again.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #1490 🦕
This change is to add OpenTelemetry support for nodejs-logging library and fix trace-span correlation issue.
More context about this change: https://b.corp.google.com/issues/270985947
Here are the overall and nodejs-logging design doc for this change:
go/logging-otel-span-support
go/logging-otel-span-support-nodejs