-
Notifications
You must be signed in to change notification settings - Fork 230
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: Opentelemetry integration #1078
feat: Opentelemetry integration #1078
Conversation
* changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * fix: rename _toc to toc Source-Author: F. Hinkelmann <franziska.hinkelmann@gmail.com> Source-Date: Tue Jul 21 10:53:20 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 99c93fe09f8c1dca09dfc0301c8668e3a70dd796 Source-Link: googleapis/synthtool@99c93fe Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com>
Source-Author: F. Hinkelmann <franziska.hinkelmann@gmail.com> Source-Date: Thu Jul 23 01:45:04 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3 Source-Link: googleapis/synthtool@3a00b7f
…into opentelemetry-integration
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 left a few notes/nits.
My main feedback is that I would start by making the open telemetry feature optional. If you made it configurable with an environment variable, we could start by having select customers enable this environment variable places like GCF/Cloud Run.
I want to be very mindful of customers who are running PubSub out of GCP environments, e.g., other clouds.
Thanks for doing this @sethmaxwl and also thanks for the review @bcoe! I agree with what Ben's saying, re: what I wrote above, that we want this to basically be invisible for existing users until they opt in. It sounds like the dependencies are okay, we just want to avoid having it do anything new without an opt-in. The CI issues look like they're mostly about an ongoing TypeScript version issue. I'm working on a fix for that so we can get several PRs back on track. |
Codecov Report
@@ Coverage Diff @@
## master #1078 +/- ##
==========================================
+ Coverage 95.06% 97.78% +2.71%
==========================================
Files 24 25 +1
Lines 10925 11067 +142
Branches 483 546 +63
==========================================
+ Hits 10386 10822 +436
+ Misses 535 241 -294
Partials 4 4
Continue to review full report at Codecov.
|
15affee
to
0606f83
Compare
…xwl/nodejs-pubsub into opentelemetry-integration
…xwl/nodejs-pubsub into opentelemetry-integration
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.
This is looking pretty good, just left a couple more nits...
Let me see if I can get kokoro running the sample tests.
@@ -30,7 +30,7 @@ | |||
"presystem-test": "npm run compile", | |||
"system-test": "mocha build/system-test --timeout 600000", | |||
"samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", | |||
"test": "c8 mocha build/test", | |||
"test": "c8 mocha build/test --recursive", |
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.
We've got a change pending actually that will obsolete this, but I will deal with it when that gets merged.
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 just added it here to get CI to run the publisher tests too.
}, SUBSCRIBER_TIMEOUT * 1000); | ||
} | ||
|
||
publishMessage().then(subscriptionListen()); |
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.
This is missing a doc end tag, though it may not matter at this point if nothing in the docsite is expecting it to be here. (We would need to canonicalize the the tag name anyway.)
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 want to include a link to this example in the blog post. How should we canonicalize the tag name?
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.
Let me see if I can find the right person to ask... there were some changes in that area lately.
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.
Thanks for addressing my feedback 👌
* First code samples * Add the end exclude tag * Update the comments * Add integration test for delete code snippets * Three more test cases * Add the final test case * Add header * linting fix * Add call options * Use before instead of beforeEach * PR updates * Remove comment that is unimportant * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * remove start exclude and end exclude tags * row range feedback * Delete row snapshot * Slight change to fix samples test * switch batch delete to batch insert * Removed line of code that is shortening timestamp * Correct snapshot * Revert "Removed line of code that is shortening timestamp" This reverts commit 96adcdbee42e26e53aa270a43713732342cf902c. * Fix to short snapshot. * Revert "Fix to short snapshot." This reverts commit 73736e694014e0730acba2635186b6659961a610. * Revert "Correct snapshot" This reverts commit f86b6fab4207aba417e974d147f3f048a423208f. * Revert "switch batch delete to batch insert" This reverts commit 72cef5d5da00041cd09a49d155f05c4402143e3f. * streaming and batching changes Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Adds OpenTelemetry tracing to messages in order to provide more visibility into how messages are behaving behind the scenes. @opentelemetry/api and @opentelemetry/tracing are added as dependencies.
Fixes #1061