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: src/docs/getting-started/adot-eks-add-on/installation.mdx
+36-1Lines changed: 36 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,42 @@ Follow these steps to use the EKS console to leverage EKS add-ons for deploying
47
47
48
48
## Deploy the ADOT Collector
49
49
50
-
Once the ADOT EKS Add-On is running, you can deploy the ADOT Collector into your EKS cluster. The ADOT Collector can be deployed in one of four modes: Deployment, Daemonset, StatefulSet, and Sidecar. See [this page](https://aws-otel.github.io/docs/getting-started/operator#step-2-install-adot-collector-as-kubernetes-custom-resource-to-your-eks-cluster) for more information on these deployment modes.
50
+
Once the ADOT EKS Add-On is running, you can deploy the ADOT Collector into your EKS cluster. The ADOT Collector can be deployed in one of four modes: Deployment, Daemonset, StatefulSet, and Sidecar. Each mode is briefly described below.
51
+
52
+
### Deployment Mode
53
+
54
+
If you want to get more control of the Collector and create a standalone application, Deployment would be your choice. With Deployment,
55
+
you can relatively easily scale up the Collector to monitor more targets, roll back to an early version if anything unexpected happens,
56
+
pause the Collector, etc. In general, you can manage your Collector instance just as an application.
57
+
58
+
### DaemonSet Mode
59
+
60
+
DaemonSet should satisfy your needs if you want the Collector run as an agent in your Kubernetes nodes. In this case, every Kubernetes
61
+
node will have its own Collector copy which would monitor the pods in it.
62
+
63
+
### StatefulSet Mode
64
+
65
+
There are three main advantages to deploying the Collector as a StatefulSet:
66
+
67
+
- Predictable names of the Collector instance will be expected
68
+
If you use above two approaches to deploy the Collector, the pod name of your Collector instance will be unique (its name plus random sequence).
69
+
However, each Pod in a StatefulSet derives its hostname from the name of the StatefulSet and the ordinal of the Pod (my-col-0, my-col-1, my-col-2, etc.).
70
+
- Rescheduling will be arranged when a Collector replica fails
71
+
If a Collector pod fails in the StatefulSet, Kubernetes will attempt to reschedule a new pod with the same name to the same node.
72
+
Kubernetes will also attempt to attach the same sticky identity (e.g., volumes) to the new pod.
73
+
- The target allocator could be configured
74
+
The target allocator will use a HTTP server to expose the scrape targets to a specific endpoint URL, which will be used by the
75
+
Prometheus receiver to scrape metrics data. Additionally, the target allocator will use that discovery information to evenly delegate scraping
76
+
jobs to the collector instances inside a StatefulSet based on a replica's current workload.
77
+
78
+
### Sidecar Mode
79
+
80
+
The biggest advantage of the sidecar mode is that it allows people to offload their telemetry data as fast and reliable as possible
81
+
from their applications. This Collector instance will work on the container level and no new pod will be created, which is perfect to
82
+
keep your EKS cluster clean and easily to be managed. Moreover, you can also use the sidecar mode when you want to use a different collect/export
83
+
strategy, which just suits this application.
84
+
85
+
Once a Sidecar instance exists in a given namespace, make sure that your deployment is in that same namespace as well. That deployment can get a sidecar by either adding the annotation `sidecar.opentelemetry.io/inject: "true"` to the pod spec of your application, or to the namespace.
51
86
52
87
### Use your IAM role to launch the ADOT Collector
53
88
You can associate your IAM role to your EKS service account using [IRSA](https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/setting-up-enable-IAM.html). Your service account can then provide AWS permissions to the containers you run in any pod that use that service account. You must use this command for each cluster where you're installing ADOT to grant your AWS service account permissions.
Copy file name to clipboardExpand all lines: src/docs/getting-started/lambda/lambda-java-auto-instr.mdx
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,21 @@ Tips:
47
47
* By default, the layer is configured to export traces to AWS X-Ray. Make sure your Lambda role has the required AWS X-Ray permissions.
48
48
For more on AWS X-Ray permissions for AWS Lambda, see the [AWS Lambda documentation](https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html#services-xray-permissions).
49
49
50
+
* By default, the ADOT Java Agent in the Layer will try to auto-instrument all the code in your application. This can have a negative impact on the Lambda cold startup time.
51
+
52
+
We recommend that you only enable auto-instrumentation for the libraries/frameworks that are used by your application.
53
+
54
+
To enable only specific instrumentations you can use the following environment variables:
55
+
*`OTEL_INSTRUMENTATION_COMMON_DEFAULT_ENABLED` - When set to `false`, disables auto-instrumentation in the Layer, requiring each instrumentation to be enabled individually.
56
+
*`OTEL_INSTRUMENTATION_[NAME]_ENABLED` - Set to `true` to enable auto-instrumentation for a specific library or framework. `[NAME]` should be replaced by the instrumentation that you want to enable. The full list of available instrumentations can be found in [this link](https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config/#suppressing-specific-agent-instrumentation).
57
+
58
+
For example, to only enable auto-instrumentation for Lambda and the AWS SDK, you would have to set the following environment variables:
59
+
```bash
60
+
OTEL_INSTRUMENTATION_COMMON_DEFAULT_ENABLED=false
61
+
OTEL_INSTRUMENTATION_AWS_LAMBDA_ENABLED=true
62
+
OTEL_INSTRUMENTATION_AWS_SDK_ENABLED=true
63
+
```
64
+
50
65
### Metric Instrumentation in your Lambda Function
51
66
52
67
Metric auto instrumentation is supported in OpenTelemetry. You would have to instrument your code in your Lambda application in order to generate application metrics. We will be using the [OpenTelemetry Java Metrics API](https://github.com/open-telemetry/opentelemetry-java/tree/main/api/metrics/src/main/java/io/opentelemetry/api/metrics) to define our metrics. You can define your metric types in a MetricGenerator.java file. To enable exporting metrics for use with backends like Amazon Managed Prometheus, set the environment variable `OTEL_METRICS_EXPORTER=otlp`.
0 commit comments