Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance the example sample apps to prevent unnecessary errors #101

Merged
merged 4 commits into from
Nov 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/config-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ service:
pipelines:
traces:
receivers: [otlp]
exporters: [awsxray, logging]
exporters: [awsxray]
metrics:
receivers: [otlp]
exporters: [awsemf, logging]
exporters: [awsemf]

extensions: [pprof]
27 changes: 21 additions & 6 deletions examples/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ services:

# AWS OTel Collector
aws-ot-collector:
image: amazon/aws-otel-collector:latest
# image: amazon/aws-otel-collector:latest
# very slow when you build it first time locally!!!
build:
context: ../
dockerfile: cmd/awscollector/Dockerfile
command: ["--config=/etc/otel-agent-config.yaml", "--log-level=DEBUG"]
environment:
- AWS_REGION=us-west-2
Expand All @@ -22,16 +26,27 @@ services:
ports:
- "1777:1777" # pprof extension
- "55679:55679" # zpages extension
- "55680:55680" # OTLP receiver
- "13133" # health_check

# Metric and Trace Sample Data Generator
ot-metric-emitter:
image: aottestbed/aws-otel-collector-sample-app:java-0.1.0
# Sample web application which will generate Metrics and Traces data if the enable API is called
# src - https://github.com/aws-observability/aws-otel-test-framework/tree/terraform/sample-apps/spark
ot-sample-app:
image: aottestbed/aws-otel-collector-java-sample-app:0.2.5
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=aws-ot-collector:55680
- OTEL_RESOURCE_ATTRIBUTES=service.namespace=AOCDockerDemo,service.name=AOCDockerDemoService
- S3_REGION=us-west-2
- AWS_REGION=us-west-2
- LISTEN_ADDRESS=0.0.0.0:4567 # web server endpoint
volumes:
- ~/.aws:/root/.aws # test auto generated trace on S3 access
ports:
- "4567:4567" # http sample requests
depends_on:
- aws-ot-collector

# Traffic generator will make HTTP requests to ot-sample-app that sends OTel Metrics and Traces
traffic-generator:
image: ellerbrock/alpine-bash-curl-ssl:latest
command: [ "/bin/bash", "-c", "sleep 10; while :; do curl ot-sample-app:4567/outgoing-http-call > /dev/null 1>&1; sleep 2; curl ot-sample-app:4567/aws-sdk-call > /dev/null 2>&1; sleep 5; done" ]
depends_on:
- ot-sample-app