chore: Add MetricsRecorder interface to Datastore#12028
Conversation
|
|
||
| this.transactionLatency = | ||
| meter | ||
| .histogramBuilder(TelemetryConstants.SERVICE_NAME + "/transaction_latency") |
There was a problem hiding this comment.
Do we need /internal/client prefixes?
There was a problem hiding this comment.
I'm not 100% sure about this long-term. I think I would need to run this by the platform team. For now, since it's not being sent, I think this prefix should be fine. Since we're not promoting this yet, I think we should be able to change this in the future.
There was a problem hiding this comment.
It's possible to have customers use this metric though (via their own OTel exporters), right? I think it'll be worth confirming with the platform team. WDYT?
There was a problem hiding this comment.
Yeah, technically they would have to find this and enable metrics, but they could.
For now, to progress with the rest of the framework, I'll update the option to enable metrics as package-private so there is no way for users to record these metrics even if they wanted to
Adds the Otel Metrics Recording Implementation as well as the No-Op Metrics Recording implementation for Datastore.
The implementation will be chosen based on the opt-in or opt-out choice for Metrics recording.