Class OpenTelemetryExporter.Builder
- Enclosing class:
- OpenTelemetryExporter
-
Method Summary
Modifier and TypeMethodDescriptionThe OTLP endpoint to send metric data to.Add an HTTP header to be applied to outgoing requests.intervalSeconds
(int intervalSeconds) The interval between the start of two export attempts.Specifies the OTLP transport protocol to be used when exporting metrics.registry
(PrometheusRegistry registry) resourceAttribute
(String name, String value) Add a resource attribute.serviceInstanceId
(String serviceInstanceId) Theservice.instance.id
resource attribute.serviceName
(String serviceName) Theservice.name
resource attribute.serviceNamespace
(String serviceNamespace) Theservice.namespace
resource attribute.serviceVersion
(String serviceVersion) Theservice.version
resource attribute.timeoutSeconds
(int timeoutSeconds) The timeout for outgoing requests.
-
Method Details
-
registry
-
protocol
Specifies the OTLP transport protocol to be used when exporting metrics.Supported values are
"grpc"
and"http/protobuf"
. Default is"grpc"
.See OpenTelemetry's OTEL_EXPORTER_OTLP_PROTOCOL.
-
endpoint
The OTLP endpoint to send metric data to.The default depends on the protocol:
"grpc"
:"http://localhost:4317"
"http/protobuf"
:"http://localhost:4318/v1/metrics"
"http/protobuf"
and the endpoint does not have the"/v1/metrics"
suffix, the"/v1/metrics"
suffix will automatically be appended.See OpenTelemetry's OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.
-
header
Add an HTTP header to be applied to outgoing requests. Call multiple times to add multiple headers.See OpenTelemetry's OTEL_EXPORTER_OTLP_HEADERS.
-
intervalSeconds
The interval between the start of two export attempts. Default is 60000.Like OpenTelemetry's OTEL_METRIC_EXPORT_INTERVAL, but in seconds rather than milliseconds.
-
timeoutSeconds
The timeout for outgoing requests. Default is 10.Like OpenTelemetry's OTEL_EXPORTER_OTLP_METRICS_TIMEOUT, but in seconds rather than milliseconds.
-
serviceName
Theservice.name
resource attribute.If not explicitly specified,
client_java
will try to initialize it with a reasonable default, like the JAR file name.See
service.name
in OpenTelemetry's Resource Semantic Conventions. -
serviceNamespace
Theservice.namespace
resource attribute.See
service.namespace
in OpenTelemetry's Resource Semantic Conventions. -
serviceInstanceId
Theservice.instance.id
resource attribute.See
service.instance.id
in OpenTelemetry's Resource Semantic Conventions. -
serviceVersion
Theservice.version
resource attribute.See
service.version
in OpenTelemetry's Resource Semantic Conventions. -
resourceAttribute
Add a resource attribute. Call multiple times to add multiple resource attributes.See OpenTelemetry's OTEL_RESOURCE_ATTRIBUTES.
-
buildAndStart
-