Class ExporterOpenTelemetryProperties.Builder
- Enclosing class:
ExporterOpenTelemetryProperties
-
Method Summary
Modifier and TypeMethodDescriptionbuild()The 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.The OTLP protocol to use.resourceAttribute(String name, String value) Add a resource attribute.serviceInstanceId(String serviceInstanceId) Theservice.instance.idresource attribute.serviceName(String serviceName) Theservice.nameresource attribute.serviceNamespace(String serviceNamespace) Theservice.namespaceresource attribute.serviceVersion(String serviceVersion) Theservice.versionresource attribute.timeoutSeconds(int timeoutSeconds) The timeout for outgoing requests.
-
Method Details
-
protocol
The OTLP protocol to use.Supported values:
"grpc"or"http/protobuf".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"
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 60 seconds.Like OpenTelemetry's OTEL_METRIC_EXPORT_INTERVAL (which defaults to 60000 milliseconds), but specified 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.nameresource attribute.If not explicitly specified,
client_javawill try to initialize it with a reasonable default, like the JAR file name.See
service.namein OpenTelemetry's Resource Semantic Conventions. -
serviceNamespace
Theservice.namespaceresource attribute.See
service.namespacein OpenTelemetry's Resource Semantic Conventions. -
serviceInstanceId
Theservice.instance.idresource attribute.See
service.instance.idin OpenTelemetry's Resource Semantic Conventions. -
serviceVersion
Theservice.versionresource attribute.See
service.versionin OpenTelemetry's Resource Semantic Conventions. -
resourceAttribute
Add a resource attribute. Call multiple times to add multiple resource attributes.See OpenTelemetry's OTEL_RESOURCE_ATTRIBUTES.
-
build
-