AWS Distro for OpenTelemetry
Deploy a sample application to test the AWS Distro for OpenTelemetry Collector
Deploy a sample application to test the AWS Distro for OpenTelemetry Collector
The sample application will generate and send OTLP data to a single OTLP receiver endpoint. You can utilize a self managed ADOT Collector deployment or leverage the otlpIngest preconfigured custom resource that is available through the ADOT EKS Add-on advanced configuration.
The sample application and traffic generator were largely taken from an example in the ADOT Collector repository.
A docker-compose.yaml
file was translated to Kubernetes resources using the Kompose tool.
To apply the traffic generator and sample application, do the following steps. Make sure that you have satisfied the prerequisites and completed the procedure in Install the AWS Distro for OpenTelemetry (ADOT) Operator.
Download the
traffic-generator.yaml
file to your computer. You can also view the file on GitHub.curl -O https://raw.githubusercontent.com/aws-observability/aws-otel-community/master/sample-configs/traffic-generator.yamlIn
traffic-generator.yaml
, make sure that the secondkind
value reflects your mode. For more information, see Deploy the ADOT Collector on GitHub.kind: Deploymenttraffic-generator.yaml
makeshttp
calls to the Kubernetes servicesample-app:4567
. This allows the traffic generator to interact with the sample application on port4567
.sample-app
resolves to the IP address of thesample-app
Pod.Apply
traffic-generator.yaml
to your cluster.kubectl apply -f traffic-generator.yamlDownload the
sample-app.yaml
file to your computer. You can also view the file on GitHub.curl -O https://raw.githubusercontent.com/aws-observability/aws-otel-community/master/sample-configs/sample-app.yamlIn
sample-app.yaml
, replace the following with your own AWS Region:value: "<YOUR_AWS_REGION>"The following actions are defined by
sample-app.yaml
:- The Service resource configures
port: 4567
to allow HTTP requests for the traffic generator. - The Deployment resource configures some environment variables:
- The
LISTEN_ADDRESS
is configured to0.0.0.0:4567
for HTTP requests from the traffic generator. - The
OTEL_EXPORTER_OTLP_ENDPOINT
which controls the destination of OTLP telemetry signals generated by the sample application.
- The
- The Service resource configures
In
sample-app.yaml
, update thevalue
forOTEL_EXPORTER_OTLP_ENDPOINT
to direct traffic to the otlp receiver in your ADOT Collector.If you are using the otlpIngest preconfigured custom resource change the value to
http://adot-col-otlp-ingest-collector:4317
.Apply
sample-app.yaml
to your cluster.kubectl apply -f sample-app.yaml