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 Library for Java, focusing on version 2.61.0 and including links to documentation for a variety of other versions, the most recent one being 2.63.1.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMetricsRecorder\u003c/code\u003e is designed to record metrics related to RPC attempts and operations, using an observability framework such as OpenTelemetry, and must be thread-safe due to multiple threads accessing it.\u003c/p\u003e\n"],["\u003cp\u003eThe interface includes methods for recording the count and latency of both RPC attempts (\u003ccode\u003erecordAttemptCount\u003c/code\u003e, \u003ccode\u003erecordAttemptLatency\u003c/code\u003e) and operations (\u003ccode\u003erecordOperationCount\u003c/code\u003e, \u003ccode\u003erecordOperationLatency\u003c/code\u003e), each accepting a count or latency value along with a map of attributes for additional context.\u003c/p\u003e\n"],["\u003cp\u003eThe library is currently in a Beta stage and is covered under the Pre-GA Offerings Terms, which may entail limited support and potential breaking changes between versions.\u003c/p\u003e\n"],["\u003cp\u003eThere is documentation that allows users to access previous versions of the \u003ccode\u003eMetricsRecorder\u003c/code\u003e interface ranging back to version 2.7.1.\u003c/p\u003e\n"]]],[],null,[]]