Skip to content

Commit 7332b61

Browse files
SylvainJugejackshirazicolleenmcginnis
authored
java edot skip certificate doc (#358)
* java edot skip certificate doc * Update docs/reference/edot-sdks/java/configuration.md Co-authored-by: jackshirazi <[email protected]> * add migration doc for new config option * add version to config options * Apply suggestions from code review Co-authored-by: Colleen McGinnis <[email protected]> --------- Co-authored-by: jackshirazi <[email protected]> Co-authored-by: Colleen McGinnis <[email protected]>
1 parent fecd31b commit 7332b61

File tree

2 files changed

+36
-15
lines changed

2 files changed

+36
-15
lines changed

docs/reference/edot-sdks/java/configuration.md

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,26 +55,27 @@ configuration options:
5555

5656
EDOT Java uses different defaults than the OpenTelemetry Java instrumentation for the following configuration options:
5757

58-
| Option | EDOT Java default | OpenTelemetry Java agent default |
59-
|----------------------------------------------------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
60-
| `OTEL_RESOURCE_PROVIDERS_AWS_ENABLED` | `true` | `false` ([docs](https://opentelemetry.io/docs/zero-code/java/agent/configuration/#enable-resource-providers-that-are-disabled-by-default)) |
61-
| `OTEL_RESOURCE_PROVIDERS_GCP_ENABLED` | `true` | `false` ([docs](https://opentelemetry.io/docs/zero-code/java/agent/configuration/#enable-resource-providers-that-are-disabled-by-default)) |
62-
| `OTEL_RESOURCE_PROVIDERS_AZURE_ENABLED` | `true` | `false` ([docs](https://opentelemetry.io/docs/zero-code/java/agent/configuration/#enable-resource-providers-that-are-disabled-by-default)) |
63-
| `OTEL_INSTRUMENTATION_RUNTIME-TELEMETRY_EMIT-EXPERIMENTAL-TELEMETRY` | `true` | `false` ([docs](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/runtime-telemetry/README.md)) |
64-
| `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` | `delta` (*) | `cumulative` ([docs](https://opentelemetry.io/docs/specs/otel/metrics/sdk_exporters/otlp/#additional-environment-variable-configuration)) |
58+
| Option | EDOT Java default | OpenTelemetry Java agent default | EDOT Java version |
59+
|----------------------------------------------------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------|-------------------|
60+
| `OTEL_RESOURCE_PROVIDERS_AWS_ENABLED` | `true` | `false` ([docs](https://opentelemetry.io/docs/zero-code/java/agent/configuration/#enable-resource-providers-that-are-disabled-by-default)) | 1.0.0+ |
61+
| `OTEL_RESOURCE_PROVIDERS_GCP_ENABLED` | `true` | `false` ([docs](https://opentelemetry.io/docs/zero-code/java/agent/configuration/#enable-resource-providers-that-are-disabled-by-default)) | 1.0.0+ |
62+
| `OTEL_RESOURCE_PROVIDERS_AZURE_ENABLED` | `true` | `false` ([docs](https://opentelemetry.io/docs/zero-code/java/agent/configuration/#enable-resource-providers-that-are-disabled-by-default)) | 1.4.0+ |
63+
| `OTEL_INSTRUMENTATION_RUNTIME-TELEMETRY_EMIT-EXPERIMENTAL-TELEMETRY` | `true` | `false` ([docs](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/runtime-telemetry/README.md)) | 1.4.0+ |
64+
| `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` | `delta` (*) | `cumulative` ([docs](https://opentelemetry.io/docs/specs/otel/metrics/sdk_exporters/otlp/#additional-environment-variable-configuration)) | 1.0.0+ |
6565

6666
(*) default value set to `delta` only if not already explicitly set.
6767

6868
The EDOT Java instrumentation agent also provides configuration options for each of the [supported features](/reference/edot-sdks/java/features.md).
6969
This table only contains minimal configuration, see each respective feature for exhaustive configuration options documentation.
7070

71-
| Option | Default | Feature |
72-
|--------------------------------------------------------|---------|--------------------------------------------------------------------------------------------------|
73-
| `OTEL_INFERRED_SPANS_ENABLED` | `false` | [Inferred spans](/reference/edot-sdks/java/features.md#inferred-spans) |
74-
| `OTEL_JAVA_EXPERIMENTAL_SPAN_STACKTRACE_MIN_DURATION` | `5ms` | [Span stacktrace](/reference/edot-sdks/java/features.md#span-stacktrace) |
75-
| `ELASTIC_OTEL_UNIVERSAL_PROFILING_INTEGRATION_ENABLED` | `auto` | [Elastic Universal profiling integration](/reference/edot-sdks/java/features.md#elastic-universal-profiling-integration) |
76-
| `OTEL_INSTRUMENTATION_OPENAI_CLIENT_ENABLED` | `true` | [OpenAI client instrumentation](/reference/edot-sdks/java/supported-technologies.md#openai-client-instrumentation) |
77-
| `ELASTIC_OTEL_JAVAAGENT_LOG_LEVEL` | `INFO` | [Agent logging](/reference/edot-sdks/java/configuration.md#agent-logging) |
71+
| Option | Default | Feature | EDOT Java version |
72+
|--------------------------------------------------------|---------|--------------------------------------------------------------------------------------------------------------------------|-------------------|
73+
| `OTEL_INFERRED_SPANS_ENABLED` | `false` | [Inferred spans](/reference/edot-sdks/java/features.md#inferred-spans) | 1.0.0+ |
74+
| `OTEL_JAVA_EXPERIMENTAL_SPAN_STACKTRACE_MIN_DURATION` | `5ms` | [Span stacktrace](/reference/edot-sdks/java/features.md#span-stacktrace) | 1.0.0+ |
75+
| `ELASTIC_OTEL_UNIVERSAL_PROFILING_INTEGRATION_ENABLED` | `auto` | [Elastic Universal profiling integration](/reference/edot-sdks/java/features.md#elastic-universal-profiling-integration) | 1.0.0+ |
76+
| `OTEL_INSTRUMENTATION_OPENAI_CLIENT_ENABLED` | `true` | [OpenAI client instrumentation](/reference/edot-sdks/java/supported-technologies.md#openai-client-instrumentation) | 1.4.0+ |
77+
| `ELASTIC_OTEL_JAVAAGENT_LOG_LEVEL` | `INFO` | [Agent logging](#agent-logging) | 1.5.0+ |
78+
| `ELASTIC_OTEL_VERIFY_SERVER_CERT` | `true` | [Exporter certificate verification](#exporter-certificate-verification) | 1.5.0+ |
7879

7980
## OpenAI Client settings
8081

@@ -157,4 +158,18 @@ Setting `OTEL_JAVAAGENT_LOGGING=none` or `ELASTIC_OTEL_JAVAAGENT_LOG_LEVEL=OFF`
157158

158159
Setting `OTEL_JAVAAGENT_LOGGING=application` will disable EDOT agent logging feature and attempt to use the application logger.
159160
As [documented here in the upstream documentation](https://opentelemetry.io/docs/zero-code/java/agent/configuration/#java-agent-logging-output),
160-
support for this depends on the application and logging libraries used.
161+
support for this depends on the application and logging libraries used.
162+
163+
## Exporter certificate verification
164+
165+
The EDOT Java agent provides the ability to toggle the exporter endpoint certificate verification with the `ELASTIC_OTEL_VERIFY_SERVER_CERT` configuration option (`true` by default).
166+
167+
When the endpoint certificate is not trusted by the JVM where the agent runs, the common symptom is security-related exceptions with the following message: `unable to find valid certification path to requested target`.
168+
169+
This is common in the following scenarios:
170+
- When endpoint uses a self-signed certificate not trusted by the JVM
171+
- When the certificate authority used by the endpoint certificate is not trusted by the JVM
172+
173+
One solution is to add the certificate or certificate authority to the JVM trust store, which requires modifying the JVM trust store.
174+
175+
If trust store modification is not possible or not practical, for example when troubleshooting or working with a local deployment, certificate verification can be disabled by setting `ELASTIC_OTEL_VERIFY_SERVER_CERT` to `false`. This however need to be evaluated carefully as it lowers the communication security and could allow for man-in-the-middle attacks where the data could be intercepted between the agent and the collector endpoint.

docs/reference/edot-sdks/java/migration.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,12 @@ With EDOT, application logs are automatically captured and sent by default.
180180

181181
This feature is controlled by `otel.logs.exporter`, which is set to `otlp` by default. You can turn it off by setting `otel.logs.exporter` to `none`.
182182

183+
### `verify_server_cert`
184+
185+
The Elastic [`verify_server_cert`](apm-agent-java://reference/config-reporter.md#config-verify-server-cert) option allows you to disable server certificate validation.
186+
187+
With EDOT, the equivalent configuration option is `ELASTIC_OTEL_VERIFY_SERVER_CERT` (default `true`), see [configuration](./configuration.md#exporter-certificate-verification) for details.
188+
183189
## Limitations
184190

185191
The following limitations apply to EDOT Java.

0 commit comments

Comments
 (0)