docs: Add OC stats example code by c24t · Pull Request #568 · googleapis/python-spanner · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

docs: Add OC stats example code #568

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

c24t
Copy link
Contributor

@c24t c24t commented Sep 13, 2021

Fixes GoogleCloudPlatform/python-docs-samples#6514 🦕,

Moved from GoogleCloudPlatform/python-docs-samples#6515.

The last PR included this note:

Note that we need to do extra work to instrument gRPC to emit the stats we're collecting here. We may want to wait to merge this PR or include this in public docs until we make the required gRPC changes.

But to make this clearer: this code won't emit gRPC stats because gRPC-python itself doesn't support OpenCensus tracing. See https://opencensus.io/guides/grpc/.

The sample also uses measures and views from the OpenCensus gRPC Stats
specification
. These ought to be moved somewhere like opencensus-ext-grpc.

@larkee I put these samples in a separate samples/opencensus/ dir because the other samples don't require OC, let me know if you want this arranged differently.

@c24t c24t requested review from a team as code owners September 13, 2021 22:42
@c24t c24t requested a review from tmatsuo September 13, 2021 22:42
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 13, 2021
@snippet-bot
Copy link

snippet-bot bot commented Sep 13, 2021

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner API. label Sep 13, 2021
The example code describes creating OpenCensus measures and views, and
registering a stats exporter to export metrics to Cloud Monitoring.
Stats definitions are taken from the OpenCensus gRPC Stats
specification:
https://github.com/census-instrumentation/opencensus-specs/blob/80abe4c67b5322ba6f2254c105d4967f0f46ea99/stats/gRPC.md.
@c24t c24t force-pushed the oc-metrics-sample branch from c9da739 to e26f123 Compare September 13, 2021 22:49
@c24t c24t requested a review from larkee September 13, 2021 23:10
@c24t c24t changed the title Add OC stats example code docs: Add OC stats example code Sep 15, 2021
@dandhlee dandhlee requested a review from a team as a code owner February 19, 2022 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Cloud Spanner OpenCensus integration samples
4 participants

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.