You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(gapic): add OpenTelemetry T3 client method span wrapping in gapic_v1.method (D) (#18274)
### Summary
This PR implements **Tier 3 (T3) Client Method Spans** in
`google-api-core`:
- In `google.api_core.gapic_v1.method._GapicCallable.__call__`:
- Starts an OpenTelemetry `SpanKind.CLIENT` span representing the
high-level GAPIC SDK method call (e.g.
`google.cloud.secretmanager.v1.SecretManagerService/ListSecrets`).
- Sets standard T3 attributes (`rpc.system = "grpc"`, `rpc.service`,
`rpc.method`).
- Encompasses client preparation, retry loops, timeouts, and error
handling.
- Automatically establishes context propagation so underlying wire-level
transport (T4) spans attach as children under this parent span.
- Records exceptions and sets span error status if the method terminates
with an unhandled exception.
- Adds comprehensive unit tests in
`packages/google-api-core/tests/unit/gapic/test_method.py`.
### Reference:
```
[Parent T3 Span] google.cloud.secretmanager.v1.SecretManagerService/ListSecrets (330.37 ms)
└── [Child T4 Wire Span] /google.cloud.secretmanager.v1.SecretManagerService/ListSecrets (330.08 ms)
```
0 commit comments