Provides an interface for metrics recording. The implementer is expected to use an observability
framework, e.g. OpenTelemetry. There should be only one instance of MetricsRecorder per client,
all the methods in this class are expected to be called from multiple threads, hence the
implementation must be thread safe.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eMetricsRecorder\u003c/code\u003e interface within the Google API Client Libraries for Java (GAPIC), specifically showing the latest and prior versions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMetricsRecorder\u003c/code\u003e interface is designed for recording metrics, using an observability framework like OpenTelemetry, and there should be only one instance per client.\u003c/p\u003e\n"],["\u003cp\u003eThis interface includes methods such as \u003ccode\u003erecordAttemptCount\u003c/code\u003e, \u003ccode\u003erecordAttemptLatency\u003c/code\u003e, \u003ccode\u003erecordOperationCount\u003c/code\u003e, and \u003ccode\u003erecordOperationLatency\u003c/code\u003e, allowing the tracking of RPC attempts, latencies, and operation statistics.\u003c/p\u003e\n"],["\u003cp\u003eThe library is currently in a pre-GA stage, which means it might have limited support and changes may not be compatible with other pre-GA versions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMetricsRecorder\u003c/code\u003e requires the use of maps to hold string key value pairs for its attributes when recording metrics, and it's implementation must be thread safe as methods are called from multiple threads.\u003c/p\u003e\n"]]],[],null,[]]