You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/_edot-sdks/java/setup/index.md
+56-29
Original file line number
Diff line number
Diff line change
@@ -7,49 +7,76 @@ parent: EDOT Java
7
7
8
8
# Setting up the EDOT Java Agent
9
9
10
+
**Kubernetes**
11
+
12
+
For Kubernetes we recommend using the OTel Kubernetes Operator that also manages the auto-instrumentation of Java applications. Follow the [Quickstart Guide](../../../quickstart/index) for Kubernetes or learn more about [instrumentation details on Kubernetes for Java](./k8s).
13
+
14
+
**All other environments**
15
+
16
+
Follow the Java setup guide below for all other environments.
You need to have completed the steps in the [Quickstart](/quickstart/) section that corresponds to your Elastic deployment model.
19
29
20
-
## Run
30
+
## Setting up the Agent
31
+
32
+
1.**Configure the agent**
33
+
34
+
The minimal configuration to send data involves setting the values for `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS` environment variables.
35
+
36
+
Configuration of those environment values depends on the deployment model:
37
+
38
+
*Local EDOT Collector*
39
+
40
+
EDOT Collector is accessible with `http://localhost:4318` without authentication, no further configuration is required.
41
+
42
+
*Self-managed EDOT Collector*
43
+
44
+
`OTEL_EXPORTER_OTLP_ENDPOINT` should be set to the OTLP endpoint of your selfmanaged EDOT Collector.
45
+
46
+
*Elastic Managed OTLP endpoint*
47
+
48
+
Use [these guides](../../../quickstart/serverless/index) to retrieve the `<ELASTIC_OTLP_ENDPOINT>` and the `<ELASTIC_API_KEY>`.
49
+
50
+
-`OTEL_EXPORTER_OTLP_ENDPOINT` should be set to `<ELASTIC_OTLP_ENDPOINT>`
51
+
-`OTEL_EXPORTER_OTLP_HEADERS` should be set to include `Authorization=ApiKey <ELASTIC_API_KEY>` (comma-separated key=value list).
52
+
53
+
*Kubernetes*
54
+
55
+
Connection to the EDOT Collector is managed by the OTel Kubernetes Operator, [follow the Quickstart Guides](../../../quickstart/index) for Kubernetes.
56
+
21
57
22
-
Use the `-javaagent:` JVM argument with the path to agent jar, this requires to modify the JVM arguments and restart
23
-
the application.
58
+
We also recommend setting the `service.name` resource attribute explicitly:
24
59
25
-
```bash
26
-
java \
27
-
-javaagent:/path/to/agent.jar \
28
-
-jar myapp.jar
29
-
```
60
+
TODO
30
61
31
-
For applications deployed with Kubernetes, we recommend using [OpenTelemetry Operator](./k8s).
62
+
Set the `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS` environment variables. For example:
The minimal configuration to send data involves setting the values for `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS` environment variables.
69
+
For more advanced configuration, see [Configuration](../configuration) section.
36
70
37
-
Configuration of those environment values depends on the deployment model:
38
-
- EDOT Collector running on the application host, accessible with `http://localhost:4318` without authentication, no further configuration is required.
39
-
- EDOT Collector managed by the OpenTelemetry Kubernetes Operator
40
-
-`OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS` environment variables are automatically provided by the Operator, no further configuration is required.
Copy file name to clipboardexpand all lines: docs/_edot-sdks/java/setup/k8s.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ This document focuses on instrumenting Java applications on Kubernetes, using th
12
12
13
13
- For general knowledge about the EDOT Java SDK, refer to the [EDOT Java Intro page](../index).
14
14
- For Java auto-instrumentation specifics, refer to [OpenTelemetry Operator Java auto-instrumentation](https://opentelemetry.io/docs/kubernetes/operator/automatic/#java).
15
-
- For general information about instrumenting applications on kubernetes, refer to [instrumenting applications on Kubernetes](../../../use-cases/kubernetes/instrumenting-applications).
15
+
- For general information about instrumenting applications on Kubernetes, refer to [instrumenting applications on Kubernetes](../../../use-cases/kubernetes/instrumenting-applications).
0 commit comments