GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Opentelemetry integration by sethmaxwl · Pull Request #1078 · googleapis/nodejs-pubsub

This repository was archived by the owner on Oct 21, 2026. It is now read-only.

Conversation

@sethmaxwl

@sethmaxwl sethmaxwl commented Aug 7, 2020

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
sethmaxwl and others added 12 commits July 27, 2020 20:45
@sethmaxwl
Add opentelemetry tracing
af0a95c
@yoshi-automation @sofisl @sethmaxwl
build: rename _toc to toc (#1066)
73835fb
* 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 <[email protected]>
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 <[email protected]>
@yoshi-automation @sethmaxwl
build: move gitattributes files to node templates (#1070)
ae1ae81
Source-Author: F. Hinkelmann <[email protected]>
Source-Date: Thu Jul 23 01:45:04 2020 -0400
Source-Repo: googleapis/synthtool
Source-Sha: 3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3
Source-Link: googleapis/synthtool@3a00b7f
@sethmaxwl
Add opentelemetry instrumentation
f8b6602
@sethmaxwl
Merge branch 'master' of https://github.com/googleapis/nodejs-pubsub …
c64b1ce
…into opentelemetry-integration
@sethmaxwl
Add create span test
a8ede4b
@sethmaxwl
Refactor tracing
aec8a5c
@sethmaxwl
Add publisher key test
dbe8cdf
@sethmaxwl
Fix linting issues
d8ebcf7
@sethmaxwl
Add docs
16b9aaa
@sethmaxwl
Add example for opentelemetry
e93dceb
@sethmaxwl
Add tracing example
fe14163
@sethmaxwl
sethmaxwl requested review from a team August 7, 2020 15:45
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 7, 2020
@sethmaxwl sethmaxwl changed the title Opentelemetry integration feat: Opentelemetry integration Aug 7, 2020
@sethmaxwl
Update headers
11478a7
bcoe
bcoe suggested changes Aug 7, 2020
View reviewed changes

@bcoe bcoe left a comment

Copy link
Copy Markdown

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread package.json Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread samples/package.json Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/publisher/index.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/publisher/index.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/subscriber.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@feywind

feywind commented Aug 7, 2020

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Benjamin E. Coe
Merge branch 'master' into opentelemetry-integration
3cb49e9
@codecov

codecov Bot commented Aug 8, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Merging #1078 into master will increase coverage by 2.71%.
The diff coverage is 91.94%.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
src/subscriber.ts 98.67% <86.04%> (-0.92%) ⬇️
src/publisher/index.ts 97.61% <90.47%> (+36.01%) ⬆️
src/opentelemetry-tracing.ts 100.00% <100.00%> (ø)
src/pubsub.ts 99.54% <0.00%> (+0.15%) ⬆️
src/message-stream.ts 98.71% <0.00%> (+0.25%) ⬆️
src/publisher/message-batch.ts 100.00% <0.00%> (+22.44%) ⬆️
src/publisher/message-queues.ts 98.68% <0.00%> (+48.68%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 80e0ee3...d5ac567. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bcoe bcoe added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 8, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 8, 2020
sethmaxwl and others added 3 commits August 10, 2020 11:19
@sethmaxwl
Merge branch 'master' into opentelemetry-integration
4c4482c
@sethmaxwl
Add microsoft api documenter
dd42a6a
@feywind
Merge branch 'master' into opentelemetry-integration
59b6f62
feywind
feywind reviewed Aug 10, 2020
View reviewed changes
Comment thread samples/package.json Resolved

Uh oh!

There was an error while loading. Please reload this page.

sethmaxwl added 3 commits August 10, 2020 19:14
@sethmaxwl
Fix linting in samples/package.json
78ce7f6
@sethmaxwl
Merge branch 'opentelemetry-integration' of https://github.com/sethma…
99a1fe1
…xwl/nodejs-pubsub into opentelemetry-integration
@sethmaxwl
Merge branch 'master' into opentelemetry-integration
5ccd513
sethmaxwl and others added 15 commits August 11, 2020 09:49
@sethmaxwl
Merge branch 'master' into opentelemetry-integration
39ec18a
@sethmaxwl
Add optional tracing
0ad9443
@sethmaxwl
Merge branch 'opentelemetry-integration' of https://github.com/sethma…
d4996b9
…xwl/nodejs-pubsub into opentelemetry-integration
@sethmaxwl
Fix linting issues
0606f83
@sethmaxwl
Re-add api-documenter
c9cd570
@sethmaxwl
Update package.json
c974091
@sethmaxwl
Update package.json
e343c52
@sethmaxwl
Update package.json
00c0980
@sethmaxwl
Fix docs
eccd6eb
@sethmaxwl
Merge branch 'opentelemetry-integration' of https://github.com/sethma…
92c3a09
…xwl/nodejs-pubsub into opentelemetry-integration
@feywind
Merge branch 'master' into opentelemetry-integration
f7369e8
@sethmaxwl
Add more unit tests
c7cc67d
@sethmaxwl
Merge branch 'opentelemetry-integration' of https://github.com/sethma…
af46e32
…xwl/nodejs-pubsub into opentelemetry-integration
@sethmaxwl
Fix linting
5fa6274
@sethmaxwl
Add disable tracing tests
ce35b88
feywind
feywind approved these changes Aug 13, 2020
View reviewed changes

@feywind feywind left a comment

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread package.json
"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",

@feywind feywind Aug 13, 2020

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sethmaxwl sethmaxwl Aug 13, 2020

Copy link
Copy Markdown
Contributor Author

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread samples/opentelemetryTracing.js
}, SUBSCRIBER_TIMEOUT * 1000);
}

publishMessage().then(subscriptionListen());

@feywind feywind Aug 13, 2020

Copy link
Copy Markdown
Contributor

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.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sethmaxwl sethmaxwl Aug 13, 2020

Copy link
Copy Markdown
Contributor Author

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@feywind feywind Aug 13, 2020

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@feywind feywind added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 13, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 13, 2020
@sethmaxwl
Update opentelemetryTracing sample
d5ac567
@sethmaxwl
sethmaxwl requested a review from bcoe August 13, 2020 21:18
@feywind feywind added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 13, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 13, 2020
bcoe
bcoe approved these changes Aug 14, 2020
View reviewed changes

@bcoe bcoe left a comment

Copy link
Copy Markdown

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 👌

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@feywind
feywind merged commit 76db007 into googleapis:master Aug 14, 2020
@punya punya mentioned this pull request Apr 1, 2021
Trace through Cloud Pub/Sub GoogleCloudPlatform/opentelemetry-operations-js#104
Closed
@ianonavy ianonavy mentioned this pull request Aug 24, 2021
pubsub: native OpenTelemetry support googleapis/google-cloud-go#4665
Closed
@hermanbanken hermanbanken mentioned this pull request Aug 30, 2021
OpenTelemetry integration misses the point: we need to propagate the span/context! #1389
Closed
@naseemkullah naseemkullah mentioned this pull request Feb 20, 2022
Opentelemetry context propagation googleapis/java-pubsub#1023
Closed
feywind pushed a commit to feywind/nodejs-pubsub that referenced this pull request Nov 12, 2024
@danieljbruce @gcf-owl-bot
samples: Bigtable deletion code samples (googleapis#1078)
886af7a
* 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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

2 more reviewers
@feywind feywind feywind approved these changes
@bcoe bcoe bcoe approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Add OpenTelemetry Support

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@sethmaxwl @feywind @bcoe @yoshi-kokoro @yoshi-automation
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.