Package io.grpc.opentelemetry
Class GrpcOpenTelemetry.Builder
java.lang.Object
io.grpc.opentelemetry.GrpcOpenTelemetry.Builder
- Enclosing class:
GrpcOpenTelemetry
Builder for configuring
GrpcOpenTelemetry.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate io.opentelemetry.api.OpenTelemetryprivate final Collection<String> private final List<OpenTelemetryPlugin> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddOptionalLabel(String optionalLabelKey) Adds optionalLabelKey to all the metrics that can provide value for the optionalLabelKey.build()Returns a newGrpcOpenTelemetrybuilt with the configuration of thisGrpcOpenTelemetry.Builder.Disable all metrics.disableMetrics(Collection<String> disableMetrics) Disables the specified metrics from being collected and exported.enableMetrics(Collection<String> enableMetrics) Enables the specified metrics for collection and export.(package private) GrpcOpenTelemetry.BuilderenableTracing(boolean enable) (package private) GrpcOpenTelemetry.Builderplugin(OpenTelemetryPlugin plugin) sdk(io.opentelemetry.api.OpenTelemetry sdk) Sets theOpenTelemetryentrypoint to use.
-
Field Details
-
openTelemetrySdk
private io.opentelemetry.api.OpenTelemetry openTelemetrySdk -
plugins
-
optionalLabels
-
enableMetrics
-
disableAll
private boolean disableAll
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
sdk
Sets theOpenTelemetryentrypoint to use. This can be used to configure OpenTelemetry by returning the instance created by aio.opentelemetry.sdk.OpenTelemetrySdkBuilder. -
plugin
-
addOptionalLabel
Adds optionalLabelKey to all the metrics that can provide value for the optionalLabelKey. -
enableMetrics
Enables the specified metrics for collection and export. By default, only a subset of metrics are enabled. -
disableMetrics
Disables the specified metrics from being collected and exported. -
disableAllMetrics
Disable all metrics. If set to true all metrics must be explicitly enabled. -
enableTracing
-
build
Returns a newGrpcOpenTelemetrybuilt with the configuration of thisGrpcOpenTelemetry.Builder.
-