Skip to content

Feat: Add Metrics Tracer and Metrics Tracer Factory #2311

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 5 commits into
base: main
Choose a base branch
from

Conversation

jeremyprime
Copy link
Contributor

Description

This PR introduces a metrics factory to the codebase. It's a direct follow-up to the previously merged metrics exporter (see PR #2272). This factory is responsible for creating and managing the specific service metrics that will be instrumented throughout the code in subsequent changes.

Impact

This change introduces new components but has no immediate impact as the factory is not called at this time.

Testing

Unit tests have been added to verify the correct functionality of the metrics factory and its interaction with the exporter. Additionally, manual verification confirmed that the factory and exporter correctly create and are capable of emitting metrics to Google Cloud Platform (GCP).

This PR introduces no breaking changes.

Additional Information

Future metrics work will involve:

  • Developing a gRPC interceptor to capture and emit Google Front End (GFE) metrics.
  • Integrating the created metrics into various parts of the codebase for actual instrumentation.

Checklist

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease
  • Appropriate docs were updated
  • Appropriate comments were added, particularly in complex areas or places that require background
  • No new warnings or issues will be generated from this change

@jeremyprime jeremyprime requested review from a team as code owners May 29, 2025 23:27
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: spanner Issues related to the googleapis/nodejs-spanner API. labels May 29, 2025
@lszinv lszinv added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 30, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 30, 2025
@lszinv lszinv added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 30, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 30, 2025
@lszinv
Copy link
Contributor

lszinv commented May 30, 2025

Airlock failures are on:
npm error notarget No matching version found for @opentelemetry/resource-detector-gcp@^0.33.0.

https://www.npmjs.com/package/@opentelemetry/resource-detector-gcp/v/0.33.0?activeTab=versions
0.33 seems to have been available since 4 months ago though.

@lszinv lszinv requested a review from surbhigarg92 June 2, 2025 18:15
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/nodejs-spanner API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants