Skip to content

Commit 03e4916

Browse files
authored
move docs to EDOT docs (#592)
* move docs * disable configuration export test
1 parent e5aa4e1 commit 03e4916

File tree

5 files changed

+18
-439
lines changed

5 files changed

+18
-439
lines changed

README.md

Lines changed: 13 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
[![Snapshot status](https://badge.buildkite.com/e527255a5d6e7f5a940bc71911d8bc2be25d16702d7642c0d6.svg)](https://buildkite.com/elastic/elastic-otel-java-snapshot)
44
[![Release status](https://badge.buildkite.com/8bac74f475ea0d5d17ea3ea2ecf2c27a319414b97ce03dbd21.svg)](https://buildkite.com/elastic/elastic-otel-java-release)
55

6-
The Elastic Distribution of OpenTelemetry Java (EDOT Java) is a customized version of the [OpenTelemetry Java agent](https://github.com/open-telemetry/opentelemetry-java-instrumentation). Use EDOT Java to start the OpenTelemetry SDK with your Java application, and automatically capture tracing data, performance metrics, and logs. Traces, metrics, and logs can be sent to any OpenTelemetry Protocol (OTLP) collector you choose.
6+
The Elastic Distribution of OpenTelemetry Java (EDOT Java) is a customized version of the [OpenTelemetry Java instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation). Use EDOT Java to start the OpenTelemetry SDK with your Java application, and automatically capture tracing data, performance metrics, and logs. Traces, metrics, and logs can be sent to any OpenTelemetry Protocol (OTLP) collector you choose.
77

8-
With EDOT Java you have access to all the features of the OpenTelemetry Java agent plus:
8+
With EDOT Java you have access to all the features and supported technologies of the OpenTelemetry Java instrumentation agent plus:
99

10-
* Access to SDK improvements and bug fixes contributed by the Elastic team _before_ the changes are available upstream in OpenTelemetry repositories.
11-
* Access to optional features that can enhance OpenTelemetry data that is being sent to Elastic (for example, [inferred spans](#inferred-spans) and [span stacktrace](#span-stacktrace)).
12-
13-
**Ready to try out EDOT Java?** Follow the step-by-step instructions in [Get started](./docs/get-started.md).
10+
- additional [features](https://elastic.github.io/opentelemetry/edot-sdks/java/features.html), for example:
11+
- [Inferred spans](https://elastic.github.io/opentelemetry/edot-sdks/java/features.html#inferred-spans)
12+
- [Span stacktrace](https://elastic.github.io/opentelemetry/edot-sdks/java/features.html#span-stacktrace)
13+
- [Elastic universal profiling integration](https://elastic.github.io/opentelemetry/edot-sdks/java/features.html#elastic-universal-profiling-integration)
14+
- ...
15+
- additional [supported technologies](https://elastic.github.io/opentelemetry/edot-sdks/java/supported-technologies.html)
1416

1517
We welcome your feedback! You can reach us by [opening a GitHub issue](https://github.com/elastic/elastic-otel-java/issues) or starting a discussion thread on the [Elastic Discuss forum](https://discuss.elastic.co/tags/c/observability/apm/58/java).
1618

@@ -29,11 +31,13 @@ java -javaagent:/path/to/agent.jar \
2931
-jar myapp.jar
3032
```
3133

34+
Using the `JAVA_TOOL_OPTIONS` environment variable can be used when modifying the JVM command line is not possible.
35+
3236
## Read the docs
3337

34-
* [Get started](./docs/get-started.md)
35-
* [Configure the Elastic Distribution of OpenTelemetry Java](./docs/configure.md)
36-
* [Migrate to the Elastic Distribution of OpenTelemetry Java](./docs/migrate.md) from the [Elastic APM Java agent](https://github.com/elastic/apm-agent-java)
38+
* [EDOT Java](https://elastic.github.io/opentelemetry/edot-sdks/java/index.html)
39+
* [EDOT Java configuration](https://elastic.github.io/opentelemetry/edot-sdks/java/configuration.html)
40+
* [EDOT Java migration](https://elastic.github.io/opentelemetry/edot-sdks/java/migration.html) from the [Elastic APM Java agent](https://github.com/elastic/apm-agent-java)
3741

3842
## Build and Test
3943

@@ -46,46 +50,6 @@ You can run the tests locally using `./gradlew test`. You can optionally specify
4650

4751
You don't need to have a corresponding JVM installed, gradle automatically will download a matching one.
4852

49-
## Features
50-
51-
### Resource attributes
52-
53-
The agent enables the following resource attributes providers from [opentelemetry-java-contrib](https://github.com/open-telemetry/opentelemetry-java-contrib/)
54-
- AWS: [aws-resources](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-resources)
55-
- GCP: [gcp-resources](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/gcp-resources)
56-
- application server service name detection: [resource-providers](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/resource-providers)
57-
58-
The attributes for cloud providers are captured asynchronously to prevent application startup overhead due to calling an internal metadata API.
59-
60-
### Inferred spans
61-
62-
Set `OTEL_INFERRED_SPANS_ENABLED=true` to enable.
63-
64-
See [inferred spans](./inferred-spans/README.md) for more details
65-
66-
### Span stacktrace
67-
68-
The agent captures the stacktraces of spans to help identify code paths that triggered them.
69-
70-
The stacktrace is stored in the [`code.stacktrace`](https://opentelemetry.io/docs/specs/semconv/attributes-registry/code/) attribute.
71-
72-
The minimum span duration can be configured with `elastic.otel.java.span-stacktrace.min.duration` (defaults to `5ms`).
73-
74-
Implementation has been contributed upstream in the [opentelemetry-java-contrib](https://github.com/open-telemetry/opentelemetry-java-contrib) repository,
75-
in the [`span-stacktrace`](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/span-stacktrace) folder.
76-
77-
### Runtime metrics
78-
79-
Experimental runtime metrics are enabled by default.
80-
Set `otel.instrumentation.runtime-telemetry.emit-experimental-telemetry` to `false` to disable them.
81-
82-
83-
### Metric Temporality
84-
85-
Elasticsearch and Kibana work best with metrics provided in delta-temporality.
86-
Therefore, the EDOT Java changes the default value of `otel.exporter.otlp.metrics.temporality.preference` to `DELTA`.
87-
You can override this default if needed, note though that some provided Kibana dashboards will not work correctly in this case.
88-
8953
# License
9054

9155
The Elastic Distribution of OpenTelemetry Java is licensed under [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html).

custom/src/test/java/co/elastic/otel/config/ConfigurationExporterTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@
3535
import java.util.Map;
3636
import java.util.stream.Collectors;
3737
import org.junit.jupiter.api.BeforeEach;
38+
import org.junit.jupiter.api.Disabled;
3839
import org.junit.jupiter.api.Test;
3940

41+
@Disabled
4042
public class ConfigurationExporterTest {
4143

4244
private Path currentDocumentationPath;

docs/configure.md

Lines changed: 1 addition & 197 deletions
Original file line numberDiff line numberDiff line change
@@ -1,197 +1 @@
1-
<!--
2-
Goal of this doc:
3-
Provide a complete reference of all available configuration options and where/how they can be set. (Any Elastic-specific configuration options are listed directly. General OpenTelemetry configuration options are linked.)
4-
-->
5-
6-
# Configure the Elastic Distribution
7-
8-
Configure the Elastic Distribution of OpenTelemetry Java (EDOT Java) to send data to Elastic.
9-
10-
<!-- ✅ How users set configuration options -->
11-
## Configuration methods
12-
13-
Set OpenTelemetry configuration options using one of the mechanisms listed in the
14-
[OpenTelemetry agent documentation](https://opentelemetry.io/docs/zero-code/java/agent/configuration/)
15-
and [OpenTelemetry SDK documentation](https://opentelemetry.io/docs/languages/java/configuration/),
16-
including:
17-
18-
* [Environment variables](#environment-variables)
19-
* [System properties](#system-properties)
20-
* [Configuration file](#configuration-file)
21-
22-
<!-- ✅ Order of precedence -->
23-
Configuration options set using environment variables take precedence over system properties, and
24-
system properties take precedence over configuration options set using file properties.
25-
26-
### Environment variables
27-
28-
<!-- ✅ What and why -->
29-
EDOT Java can be configured using environment variables.
30-
This is a cross-platform way to configure EDOT Java and is especially useful in containerized environments.
31-
32-
<!-- ✅ How -->
33-
Define environment variables before starting the JVM:
34-
35-
```sh
36-
export OTEL_SERVICE_NAME=my-service
37-
java ...
38-
```
39-
40-
### System properties
41-
42-
<!-- ✅ What and why -->
43-
EDOT Java can be configured using system properties.
44-
These configuration options can be seen by anything that can see the executed command-line.
45-
46-
<!-- ✅ How -->
47-
Define system properties at the JVM start, usually on the command-line:
48-
49-
```sh
50-
java -Dotel.service.name=my-service ...
51-
```
52-
53-
### Configuration file
54-
55-
<!-- ✅ What and why -->
56-
EDOT Java can be configured using a configuration file.
57-
58-
<!-- ✅ How -->
59-
Before starting the JVM, create and populate the configuration file and specify where to find it:
60-
61-
```sh
62-
echo otel.service.name=my-service > my.properties
63-
java -Dotel.javaagent.configuration-file=my.properties ...
64-
```
65-
66-
## Configuration options
67-
68-
Because the Elastic Distribution of OpenTelemetry Java is an extension of the [OpenTelemetry Java agent](https://github.com/open-telemetry/opentelemetry-java-instrumentation), it supports:
69-
70-
* OpenTelemetry configuration options
71-
* Configuration options from OpenTelemetry extensions that are included with EDOT Java
72-
* Configuration options that are _only_ available in EDOT Java
73-
74-
### OpenTelemetry configuration options
75-
76-
EDOT Java supports all configuration options listed in the [OpenTelemetry General SDK Configuration documentation](https://opentelemetry.io/docs/languages/sdk-configuration/general/) and [OpenTelemetry Java agent documentation](https://opentelemetry.io/docs/zero-code/java/agent/configuration/).
77-
78-
EDOT Java uses different defaults than the OpenTelemetry Java agent for the following configuration options:
79-
80-
| Option | EDOT Java default | OpenTelemetry Java agent default |
81-
|---|---|---|
82-
| `OTEL_RESOURCE_PROVIDERS_AWS_ENABLED` | true (enabled) | false (disabled) ([docs](https://opentelemetry.io/docs/zero-code/java/agent/configuration/#enable-resource-providers-that-are-disabled-by-default)) |
83-
| `OTEL_RESOURCE_PROVIDERS_GCP_ENABLED` | true (enabled) | false (disabled) ([docs](https://opentelemetry.io/docs/zero-code/java/agent/configuration/#enable-resource-providers-that-are-disabled-by-default)) |
84-
| `OTEL_INSTRUMENTATION_RUNTIME-TELEMETRY_EMIT-EXPERIMENTAL-TELEMETRY` | true (enabled) | false (disabled) ([docs](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/ec0223de59a6c7c09b0dcf72ba89addc0975a40d/instrumentation/runtime-telemetry/README.md)) |
85-
86-
#### Micrometer metrics
87-
88-
Micrometer metrics can be captured and automatically converted to OpenTelemetry metrics, however
89-
this is not enabled by default.
90-
91-
To enable micrometer metrics, the `OTEL_INSTRUMENTATION_MICROMETER_ENABLED` configuration option must
92-
be explicitly set to `true` (default `false`).
93-
94-
See also [micrometer configuration options](https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/micrometer/micrometer-1.5/javaagent)
95-
for other Micrometer related configuration options.
96-
97-
### Configuration options from OpenTelemetry extensions
98-
99-
EDOT Java includes several OpenTelemetry extensions from the [OpenTelemetry Java agent contrib repo](https://github.com/open-telemetry/opentelemetry-java-contrib/). These extensions offer the following additional `OTEL_` options:
100-
101-
| Option(s) | Extension | Description |
102-
|---|---|---|
103-
| `OTEL_SERVICE_NAME` | [Resource providers](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/resource-providers) | This can be [set as usual](https://opentelemetry.io/docs/languages/sdk-configuration/general/#otel_service_name), but if not set the value will be inferred when the EDOT Java agent is running in various application servers. |
104-
| `OTEL_INFERRED_SPANS_*` | [Inferred Spans](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/inferred-spans) | Generates additional spans using profiling instead of instrumentation. |
105-
106-
### Configuration options that are _only_ available in EDOT Java
107-
108-
In addition to general OpenTelemetry configuration options, there are two kinds of configuration options that are _only_ available in EDOT Java.
109-
110-
**Elastic-authored options that are not yet available upstream**
111-
112-
Additional `OTEL_` options that Elastic plans to contribute upstream to the [OpenTelemetry Java agent](https://github.com/open-telemetry/opentelemetry-java-instrumentation) but are not yet available in the OpenTelemetry Java agent.
113-
114-
_Currently there are no additional `OTEL_` options waiting to be contributed upstream._
115-
116-
**Elastic-specific options**
117-
118-
`ELASTIC_OTEL_` options that are specific to Elastic and will always live in EDOT Java (in other words, they will _not_ be added upstream):
119-
120-
| Option(s) | Extension | Description |
121-
|---|---|---|
122-
| `ELASTIC_OTEL_UNIVERSAL_PROFILING_INTEGRATION_*` | [Universal profiling integration](https://github.com/elastic/elastic-otel-java/tree/main/universal-profiling-integration) | Correlates traces with profiling data from the Elastic universal profiler. |
123-
| `ELASTIC_OTEL_JAVA_SPAN_STACKTRACE_MIN_DURATION` | [Span stacktrace capture](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/span-stacktrace) | Define the minimum duration for attaching stack traces to spans. Defaults to 5ms. |
124-
125-
### Instrumentations that are _only_ available in EDOT Java
126-
127-
Some instrumentation are only available in EDOT Java and might or might not be added upstream in future versions.
128-
129-
#### OpenAI Java Client
130-
131-
Instrumentation for the [official OpenAI Java Client](https://github.com/openai/openai-java).
132-
It supports:
133-
* Tracing for requests, including GenAI-specific attributes such as token usage
134-
* Opt-In logging of OpenAI request and response content payloads
135-
136-
The minimum supported version is `0.8.0`.
137-
138-
Note that this instrumentation is currently in **tech preview**, because the OpenAI client itself is still in beta.
139-
Once the OpenAI client is stable, this instrumentation will be GAed. We'll drop support for older beta versions of the client after some time.
140-
The instrumentation is on by default and can be disabled by setting either the `OTEL_INSTRUMENTATION_OPENAI_CLIENT_ENABLED` environment variable or the `otel.instrumentation.openai-client.enabled` JVM property to `false`.
141-
142-
In addition, this instrumentation provides the following configuration options:
143-
144-
| Option(s) | Description |
145-
|-------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
146-
| `ELASTIC_OTEL_JAVA_INSTRUMENTATION_GENAI_EMIT_EVENTS` | If set to `true`, the agent will generate log events for OpenAI requests and responses. Potentially sensitive content will only be included if `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` is true. Defaults to the value of `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT`, so that just enabling `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` ensures that log events are generated. |
147-
| `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` | If set to `true`, enables the capturing of OpenAI request and response content in the log events outputted by the agent. Defaults to `false` |
148-
149-
<!-- ✅ List auth methods -->
150-
## Authentication methods
151-
152-
When sending data to Elastic, there are two ways you can authenticate: using an APM agent key or using a secret token.
153-
Both EDOT Java and APM Server must be configured with the same secret token for the request to be accepted.
154-
155-
### Use an APM agent key (API key)
156-
157-
<!-- ✅ What and why -->
158-
[APM agent keys](https://www.elastic.co/guide/en/observability/current/apm-api-key.html) are
159-
used to authorize requests to an Elastic Observability endpoint.
160-
APM agent keys are revocable, you can have more than one of them, and
161-
you can add or remove them without restarting APM Server.
162-
163-
<!-- ✅ How do you authenticate using this method? -->
164-
To create and manage APM Agent keys in Kibana:
165-
166-
1. Go to **APM Settings**.
167-
1. Select the **Agent Keys** tab.
168-
169-
When using an APM Agent key, the `OTEL_EXPORTER_OTLP_HEADERS` is set using a
170-
different auth schema (`ApiKey` rather than `Bearer`). For example:
171-
172-
<!-- ✅ Code example -->
173-
```sh
174-
export OTEL_EXPORTER_OTLP_ENDPOINT=https://my-deployment.apm.us-west1.gcp.cloud.es.io
175-
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=ApiKey TkpXUkx...dVZGQQ=="
176-
```
177-
178-
### Use a secret token
179-
180-
<!-- ✅ What and why -->
181-
[Secret tokens](https://www.elastic.co/guide/en/observability/current/apm-secret-token.html) are used to authorize requests to the APM Server.
182-
183-
<!-- ✅ How do you authenticate using this method? -->
184-
You can find the values of these variables in Kibana's APM tutorial.
185-
In Kibana:
186-
187-
1. Go to **Setup guides**.
188-
1. Select **Observability**.
189-
1. Select **Monitor my application performance**.
190-
1. Scroll down and select the **OpenTelemetry** option.
191-
1. The appropriate values for `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS` are shown there.
192-
For example:
193-
194-
```sh
195-
export OTEL_EXPORTER_OTLP_ENDPOINT=https://my-deployment.apm.us-west1.gcp.cloud.es.io
196-
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer P....l"
197-
```
1+
This page has been moved to [EDOT documentation](https://elastic.github.io/opentelemetry/edot-sdks/java/setup/index.html)

0 commit comments

Comments
 (0)