@@ -41,48 +41,8 @@ class ObservabilityUtils {
4141
4242 /**
4343 * Extracts a low-cardinality string representing the specific classification of the error to be
44- * used in the {@link ObservabilityAttributes#ERROR_TYPE_ATTRIBUTE} attribute.
45- *
46- * <p>This value is determined based on the following priority:
47- *
48- * <ol>
49- * <li><b>{@code google.rpc.ErrorInfo.reason}:</b> If the error response from the service
50- * includes {@code google.rpc.ErrorInfo} details, the reason field (e.g.,
51- * "RATE_LIMIT_EXCEEDED", "SERVICE_DISABLED") will be used. This offers the most precise
52- * error cause.
53- * <li><b>Specific Server Error Code:</b> If no {@code ErrorInfo.reason} is available, but a
54- * server error code was received:
55- * <ul>
56- * <li>For HTTP: The HTTP status code (e.g., "403", "503").
57- * <li>For gRPC: The gRPC status code name (e.g., "PERMISSION_DENIED", "UNAVAILABLE").
58- * </ul>
59- * <li><b>Client-Side Network/Operational Errors:</b> For errors occurring within the client
60- * library or network stack, mapping to specific enum representations from {@link
61- * ErrorTypeUtil.ErrorType}:
62- * <ul>
63- * <li>{@code CLIENT_TIMEOUT}: A client-configured timeout was reached.
64- * <li>{@code CLIENT_CONNECTION_ERROR}: Failure to establish the network connection (DNS,
65- * TCP, TLS).
66- * <li>{@code CLIENT_REQUEST_ERROR}: Client-side issue forming or sending the request.
67- * <li>{@code CLIENT_REQUEST_BODY_ERROR}: Error streaming the request body.
68- * <li>{@code CLIENT_RESPONSE_DECODE_ERROR}: Client-side error decoding the response body.
69- * <li>{@code CLIENT_REDIRECT_ERROR}: Problem handling HTTP redirects.
70- * <li>{@code CLIENT_AUTHENTICATION_ERROR}: Error during credential acquisition or
71- * application.
72- * <li>{@code CLIENT_UNKNOWN_ERROR}: Other unclassified client-side network or protocol
73- * errors.
74- * </ul>
75- * <li><b>Language-specific error type:</b> The class or struct name of the exception or error
76- * if available. This must be low-cardinality, meaning it returns the short name of the
77- * exception class (e.g. {@code "IllegalStateException"}) rather than its message.
78- * <li><b>Internal Fallback:</b> If the error doesn't fit any of the above categories, {@code
79- * "INTERNAL"} will be used, indicating an unexpected issue within the client library's own
80- * logic.
81- * </ol>
82- *
83- * @param error the Throwable from which to extract the error type string.
84- * @return a low-cardinality string representing the specific error type, or {@code null} if the
85- * provided error is {@code null}.
44+ * used in the {@link ObservabilityAttributes#ERROR_TYPE_ATTRIBUTE} attribute. See {@link
45+ * ErrorTypeUtil#extractErrorType} for extended documentation.
8646 */
8747 static String extractErrorType (@ Nullable Throwable error ) {
8848 return ErrorTypeUtil .extractErrorType (error );
0 commit comments