Skip to content

chore: Add Custom OpenTelemetry Exporter in for Service Metrics #1273

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

Merged
merged 5 commits into from
Jan 8, 2025

Conversation

lszinv
Copy link
Contributor

@lszinv lszinv commented Dec 17, 2024

This change adds an implementation for an OpenTelemetry exporter to send the following service metrics that are already present in the Go and Java clients:

  • operation_latencies
  • operation_count
  • attempt_latencies
  • attempt_count
  • gfe_latency
  • gfe_missing_header_count

Files added to a metrics folder in /google/cloud/spanner_v1/metrics

  • metrics_exporter.py - The definition for the exporter
  • constants.py - Constant values such as metric and label names to be used by both the exporter and eventual implementing code.

Based on regular client Google Cloud Monitoring exporter found here

note: CLA not signed yet, as there's a settings issue. Will have it submitted soon.
note2: Linter runs with no issues, currently working on generating code coverage report to verify full coverage.

@lszinv lszinv requested review from a team as code owners December 17, 2024 03:13
Copy link

google-cla bot commented Dec 17, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@product-auto-label product-auto-label bot added size: l Pull request size is large. api: spanner Issues related to the googleapis/python-spanner API. labels Dec 17, 2024
@lszinv lszinv force-pushed the lsz/GSO-11/Exporter branch 3 times, most recently from 1c9e4b8 to 606f76f Compare December 18, 2024 21:52
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 19, 2024
@rahul2393 rahul2393 assigned rahul2393 and unassigned harshachinta Dec 19, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 19, 2024
@lszinv lszinv force-pushed the lsz/GSO-11/Exporter branch from 606f76f to 2e0acea Compare December 31, 2024 22:19
@lszinv lszinv requested a review from rahul2393 January 3, 2025 18:01
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 8, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 8, 2025
@rahul2393 rahul2393 merged commit 04a11a6 into googleapis:main Jan 8, 2025
10 of 12 checks passed
aakashanandg pushed a commit to aakashanandg/python-spanner that referenced this pull request Jan 8, 2025
…leapis#1273)

* chore: Add Custom OpenTelemetry Exporter in for Service Metrics

* Updated copyright dates to 2025

---------

Co-authored-by: rahul2393 <irahul@google.com>
olavloite added a commit that referenced this pull request Jan 9, 2025
…actions (#1279)

* fix: update retry strategy for mutation calls to handle aborted transactions

* test: add mock server test for aborted batch

* chore(python): Update the python version in docs presubmit to use 3.10 (#1281)

Source-Link: googleapis/synthtool@de3def6
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:a1c5112b81d645f5bbc4d4bbc99d7dcb5089a52216c0e3fb1203a0eeabadd7d5

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>

* fix:Refactoring existing retry logic for aborted transactions and clean up redundant code

* fix: fixed linting errors

* feat: support GRAPH and pipe syntax in dbapi (#1285)

Recognize GRAPH and pipe syntax queries as valid queries
in dbapi.

* chore: Add Custom OpenTelemetry Exporter in for Service Metrics (#1273)

* chore: Add Custom OpenTelemetry Exporter in for Service Metrics

* Updated copyright dates to 2025

---------

Co-authored-by: rahul2393 <irahul@google.com>

* fix: removing retry logic for RST_STREAM errors from _retry_on_aborted_exception handler

---------

Co-authored-by: Knut Olav Løite <koloite@gmail.com>
Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Lester Szeto <lester.szeto@gmail.com>
Co-authored-by: rahul2393 <irahul@google.com>
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. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy