Skip to content

Commit 9252f50

Browse files
committed
Add details about how to configure the auto-instrumentation usin EKS Add-on
1 parent 33e246c commit 9252f50

File tree

3 files changed

+85
-0
lines changed

3 files changed

+85
-0
lines changed

src/docs/getting-started/adot-eks-add-on.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import operatorImg2 from "assets/img/docs/gettingStarted/operator/img2.png"
2020
#### [Collector Configuration for AWS CloudWatch](/docs/getting-started/adot-eks-add-on/config-cloudwatch)
2121
#### [Collector Configuration for AWS X-Ray](/docs/getting-started/adot-eks-add-on/config-xray)
2222
#### [Advanced Collector Configuration for Amazon Managed Prometheus](/docs/getting-started/adot-eks-add-on/config-advanced)
23+
### [Injecting Auto-instrumentation](/docs/getting-started/adot-eks-add-on/config-auto-instrumentation)
2324
### [Update and Cleanup](/docs/getting-started/adot-eks-add-on/update-and-cleanup)
2425

2526

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: 'OpenTelemetry auto-instrumentation injection'
3+
description:
4+
This page describes how to inject a auto-instrumentation image into your workload
5+
path: '/docs/getting-started/adot-eks-add-on/config-auto-instrumentation'
6+
---
7+
8+
## OpenTelemetry auto-instrumentation injection
9+
10+
The ADOT EKS Add-on can inject and configure OpenTelemetry auto-instrumentation libraries. To enable this feature, you have to
11+
annotate your workload with:
12+
13+
```
14+
instrumentation.opentelemetry.io/inject-<language>: trye
15+
```
16+
17+
Languages that support injection are: java, nodejs, python and dotnet.
18+
19+
The annotation can be added to a namespace, so that all pods within that namespace will get instrumentation, or by adding
20+
the annotation to individual PodSpec objects, available as part of Deployment, Statefulset, and other resources.
21+
22+
Example:
23+
24+
```
25+
apiVersion: apps/v1
26+
kind: Deployment
27+
metadata:
28+
name: my-deployment-with-multiple-containers
29+
spec:
30+
selector:
31+
matchLabels:
32+
app: my-pod-with-multiple-containers
33+
replicas: 1
34+
template:
35+
metadata:
36+
labels:
37+
app: my-pod-with-multiple-containers
38+
annotations:
39+
instrumentation.opentelemetry.io/inject-java: "true"
40+
spec:
41+
containers:
42+
- name: myapp
43+
image: myImage1
44+
```
45+
46+
## Configuring the auto-instrumentation
47+
48+
To configure and select a specific version of the auto-instrumentation that should be injected in the workload, one can use the
49+
custom resource definition `Instrumentation`.
50+
51+
Example:
52+
53+
```
54+
apiVersion: opentelemetry.io/v1alpha1
55+
kind: Instrumentation
56+
metadata:
57+
name: my-instrumentation
58+
spec:
59+
exporter:
60+
endpoint: http://adot-collector:4317
61+
java:
62+
image: public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v1.28.0
63+
```
64+
65+
In the example above, we are configuring the endpoint that will be used to submit the telemetry signals. If the workload
66+
already have the `OTEL_EXPORTER_OTLP_ENDPOINT` environment defined, that will be used instead. In the example
67+
we are also configuring the version of the ADOT Java Agent that should be used.
68+
69+
70+
For more information about how to configure the auto-instrumentation injection, please refer to the [OpenTelemetry documentation](https://github.com/open-telemetry/opentelemetry-operator/tree/main#opentelemetry-auto-instrumentation-injection).
71+
72+
## [Previous Topic: Collector Configuration Introduction](/docs/getting-started/adot-eks-add-on/config-intro)
73+
74+
## Related Topics:
75+
76+
### [Collector Configuration for Amazon Managed Prometheus](/docs/getting-started/adot-eks-add-on/config-amp)
77+
78+
### [Collector Configuration for AWS CloudWatch](/docs/getting-started/adot-eks-add-on/config-cloudwatch)
79+
80+
### [Advanced Collector Configuration for Amazon Managed Prometheus](/docs/getting-started/adot-eks-add-on/config-advanced)
81+
82+
## [Next Topic: Updating and Cleanup](/docs/getting-started/adot-eks-add-on/update-and-cleanup)

src/docs/getting-started/adot-eks-add-on/config-intro.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ Below, we have our three Collector configurations, one for Amazon Managed Promet
4040
### [Collector Configuration for AWS X-Ray](/docs/getting-started/adot-eks-add-on/config-xray)
4141

4242
### [Advanced Collector Configuration for Amazon Managed Prometheus](/docs/getting-started/adot-eks-add-on/config-advanced)
43+
44+
### [Injecting Auto-instrumentation](/docs/getting-started/adot-eks-add-on/config-auto-instrumentation)

0 commit comments

Comments
 (0)