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 (GAX), with the latest version being 2.63.1.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMetricsRecorder\u003c/code\u003e interface is designed for recording metrics related to RPC attempts and operations, using an observability framework like OpenTelemetry, and must be implemented in a thread-safe manner.\u003c/p\u003e\n"],["\u003cp\u003eThe interface offers methods to record the count and latency of RPC attempts (\u003ccode\u003erecordAttemptCount\u003c/code\u003e and \u003ccode\u003erecordAttemptLatency\u003c/code\u003e) as well as the count and total latency of operations (\u003ccode\u003erecordOperationCount\u003c/code\u003e and \u003ccode\u003erecordOperationLatency\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMetricsRecorder\u003c/code\u003e interface, which is currently in a Beta/Pre-GA stage, provides default implementations for all the methods, and accepts a count/latency value, and a map of attributes.\u003c/p\u003e\n"],["\u003cp\u003eThe page lists a comprehensive version history of the \u003ccode\u003eMetricsRecorder\u003c/code\u003e interface, ranging from the latest 2.63.1 down to version 2.7.1, each with a hyperlink to its respective documentation.\u003c/p\u003e\n"]]],[],null,[]]