Class BigQueryTelemetryTracer

java.lang.Object
com.google.cloud.bigquery.telemetry.BigQueryTelemetryTracer

@InternalApi public final class BigQueryTelemetryTracer extends Object
BigQuery Telemetry class that stores generic telemetry attributes and values
  • Field Details

    • BQ_GCP_CLIENT_SERVICE

      public static final String BQ_GCP_CLIENT_SERVICE
      See Also:
    • BQ_GCP_CLIENT_REPO

      public static final String BQ_GCP_CLIENT_REPO
      See Also:
    • BQ_GCP_CLIENT_ARTIFACT

      public static final String BQ_GCP_CLIENT_ARTIFACT
      See Also:
    • GCP_CLIENT_SERVICE

      public static final io.opentelemetry.api.common.AttributeKey<String> GCP_CLIENT_SERVICE
    • GCP_CLIENT_VERSION

      public static final io.opentelemetry.api.common.AttributeKey<String> GCP_CLIENT_VERSION
    • GCP_CLIENT_REPO

      public static final io.opentelemetry.api.common.AttributeKey<String> GCP_CLIENT_REPO
    • GCP_CLIENT_ARTIFACT

      public static final io.opentelemetry.api.common.AttributeKey<String> GCP_CLIENT_ARTIFACT
    • GCP_RESOURCE_DESTINATION_ID

      public static final io.opentelemetry.api.common.AttributeKey<String> GCP_RESOURCE_DESTINATION_ID
    • RPC_SYSTEM_NAME

      public static final io.opentelemetry.api.common.AttributeKey<String> RPC_SYSTEM_NAME
    • ERROR_TYPE

      public static final io.opentelemetry.api.common.AttributeKey<String> ERROR_TYPE
    • EXCEPTION_TYPE

      public static final io.opentelemetry.api.common.AttributeKey<String> EXCEPTION_TYPE
    • STATUS_MESSAGE

      public static final io.opentelemetry.api.common.AttributeKey<String> STATUS_MESSAGE
    • URL_TEMPLATE

      public static final io.opentelemetry.api.common.AttributeKey<String> URL_TEMPLATE
    • URL_DOMAIN

      public static final io.opentelemetry.api.common.AttributeKey<String> URL_DOMAIN
  • Method Details

    • addCommonAttributeToSpan

      public static void addCommonAttributeToSpan(io.opentelemetry.api.trace.Span span)
    • addExceptionToSpan

      public static void addExceptionToSpan(Exception e, io.opentelemetry.api.trace.Span span)
      Adds the following error attributes to trace span: STATUS_MESSAGE: the name of the exception + message if available EXCEPTION_TYPE: full name of exception ex: java.net.UnknownHostException ERROR_TYPE: mapped string based on ErrorTypeUtil.getClientErrorType(Exception)
    • addServerErrorResponseToSpan

      public static void addServerErrorResponseToSpan(com.google.api.client.googleapis.json.GoogleJsonResponseException errorResponse, io.opentelemetry.api.trace.Span span)
      Adds the following error attributes to trace span from GoogleJsonResponseException: STATUS_MESSAGE: user readable error message ERROR_TYPE: reason if available otherwise the status code