Move java sdk configuration documentation into docs site (#4377)

Co-authored-by: Phillip Carter <pcarter@fastmail.com>
This commit is contained in:
Jay DeLuca 2024-06-01 12:12:34 -04:00 committed by GitHub
parent e934234a6e
commit 05a20c1908
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 443 additions and 31 deletions

View File

@ -0,0 +1,413 @@
---
title: Configuration
linkTitle: Configuration
weight: 10
aliases: [config]
# prettier-ignore
cSpell:ignore: authservice blrp Dotel ignore LOWMEMORY myservice ottrace PKCS retryable
---
The OpenTelemetry SDK provides a working implementation of the API, and can be
set up and configured in a number of ways. The Java SDK supports most of the
available [configuration options](/docs/languages/sdk-configuration/). For
conformance details, see the
[compliance matrix](https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md).
{{% alert title="System Properties and Environment Variables" color="info" %}}
Any setting configurable with a system property can also be configured with an
environment variable. Apply the following steps to convert a system property to
an environment variable:
- Convert the name to uppercase.
- Replace all `.` and `-` characters with `_`.
For example `otel.instrumentation.common.default-enabled` would convert to
`OTEL_INSTRUMENTATION_COMMON_DEFAULT_ENABLED`.
{{% /alert %}}
## General
The autoconfigure module registers Java shutdown hooks to shut down the SDK when
appropriate. Please note that since this project uses `java.util.logging` for
all of it's logging, some of that logging may be suppressed during shutdown
hooks. This is a bug in the JDK itself, and not something we can control. If you
require logging during shutdown hooks, please consider using `System.out` rather
than a logging framework that might shut itself down in a shutdown hook, thus
suppressing your log messages. See this
[JDK bug](https://bugs.openjdk.java.net/browse/JDK-8161253) for more details.
{{% alert title="Signal configuration" color="info" %}}
The text placeholder `{signal}` refers to the supported
[OpenTelemetry Signal](/docs/concepts/signals/). Valid values include `traces`,
`metrics`, and `logs`.
{{% /alert %}}
### Configuration Priority
Signal specific configurations take priority over the generic versions.
For example, if you set both `otel.exporter.otlp.endpoint` and
`otel.exporter.otlp.traces.endpoint`, the latter will take precedence.
### Disabling OpenTelemetrySdk
The OpenTelemetry SDK can be disabled entirely. If disabled,
`AutoConfiguredOpenTelemetrySdk#getOpenTelemetrySdk()` will return a minimally
configured instance (i.e. `OpenTelemetrySdk.builder().build()`).
| System property | Description | Default |
| ------------------- | ----------------------------------------- | ------- |
| `otel.sdk.disabled` | If `true`, disable the OpenTelemetry SDK. | `false` |
### Exporters
Exporters output the telemetry. The following configuration properties are
common to all exporters:
| System property | Purpose |
| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `otel.{signal}.exporter` | List of exporters to be used for {signal}, separated by commas. Default is `otlp`. `none` means no auto-configured exporter. |
| `otel.java.experimental.exporter.memory_mode` | If `reusable_data`, enable reusable memory mode (on exporters which support it) to reduce allocations. Default is `immutable_data`. This option is experimental and subject to change or removal.[^1] |
[^1]:
Exporters which adhere to
`otel.java.experimental.exporter.memory_mode=reusable_data` are
`OtlpGrpcMetricExporter`, `OtlpHttpMetricExporter`, and `PrometheusHttpServer`.
Support for additional exporters may be added in the future.
#### OTLP exporter (span, metric, and log exporters)
The [OpenTelemetry Protocol (OTLP)](/docs/specs/otlp) span, metric, and log
exporters
| System property | Description | Default |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| `otel.{signal}.exporter` | Select the OpenTelemetry exporter for {signal}. | otlp |
| `otel.exporter.otlp.endpoint` | The OTLP traces, metrics, and logs endpoint to connect to. Must be a URL with a scheme of either `http` or `https` based on the use of TLS. If protocol is `http/protobuf` the version and signal will be appended to the path (e.g. `v1/traces`, `v1/metrics`, or `v1/logs`). | `http://localhost:4317` when protocol is `grpc`, and `http://localhost:4318/v1/{signal}` when protocol is `http/protobuf`. |
| `otel.exporter.otlp.{signal}.endpoint` | The OTLP {signal} endpoint to connect to. Must be a URL with a scheme of either `http` or `https` based on the use of TLS. | `http://localhost:4317` when protocol is `grpc`, and `http://localhost:4318/v1/{signal}` when protocol is `http/protobuf`. |
| `otel.exporter.otlp.certificate` | The path to the file containing trusted certificates to use when verifying an OTLP trace, metric, or log server's TLS credentials. The file should contain one or more X.509 certificates in PEM format. | The host platform's trusted root certificates are used. |
| `otel.exporter.otlp.{signal}.certificate` | The path to the file containing trusted certificates to use when verifying an OTLP {signal} server's TLS credentials. The file should contain one or more X.509 certificates in PEM format. | The host platform's trusted root certificates are used |
| `otel.exporter.otlp.client.key` | The path to the file containing private client key to use when verifying an OTLP trace, metric, or log client's TLS credentials. The file should contain one private key PKCS8 PEM format. | No client key file is used. |
| `otel.exporter.otlp.{signal}.client.key` | The path to the file containing private client key to use when verifying an OTLP {signal} client's TLS credentials. The file should contain one private key PKCS8 PEM format. | No client key file is used. |
| `otel.exporter.otlp.client.certificate` | The path to the file containing trusted certificates to use when verifying an OTLP trace, metric, or log client's TLS credentials. The file should contain one or more X.509 certificates in PEM format. | No chain file is used. |
| `otel.exporter.otlp.{signal}.client.certificate` | The path to the file containing trusted certificates to use when verifying an OTLP {signal} server's TLS credentials. The file should contain one or more X.509 certificates in PEM format. | No chain file is used. |
| `otel.exporter.otlp.headers` | Key-value pairs separated by commas to pass as request headers on OTLP trace, metric, and log requests. | |
| `otel.exporter.otlp.{signal}.headers` | Key-value pairs separated by commas to pass as request headers on OTLP {signal} requests. | |
| `otel.exporter.otlp.compression` | The compression type to use on OTLP trace, metric, and log requests. Options include `gzip`. | No compression will be used. |
| `otel.exporter.otlp.{signal}.compression` | The compression type to use on OTLP {signal} requests. Options include `gzip`. | No compression will be used. |
| `otel.exporter.otlp.timeout` | The maximum waiting time, in milliseconds, allowed to send each OTLP trace, metric, and log batch. | `10000` |
| `otel.exporter.otlp.{signal}.timeout` | The maximum waiting time, in milliseconds, allowed to send each OTLP {signal} batch. | `10000` |
| `otel.exporter.otlp.protocol` | The transport protocol to use on OTLP trace, metric, and log requests. Options include `grpc` and `http/protobuf`. | `grpc` [^2] |
| `otel.exporter.otlp.{signal}.protocol` | The transport protocol to use on OTLP {signal} requests. Options include `grpc` and `http/protobuf`. | `grpc` [^2] |
| `otel.exporter.otlp.metrics.temporality.preference` | The preferred output aggregation temporality. Options include `DELTA`, `LOWMEMORY`, and `CUMULATIVE`. If `CUMULATIVE`, all instruments will have cumulative temporality. If `DELTA`, counter (sync and async) and histograms will be delta, up down counters (sync and async) will be cumulative. If `LOWMEMORY`, sync counter and histograms will be delta, async counter and up down counters (sync and async) will be cumulative. | `CUMULATIVE` |
| `otel.exporter.otlp.metrics.default.histogram.aggregation` | The preferred default histogram aggregation. Options include `BASE2.EXPONENTIAL.BUCKET.HISTOGRAM` and `EXPLICIT.BUCKET.HISTOGRAM`. | `EXPLICIT.BUCKET.HISTOGRAM` |
| `otel.experimental.exporter.otlp.retry.enabled` | If `true`, enable [experimental retry support](#otlp-exporter-retry). | `false` |
[^2]:
OpenTelemetry Java agent 2.x uses `http/protobuf` by default.
To configure the service name for the OTLP exporter, add the `service.name` key
to the OpenTelemetry Resource. For example:
`OTEL_RESOURCE_ATTRIBUTES=service.name=myservice`.
##### OTLP exporter retry
[OTLP](/docs/specs/otlp/#otlpgrpc-response) requires that
[transient](/docs/specs/otel/protocol/exporter/#retry) errors be handled with a
retry strategy. When retry is enabled, retryable gRPC status codes are retried
using an exponential backoff with jitter algorithm as described in the
[gRPC Retry Design](https://github.com/grpc/proposal/blob/master/A6-client-retries.md#exponential-backoff).
The policy has the following configuration, which there is currently no way to
customize:
| Option | Description | Default |
| ------------------- | --------------------------------------------------------------- | ------- |
| `maxAttempts` | The maximum number of attempts, including the original request. | `5` |
| `initialBackoff` | The initial backoff duration. | `1s` |
| `maxBackoff` | The maximum backoff duration. | `5s` |
| `backoffMultiplier` | The backoff multiplier. | `1.5` |
#### Logging exporter
The logging exporter prints the name of the span along with its attributes to
stdout. It's mainly used for testing and debugging.
| Environment variable | Description |
| -------------------------------- | ----------------------------------------- |
| `otel.{signal}.exporter=console` | Select the logging exporter for {signal}. |
The logging exporter is also set when `otel.{signal}.exporter`, is set to
`logging`. `logging` is a deprecated alias for `console`, the preferred value as
[defined in the specification](/docs/specs/otel/configuration/sdk-environment-variables/#exporter-selection).
#### Logging OTLP JSON exporter
The logging-otlp exporter writes the telemetry data to the JUL logger in OTLP
JSON form. It's a more verbose output mainly used for testing and debugging.
| Environment variable | Description |
| ------------------------------------- | --------------------------------------------------- |
| `otel.{signal}.exporter=logging-otlp` | Select the logging OTLP JSON exporter for {signal}. |
{{% alert title="Note" color="info" %}} While the
`OtlpJsonLogging{Signal}Exporters` are stable, specifying their use via
`otel.{signal}.exporter=logging-otlp` is experimental and subject to change or
removal. {{% /alert %}}
### Resources
A resource is the immutable representation of the entity producing the
telemetry. See [Resource semantic conventions](/docs/specs/semconv/resource/)
for more details.
| System Property | Description |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| `otel.resource.attributes` | Specify resource attributes in the following format: `key1=val1,key2=val2,key3=val3`. |
| `otel.service.name` | Specify logical service name. Takes precedence over `service.name` defined with `otel.resource.attributes`. |
| `otel.experimental.resource.disabled-keys` | Specify resource attribute keys that are filtered. |
You almost always want to specify the
[`service.name`](/docs/specs/semconv/resource/#service) for your application. It
corresponds to how you describe the application, for example `authservice` could
be an application that authenticates requests. If not specified, SDK defaults
the service name to `unknown_service:java`.
### ResourceProvider SPI
The
[autoconfigure-spi](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure-spi)
SDK extension provides a `ResourceProvider` SPI that allows libraries to
automatically provide Resources, which are merged into a single Resource by the
autoconfiguration module. You can create your own `ResourceProvider`, or
optionally use an artifact that includes built-in ResourceProviders:
- [io.opentelemetry.instrumentation:opentelemetry-resources](https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/resources)
includes providers for a
[predefined set of common resources](https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/resources/library/src/main/java/io/opentelemetry/instrumentation/resources)
- [io.opentelemetry.contrib:opentelemetry-aws-resources](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-resources)
includes providers for
[common AWS resources](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-resources/src/main/java/io/opentelemetry/contrib/aws/resource)
- [io.opentelemetry.contrib:opentelemetry-gcp-resources](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/gcp-resources)
includes providers for
[common GCP resources](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/gcp-resources/src/main/java/io/opentelemetry/contrib/gcp/resource)
### Disabling automatic ResourceProviders
If you are using the `ResourceProvider` SPI, which many instrumentation agent
distributions include automatically, you can turn on or off one or more of them
by using the following configuration items:
| Environment variable | Description |
| --------------------------------------- | -------------------------------------------------------------------------------------------- |
| `otel.java.enabled.resource.providers` | Turns on one or more `ResourceProvider` types. If unset, all resource providers are enabled. |
| `otel.java.disabled.resource.providers` | Turns off one or more `ResourceProvider` types. |
The value for these properties must be a comma-separated list of fully qualified
`ResourceProvider` class names. For example, if you don't want to expose the
name of the operating system through the resource, you can pass the following
JVM argument:
`-Dotel.java.disabled.resource.providers=io.opentelemetry.instrumentation.resources.OsResourceProvider`
### Attribute limits
These properties can be used to control the maximum number and length of
attributes.
| System property | Description | Default |
| ----------------------------------- | -------------------------------------------------------------------------------------- | -------- |
| `otel.attribute.value.length.limit` | The maximum length of attribute values. Applies to spans and logs. | No limit |
| `otel.attribute.count.limit` | The maximum number of attributes. Applies to spans, span events, span links, and logs. | `128` |
### Propagators
The propagators determine which distributed tracing header formats are used, and
which baggage propagation header formats are used.
| System property | Description | Default |
| ------------------ | -------------------------------------------------------------------------------- | ---------------------------- |
| `otel.propagators` | The propagators to be used. Use a comma-separated list for multiple propagators. | `tracecontext,baggage` (W3C) |
Supported values are the following:
| Value | Description |
| -------------- | ---------------------------------------------------------------------------------------------------------------- |
| `tracecontext` | [W3C Trace Context](https://www.w3.org/TR/trace-context/) (add `baggage` as well to include W3C baggage). |
| `baggage` | [W3C Baggage](https://www.w3.org/TR/baggage/). |
| `b3` | [B3 Single](https://github.com/openzipkin/b3-propagation#single-header). |
| `b3multi` | [B3 Multi](https://github.com/openzipkin/b3-propagation#multiple-headers). |
| `jaeger` | [Jaeger](https://www.jaegertracing.io/docs/1.21/client-libraries/#propagation-format) (includes Jaeger baggage). |
| `xray` | [AWS X-Ray](https://docs.aws.amazon.com/xray/latest/devguide/xray-concepts.html#xray-concepts-tracingheader). |
| `ottrace` | [OT Trace](https://github.com/opentracing?q=basic&type=&language=). |
## Tracer provider
The following configuration options are specific to `SdkTracerProvider`. See
[general configuration](#general) for general configuration.
### Span exporters
The following exporters are only available for the trace signal. See
[exporters](#exporters) for general exporter configuration.
#### Jaeger exporter
{{% alert color="info" %}} The Jaeger exporters (artifacts
`opentelemetry-exporter-jaeger` and `opentelemetry-exporter-jaeger-thrift`) were
removed in the
[1.35.0](https://github.com/open-telemetry/opentelemetry-java/releases/tag/v1.35.0)
release (last published in `1.34.0`) and are no longer available in later
versions of autoconfigure. {{% /alert %}}
Jaeger now has [native support for OTLP](/blog/2022/jaeger-native-otlp/), and
users should export to Jaeger using [OTLP](/docs/languages/java/exporters/#otlp)
instead.
#### Zipkin exporter
The [Zipkin](https://zipkin.io/zipkin-api/) exporter sends JSON in
[Zipkin format](https://zipkin.io/zipkin-api/#/default/post_spans) to a
specified HTTP URL.
| System property | Description |
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `otel.traces.exporter=zipkin` | Select the Zipkin exporter |
| `otel.exporter.zipkin.endpoint` | The Zipkin endpoint to connect to. Default is `http://localhost:9411/api/v2/spans`. Currently only HTTP is supported. |
### Batch span processor
| System property | Description | Default |
| -------------------------------- | --------------------------------------------------------------- | ------- |
| `otel.bsp.schedule.delay` | The interval, in milliseconds, between two consecutive exports. | `5000` |
| `otel.bsp.max.queue.size` | The maximum queue size. | `2048` |
| `otel.bsp.max.export.batch.size` | The maximum batch size. | `512` |
| `otel.bsp.export.timeout` | The maximum allowed time, in milliseconds, to export data. | `30000` |
### Sampler
The sampler configures whether spans will be recorded for any call to
`SpanBuilder.startSpan`.
| System property | Description | Default |
| ------------------------- | ----------------------------------------------------------------------- | ----------------------- |
| `otel.traces.sampler` | The sampler to use for tracing. | `parentbased_always_on` |
| `otel.traces.sampler.arg` | An argument to the configured tracer if supported, for example a ratio. | |
Supported values for `otel.traces.sampler` are:
| Value | Description |
| -------------------------- | ------------------------------------------------------------------------------ |
| `always_on` | AlwaysOnSampler |
| `always_off` | AlwaysOffSampler |
| `traceidratio` | TraceIdRatioBased. `otel.traces.sampler.arg` sets the ratio. |
| `parentbased_always_on` | ParentBased(root=AlwaysOnSampler) |
| `parentbased_always_off` | ParentBased(root=AlwaysOffSampler) |
| `parentbased_traceidratio` | ParentBased(root=TraceIdRatioBased). `otel.traces.sampler.arg` sets the ratio. |
### Span limits
See [attribute limits](#attribute-limits) for general attribute limit
configuration.
These properties can be used to control the maximum size of spans by placing
limits on attributes, events, and links.
| System property | Description | Default |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------- | -------- |
| `otel.span.attribute.value.length.limit` | The maximum length of span attribute values. Takes precedence over `otel.attribute.value.length.limit`. | No limit |
| `otel.span.attribute.count.limit` | The maximum number of attributes per span. Takes precedence over `otel.attribute.count.limit`. | `128` |
| `otel.span.event.count.limit` | The maximum number of events per span. | `128` |
| `otel.span.link.count.limit` | The maximum number of links per span. | `128` |
## Meter provider
The following configuration options are specific to `SdkMeterProvider`. See
[general configuration](#general) for general configuration.
### Exemplars
| System property | Description | Default |
| ------------------------------ | ------------------------------------------------------------------------------------ | ------------- |
| `otel.metrics.exemplar.filter` | The filter for exemplar sampling. Can be `ALWAYS_OFF`, `ALWAYS_ON` or `TRACE_BASED`. | `TRACE_BASED` |
### Periodic Metric Reader
| System property | Description | Default |
| ----------------------------- | ------------------------------------------------------------------------ | ------- |
| `otel.metric.export.interval` | The interval, in milliseconds, between the start of two export attempts. | `60000` |
### Metric exporters
The following exporters are only available for the metric signal. See
[exporters](#exporters) for general exporter configuration.
#### Prometheus exporter
The
[Prometheus](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md)
exporter.
| System property | Description | Default |
| ---------------------------------- | ---------------------------------------------------------------------------------- | --------- |
| `otel.metrics.exporter=prometheus` | Select the Prometheus exporter | |
| `otel.exporter.prometheus.port` | The local port used to bind the prometheus metric server. Default is `9464`. | `9464` |
| `otel.exporter.prometheus.host` | The local address used to bind the prometheus metric server. Default is `0.0.0.0`. | `0.0.0.0` |
Note that this is a pull exporter - it opens up a server on the local process
listening on the specified host and port, which a Prometheus server scrapes
from.
### Cardinality Limits
| System property | Description | Default |
| --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------- |
| `otel.experimental.metrics.cardinality.limit` | If set, configure experimental cardinality limit. The value dictates the maximum number of distinct points per metric. | `2000` |
## Logger provider
The following configuration options are specific to `SdkLoggerProvider`. See
[general configuration](#general) for general configuration.
### Batch log record processor
| System property | Description | Default |
| --------------------------------- | --------------------------------------------------------------- | ------- |
| `otel.blrp.schedule.delay` | The interval, in milliseconds, between two consecutive exports. | `1000` |
| `otel.blrp.max.queue.size` | The maximum queue size. | `2048` |
| `otel.blrp.max.export.batch.size` | The maximum batch size. | `512` |
| `otel.blrp.export.timeout` | The maximum allowed time, in milliseconds, to export data. | `30000` |
## Customizing the OpenTelemetry SDK
Autoconfiguration exposes SPI
[hooks](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure-spi/src/main/java/io/opentelemetry/sdk/autoconfigure/spi)
for customizing behavior programmatically as needed. It's recommended to use the
above configuration properties where possible, only implementing the SPI to add
functionality not found in the SDK by default.
## File Configuration
**Status**: [Experimental](/docs/specs/otel/versioning-and-stability)
{{% alert title="Note" color="warning" %}} When a config file is specified,
other environment variables described in this document along with SPI
[customizations](#customizing-the-opentelemetry-sdk) are ignored. The contents
of the file alone dictate SDK configuration. {{% /alert %}}
File configuration allows for configuration via a YAML as described in
[opentelemetry-configuration](https://github.com/open-telemetry/opentelemetry-configuration)
and [file configuration](/docs/specs/otel/configuration/file-configuration/).
To use, include
`io.opentelemetry:opentelemetry-sdk-extension:incubator:<version>` and specify
the path to the config file as described in the table below.
| System property | Purpose | Default |
| ------------------------------- | --------------------------------------- | ------- |
| `otel.experimental.config.file` | The path to the SDK configuration file. | Unset |

View File

@ -10,25 +10,8 @@ cSpell:ignore: akka armeria classloaders couchbase Customizer datasource dbcp Do
## SDK Autoconfiguration
The SDK's autoconfiguration module is used for basic configuration of the agent.
Read the
[docs](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure)
to find settings such as configuring export or sampling.
Here are some quick links into those docs for the configuration options for
specific portions of the SDK & agent:
- [Exporters](https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#exporters)
- [OTLP exporter (span, metric, and log exporters)](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure/README.md#otlp-exporter-span-metric-and-log-exporters)
- [Jaeger exporter](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure/README.md#jaeger-exporter)
- [Zipkin exporter](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure/README.md#zipkin-exporter)
- [Prometheus exporter](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure/README.md#prometheus-exporter)
- [Logging exporter](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure/README.md#logging-exporter)
- [Trace context propagation](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure/README.md#propagator)
- [OpenTelemetry Resource and service name](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure/README.md#opentelemetry-resource)
- [Batch span processor](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure/README.md#batch-span-processor)
- [Sampler](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure/README.md#sampler)
- [Span limits](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure/README.md#span-limits)
- [Using SPI to further configure the SDK](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure/README.md#customizing-the-opentelemetry-sdk)
Read the [docs](/docs/languages/java/configuration) to find settings such as
configuring export or sampling.
{{% alert title="Important" color="warning" %}}
@ -44,14 +27,14 @@ In addition to the resource configuration from the SDK autoconfiguration, you
can enable additional resource providers that are disabled by default:
{{% config_option
name="otel.resource.providers.aws.enabled"
default=false
name="otel.resource.providers.aws.enabled"
default=false
%}} Enables the [AWS Resource Provider](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-resources).
{{% /config_option %}}
{{% config_option
name="otel.resource.providers.gcp.enabled"
default=false
name="otel.resource.providers.gcp.enabled"
default=false
%}} Enables the [GCP Resource Provider](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/gcp-resources).
{{% /config_option %}}
@ -188,8 +171,8 @@ This behavior is turned on by default for all database instrumentations. Use the
following property to disable it:
{{% config_option
name="otel.instrumentation.common.db-statement-sanitizer.enabled"
default=true
name="otel.instrumentation.common.db-statement-sanitizer.enabled"
default=true
%}} Enables the DB statement sanitization. {{% /config_option %}}
### Capturing HTTP request and response headers
@ -243,8 +226,8 @@ You can configure the agent to capture the consumer message receive telemetry in
messaging instrumentation. Use the following property to enable it:
{{% config_option
name="otel.instrumentation.messaging.experimental.receive-telemetry.enabled"
default=false
name="otel.instrumentation.messaging.experimental.receive-telemetry.enabled"
default=false
%}} Enables the consumer message receive telemetry. {{% /config_option %}}
Note that this will cause the consumer side to start a new trace, with only a
@ -491,13 +474,13 @@ associated span name on the parent
[SpanKind.Server](/docs/specs/otel/trace/api/#spankind) span.
{{% config_option
name="otel.instrumentation.common.experimental.controller-telemetry.enabled"
default=false
name="otel.instrumentation.common.experimental.controller-telemetry.enabled"
default=false
%}} Set to `true` to enable controller telemetry. {{% /config_option %}}
{{% config_option
name="otel.instrumentation.common.experimental.view-telemetry.enabled"
default=false
name="otel.instrumentation.common.experimental.view-telemetry.enabled"
default=false
%}} Set to `true` to enable view telemetry. {{% /config_option %}}
### Instrumentation span suppression behavior

View File

@ -211,6 +211,10 @@
"StatusCode": 206,
"LastSeen": "2024-01-30T15:25:24.128818-05:00"
},
"https://bugs.openjdk.java.net/browse/JDK-8161253": {
"StatusCode": 200,
"LastSeen": "2024-05-25T07:41:26.50757-04:00"
},
"https://bundler.io/": {
"StatusCode": 206,
"LastSeen": "2024-01-30T06:01:19.540115-05:00"
@ -3751,6 +3755,10 @@
"StatusCode": 200,
"LastSeen": "2024-01-30T16:15:09.842104-05:00"
},
"https://github.com/open-telemetry/opentelemetry-java/releases/tag/v1.35.0": {
"StatusCode": 200,
"LastSeen": "2024-04-27T13:39:34.845798-04:00"
},
"https://github.com/open-telemetry/opentelemetry-java/releases/tag/v1.38.0": {
"StatusCode": 200,
"LastSeen": "2024-05-24T10:11:28.259677-05:00"
@ -6023,6 +6031,10 @@
"StatusCode": 206,
"LastSeen": "2024-03-19T10:16:59.755536357Z"
},
"https://opentelemetry.io/blog/2022/jaeger-native-otlp/": {
"StatusCode": 206,
"LastSeen": "2024-04-27T13:39:35.171666-04:00"
},
"https://opentelemetry.io/blog/2024/otel-collector-anti-patterns/": {
"StatusCode": 206,
"LastSeen": "2024-05-06T07:53:28.679391-07:00"
@ -9471,6 +9483,10 @@
"StatusCode": 206,
"LastSeen": "2024-01-18T19:07:54.399973-05:00"
},
"https://zipkin.io/zipkin-api/#/default/post_spans": {
"StatusCode": 206,
"LastSeen": "2024-04-27T13:39:35.686013-04:00"
},
"https://zoom.us/j/5227112777": {
"StatusCode": 200,
"LastSeen": "2024-01-18T19:55:41.25487-05:00"