Class GrpcOpenTelemetry.Builder

    • Field Detail

      • openTelemetrySdk

        private io.opentelemetry.api.OpenTelemetry openTelemetrySdk
      • optionalLabels

        private final java.util.Collection<java.lang.String> optionalLabels
      • enableMetrics

        private final java.util.Map<java.lang.String,​java.lang.Boolean> enableMetrics
      • disableAll

        private boolean disableAll
    • Constructor Detail

      • Builder

        private Builder()
    • Method Detail

      • sdk

        public GrpcOpenTelemetry.Builder sdk​(io.opentelemetry.api.OpenTelemetry sdk)
        Sets the OpenTelemetry entrypoint to use. This can be used to configure OpenTelemetry by returning the instance created by a io.opentelemetry.sdk.OpenTelemetrySdkBuilder.
      • addOptionalLabel

        public GrpcOpenTelemetry.Builder addOptionalLabel​(java.lang.String optionalLabelKey)
        Adds optionalLabelKey to all the metrics that can provide value for the optionalLabelKey.
      • enableMetrics

        public GrpcOpenTelemetry.Builder enableMetrics​(java.util.Collection<java.lang.String> enableMetrics)
        Enables the specified metrics for collection and export. By default, only a subset of metrics are enabled.
      • disableMetrics

        public GrpcOpenTelemetry.Builder disableMetrics​(java.util.Collection<java.lang.String> disableMetrics)
        Disables the specified metrics from being collected and exported.
      • disableAllMetrics

        public GrpcOpenTelemetry.Builder disableAllMetrics()
        Disable all metrics. If set to true all metrics must be explicitly enabled.