diff --git a/content/en/docs/languages/java/configuration.md b/content/en/docs/languages/java/configuration.md index 5668297caa6d..86cdd3586895 100644 --- a/content/en/docs/languages/java/configuration.md +++ b/content/en/docs/languages/java/configuration.md @@ -141,13 +141,13 @@ returns a minimally configured instance (for example, Properties for configuring [resource](../sdk/#resource): -| System property | Description | Default | -| ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | -| `otel.service.name` | Specify logical service name. Takes precedence over `service.name` defined with `otel.resource.attributes`. | `unknown_service:java` | -| `otel.resource.attributes` | Specify resource attributes in the following format: `key1=val1,key2=val2,key3=val3`. | | -| `otel.experimental.resource.disabled-keys` | Specify resource attribute keys to filter. This option is experimental and subject to change or removal. | | -| `otel.java.enabled.resource.providers` | Comma-separated list of `ResourceProvider` fully qualified class names to enable. **[1]** If unset, all resource providers are enabled. | | -| `otel.java.disabled.resource.providers` | Comma-separated list of `ResourceProvider` fully qualified class names to disable. **[1]** | | +| System property | Description | Default | +| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | +| `otel.service.name` | Specify logical service name. Takes precedence over `service.name` defined with `otel.resource.attributes`. | `unknown_service:java` | +| `otel.resource.attributes` | Specify resource attributes in the following format: `key1=val1,key2=val2,key3=val3`. | | +| `otel.resource.disabled-keys` | Specify resource attribute keys to filter. | | +| `otel.java.enabled.resource.providers` | Comma-separated list of `ResourceProvider` fully qualified class names to enable. **[1]** If unset, all resource providers are enabled. | | +| `otel.java.disabled.resource.providers` | Comma-separated list of `ResourceProvider` fully qualified class names to disable. **[1]** | | **[1]**: For example, to disable the [OS resource provider](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/resources/library/src/main/java/io/opentelemetry/instrumentation/resources/OsResourceProvider.java), @@ -260,12 +260,12 @@ exporters via `otel.logs.exporter`: Properties for setting exporters: -| System property | Purpose | Default | -| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- | -| `otel.traces.exporter` | Comma-separated list of span exporters. Known values include `otlp`, `zipkin`, `console`, `logging-otlp`, `none`. **[1]** | `otlp` | -| `otel.metrics.exporter` | Comma-separated list of metric exporters. Known values include `otlp`, `prometheus`, `none`. **[1]** | `otlp` | -| `otel.logs.exporter` | Comma-separated list of log record exporters. Known values include `otlp`, `console`, `logging-otlp`, `none`. **[1]** | `otlp` | -| `otel.java.experimental.exporter.memory_mode` | If `reusable_data`, enable reusable memory mode (on exporters which support it) to reduce allocations. Known values include `reusable_data`, `immutable_data`. This option is experimental and subject to change or removal. **[2]** | `immutable_data` | +| System property | Purpose | Default | +| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | +| `otel.traces.exporter` | Comma-separated list of span exporters. Known values include `otlp`, `zipkin`, `console`, `logging-otlp`, `none`. **[1]** | `otlp` | +| `otel.metrics.exporter` | Comma-separated list of metric exporters. Known values include `otlp`, `prometheus`, `none`. **[1]** | `otlp` | +| `otel.logs.exporter` | Comma-separated list of log record exporters. Known values include `otlp`, `console`, `logging-otlp`, `none`. **[1]** | `otlp` | +| `otel.java.exporter.memory_mode` | If `reusable_data`, enable reusable memory mode (on exporters which support it) to reduce allocations. Known values include `reusable_data`, `immutable_data`. **[2]** | `reusable_data` | **[1]**: Known exporters and artifacts (see [span exporter](../sdk/#spanexporter), @@ -277,10 +277,12 @@ Properties for setting exporters: - `console` configures `LoggingSpanExporter`, `LoggingMetricExporter`, `SystemOutLogRecordExporter`. - `logging-otlp` configures `OtlpJsonLogging{Signal}Exporter`. +- `experimental-otlp/stdout` configures `OtlpStdout{Signal}Exporter` (this + option is experimental and subject to change or removal). **[2]**: Exporters which adhere to -`otel.java.experimental.exporter.memory_mode=reusable_data` are -`OtlpGrpc{Signal}Exporter`, `OtlpHttp{Signal}Exporter`, and +`otel.java.exporter.memory_mode=reusable_data` are `OtlpGrpc{Signal}Exporter`, +`OtlpHttp{Signal}Exporter`, `OtlpStdout{Signal}Exporter`, and `PrometheusHttpServer`. Properties for `otlp` span, metric, and log exporters: @@ -306,7 +308,7 @@ Properties for `otlp` span, metric, and log exporters: | `otel.exporter.otlp.{signal}.timeout` | The maximum waiting time, in milliseconds, allowed to send each OTLP {signal} batch. | `10000` | | `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`, retry on when transient errors occur. **[2]** | `false` | +| `otel.java.exporter.otlp.retry.enabled` | If `true`, retry on when transient errors occur. **[2]** | `true` | **NOTE:** The text placeholder `{signal}` refers to the supported [OpenTelemetry Signal](/docs/concepts/signals/). Valid values include `traces`, diff --git a/content/en/docs/languages/java/sdk.md b/content/en/docs/languages/java/sdk.md index f2c58896dbce..63235139dc14 100644 --- a/content/en/docs/languages/java/sdk.md +++ b/content/en/docs/languages/java/sdk.md @@ -425,15 +425,16 @@ for exporting spans out of process. Rather than directly registering with Span exporters built-in to the SDK and maintained by the community in `opentelemetry-java-contrib`: -| Class | Artifact | Description | -| ------------------------------ | ---------------------------------------------------------------------------------------- | -------------------------------------------------------- | -| `OtlpHttpSpanExporter` **[1]** | `io.opentelemetry:opentelemetry-exporter-otlp:{{% param vers.otel %}}` | Exports spans via OTLP `http/protobuf`. | -| `OtlpGrpcSpanExporter` **[1]** | `io.opentelemetry:opentelemetry-exporter-otlp:{{% param vers.otel %}}` | Exports spans via OTLP `grpc`. | -| `LoggingSpanExporter` | `io.opentelemetry:opentelemetry-exporter-logging:{{% param vers.otel %}}` | Logs spans to JUL in a debugging format. | -| `OtlpJsonLoggingSpanExporter` | `io.opentelemetry:opentelemetry-exporter-logging-otlp:{{% param vers.otel %}}` | Logs spans to JUL in the OTLP JSON encoding. | -| `ZipkinSpanExporter` | `io.opentelemetry:opentelemetry-exporter-zipkin:{{% param vers.otel %}}` | Export spans to Zipkin. | -| `InterceptableSpanExporter` | `io.opentelemetry.contrib:opentelemetry-processors:{{% param vers.contrib %}}-alpha` | Passes spans to a flexible interceptor before exporting. | -| `KafkaSpanExporter` | `io.opentelemetry.contrib:opentelemetry-kafka-exporter:{{% param vers.contrib %}}-alpha` | Exports spans by writing to a Kafka topic. | +| Class | Artifact | Description | +| ------------------------------ | ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `OtlpHttpSpanExporter` **[1]** | `io.opentelemetry:opentelemetry-exporter-otlp:{{% param vers.otel %}}` | Exports spans via OTLP `http/protobuf`. | +| `OtlpGrpcSpanExporter` **[1]** | `io.opentelemetry:opentelemetry-exporter-otlp:{{% param vers.otel %}}` | Exports spans via OTLP `grpc`. | +| `LoggingSpanExporter` | `io.opentelemetry:opentelemetry-exporter-logging:{{% param vers.otel %}}` | Logs spans to JUL in a debugging format. | +| `OtlpJsonLoggingSpanExporter` | `io.opentelemetry:opentelemetry-exporter-logging-otlp:{{% param vers.otel %}}` | Logs spans to JUL in an OTLP JSON encoding. | +| `OtlpStdoutSpanExporter` | `io.opentelemetry:opentelemetry-exporter-logging-otlp:{{% param vers.otel %}}` | Logs spans to `System.out` in the OTLP [JSON file encoding][] (experimental). | +| `ZipkinSpanExporter` | `io.opentelemetry:opentelemetry-exporter-zipkin:{{% param vers.otel %}}` | Export spans to Zipkin. | +| `InterceptableSpanExporter` | `io.opentelemetry.contrib:opentelemetry-processors:{{% param vers.contrib %}}-alpha` | Passes spans to a flexible interceptor before exporting. | +| `KafkaSpanExporter` | `io.opentelemetry.contrib:opentelemetry-kafka-exporter:{{% param vers.contrib %}}-alpha` | Exports spans by writing to a Kafka topic. | **[1]**: See [OTLP exporter sender](#otlp-exporter-senders) for implementation details. @@ -743,13 +744,14 @@ for exporting metrics out of process. Rather than directly registering with Metric exporters built-in to the SDK and maintained by the community in `opentelemetry-java-contrib`: -| Class | Artifact | Description | -| -------------------------------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------------- | -| `OtlpHttpMetricExporter` **[1]** | `io.opentelemetry:opentelemetry-exporter-otlp:{{% param vers.otel %}}` | Exports metrics via OTLP `http/protobuf`. | -| `OtlpGrpcMetricExporter` **[1]** | `io.opentelemetry:opentelemetry-exporter-otlp:{{% param vers.otel %}}` | Exports metrics via OTLP `grpc`. | -| `LoggingMetricExporter` | `io.opentelemetry:opentelemetry-exporter-logging:{{% param vers.otel %}}` | Logs metrics to JUL in a debugging format. | -| `OtlpJsonLoggingMetricExporter` | `io.opentelemetry:opentelemetry-exporter-logging-otlp:{{% param vers.otel %}}` | Logs metrics to JUL in the OTLP JSON encoding. | -| `InterceptableMetricExporter` | `io.opentelemetry.contrib:opentelemetry-processors:{{% param vers.contrib %}}-alpha` | Passes metrics to a flexible interceptor before exporting. | +| Class | Artifact | Description | +| -------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- | +| `OtlpHttpMetricExporter` **[1]** | `io.opentelemetry:opentelemetry-exporter-otlp:{{% param vers.otel %}}` | Exports metrics via OTLP `http/protobuf`. | +| `OtlpGrpcMetricExporter` **[1]** | `io.opentelemetry:opentelemetry-exporter-otlp:{{% param vers.otel %}}` | Exports metrics via OTLP `grpc`. | +| `LoggingMetricExporter` | `io.opentelemetry:opentelemetry-exporter-logging:{{% param vers.otel %}}` | Logs metrics to JUL in a debugging format. | +| `OtlpJsonLoggingMetricExporter` | `io.opentelemetry:opentelemetry-exporter-logging-otlp:{{% param vers.otel %}}` | Logs metrics to JUL in the OTLP JSON encoding. | +| `OtlpStdoutMetricExporter` | `io.opentelemetry:opentelemetry-exporter-logging-otlp:{{% param vers.otel %}}` | Logs metrics to `System.out` in the OTLP [JSON file encoding][] (experimental). | +| `InterceptableMetricExporter` | `io.opentelemetry.contrib:opentelemetry-processors:{{% param vers.contrib %}}-alpha` | Passes metrics to a flexible interceptor before exporting. | **[1]**: See [OTLP exporter sender](#otlp-exporter-senders) for implementation details. @@ -1063,13 +1065,14 @@ for exporting log records out of process. Rather than directly registering with Span exporters built-in to the SDK and maintained by the community in `opentelemetry-java-contrib`: -| Class | Artifact | Description | -| ------------------------------------------ | ------------------------------------------------------------------------------------ | -------------------------------------------------------------- | -| `OtlpHttpLogRecordExporter` **[1]** | `io.opentelemetry:opentelemetry-exporter-otlp:{{% param vers.otel %}}` | Exports log records via OTLP `http/protobuf`. | -| `OtlpGrpcLogRecordExporter` **[1]** | `io.opentelemetry:opentelemetry-exporter-otlp:{{% param vers.otel %}}` | Exports log records via OTLP `grpc`. | -| `SystemOutLogRecordExporter` | `io.opentelemetry:opentelemetry-exporter-logging:{{% param vers.otel %}}` | Logs log records to system out in a debugging format. | -| `OtlpJsonLoggingLogRecordExporter` **[2]** | `io.opentelemetry:opentelemetry-exporter-logging-otlp:{{% param vers.otel %}}` | Logs log records to JUL in the OTLP JSON encoding. | -| `InterceptableLogRecordExporter` | `io.opentelemetry.contrib:opentelemetry-processors:{{% param vers.contrib %}}-alpha` | Passes log records to a flexible interceptor before exporting. | +| Class | Artifact | Description | +| ------------------------------------------ | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------- | +| `OtlpHttpLogRecordExporter` **[1]** | `io.opentelemetry:opentelemetry-exporter-otlp:{{% param vers.otel %}}` | Exports log records via OTLP `http/protobuf`. | +| `OtlpGrpcLogRecordExporter` **[1]** | `io.opentelemetry:opentelemetry-exporter-otlp:{{% param vers.otel %}}` | Exports log records via OTLP `grpc`. | +| `SystemOutLogRecordExporter` | `io.opentelemetry:opentelemetry-exporter-logging:{{% param vers.otel %}}` | Logs log records to system out in a debugging format. | +| `OtlpJsonLoggingLogRecordExporter` **[2]** | `io.opentelemetry:opentelemetry-exporter-logging-otlp:{{% param vers.otel %}}` | Logs log records to JUL in the OTLP JSON encoding. | +| `OtlpStdoutLogRecordExporter` | `io.opentelemetry:opentelemetry-exporter-logging-otlp:{{% param vers.otel %}}` | Logs log records to `System.out` in the OTLP [JSON file encoding][] (experimental). | +| `InterceptableLogRecordExporter` | `io.opentelemetry.contrib:opentelemetry-processors:{{% param vers.contrib %}}-alpha` | Passes log records to a flexible interceptor before exporting. | **[1]**: See [OTLP exporter sender](#otlp-exporter-senders) for implementation details. @@ -1382,3 +1385,6 @@ you must also add a dependency on a ### Testing TODO: document tools available for testing the SDK + +[JSON file encoding]: + /docs/specs/otel/protocol/file-exporter/#json-file-serialization