Commit f53618c
authored
feat(v2): add ClientMetrics initialization core (#473)
* feat: add ClientMetrics initialization core
This PR introduces the foundational configuration parameters and
data structures for OpenTelemetry duration metrics in Google Cloud Go
client libraries.
Historically, generated Go clients lacked a straightforward architectural
injection point for OpenTelemetry instruments. This leads to gaps in
measuring time spent inside the `gax.Invoke` retry loop.
To address this, this PR does the following:
* Defines semantic OpenTelemetry constants that match our cross-language
OpenTelemetry instrumentation specifications.
* Defines the mapping constants generated clients will use to provide
library-specific details to the underlying instrument initialization.
* Provides the `NewClientMetrics` constructor to act as the central
initialization registry for the OTel Meter and Float64Histogram.
We strictly validate against the standard semantic convention keys to
ensure backwards compatibility while resolving versions.
* refactor: address PR feedback for telemetry initialization1 parent ac7fa62 commit f53618c
5 files changed
Lines changed: 638 additions & 19 deletions
0 commit comments