Docker deployment
Você está visualizando a versão em versão em inglês desta página porque ela ainda não foi traduzida. Possui interesse em ajudar? Veja como contribuir.
Prerequisites
- Docker
- Docker Compose v2.0.0+
- Make (optional)
- 6 GB of RAM for the application (or ~3 GB using minimal mode)
- 14 GB of disk space
Get and run the demo
Clone the Demo repository:
git clone https://github.com/open-telemetry/opentelemetry-demo.gitChange to the demo folder:
cd opentelemetry-demo/Start the demo1:
make startdocker compose --env-file .env --env-file .env.override \ -f compose.yaml -f compose.full.yaml \ -f compose.observability.yaml -f compose.extras.yaml \ up --force-recreate --remove-orphans --detachDeployment modes
The demo supports several deployment modes. The default
make startruns the full demo with all services and the observability stack. Other modes let you reduce resource usage or exclude certain components:Mode Make target Description Full make startAll services and observability backends (default) Minimal make start-minimalExcludes Kafka and its dependent services ( accounting,fraud-detection,kafka), reducing memory usage to ~3 GBNo observability make start-no-o11yAll services without the observability backends (Jaeger, Grafana, Prometheus, OpenSearch) Minimal, no observability make start-minimal-no-o11yMinimal services without the observability backends Profiling make start-profilingFull mode with an eBPF profiler and the Firepit UI for profiling data Agentic make start-agenticFull mode with an AI agent, MCP server, and chatbot for interacting with the demo For example, to start the demo in minimal mode:
make start-minimaldocker compose --env-file .env --env-file .env.override \ -f compose.yaml -f compose.observability.yaml -f compose.extras.yaml \ up --force-recreate --remove-orphans --detach(Optional) Run telemetry sanity tests:
The demo includes a suite of telemetry sanity tests that verify each service is producing traces, metrics, and logs and that they reach the expected backends (Jaeger, Prometheus, OpenSearch). For details, see test/telemetry/README.md.
Test scope Make target Starts Full make run-telemetry-testsFull deployment ( make start)Minimal make run-telemetry-tests-minimalMinimal deployment ( make start-minimal)Agentic make run-telemetry-tests-agenticAgentic deployment (with agent, MCP, and chatbot) Each target builds the test image from
./test/telemetry, starts the corresponding deployment, runs the tests, and then tears down the demo.make run-telemetry-tests# The demo must be running before you start the tests. docker build -t opentelemetry-demo-telemetry-tests ./test/telemetry docker run --rm --network opentelemetry-demo \ --env-file .env --env-file .env.override \ -e TEST_SCOPE=full \ opentelemetry-demo-telemetry-tests
Verify the web store and Telemetry
Once the images are built and containers are started you can access:
- Web store: http://localhost:8080/
- Flagd configurator UI: http://localhost:8080/feature
- Telemetry documentation (generated by Weaver): http://localhost:8080/telemetry/
The following are available when the observability stack is running (i.e., not
in *-no-o11y modes):
- Grafana: http://localhost:8080/grafana/
- Jaeger UI: http://localhost:8080/jaeger/ui/
- OpAMP UI: http://localhost:8080/opamp/
The following are available only in specific deployment modes:
- Firepit UI (profiling mode): http://localhost:8080/profiles/
- Chatbot (agentic mode): http://localhost:8080/chatbot/
Changing the demo’s primary port number
By default, the demo application will start a proxy for all browser traffic
bound to port 8080. To change the port number, set the ENVOY_PORT environment
variable before starting the demo.
For example, to use port 80811:
ENVOY_PORT=8081 make startENVOY_PORT=8081 docker compose --env-file .env --env-file .env.override \ -f compose.yaml -f compose.full.yaml \ -f compose.observability.yaml -f compose.extras.yaml \ up --force-recreate --remove-orphans --detach
Bring your own backend
Likely you want to use the web store as a demo application for an observability backend you already have (e.g., an existing instance of Jaeger, Zipkin, or one of the vendors of your choice).
OpenTelemetry Collector can be used to export telemetry data to multiple backends. By default, the collector in the demo application merges the configuration from the following files (in order):
otelcol-config.yml— base receivers, processors, and pipelinesotelcol-config-full.yml— Kafka and PostgreSQL metric receivers (full mode)otelcol-config-observability.yml— Jaeger, Prometheus, and OpenSearch exporters (when using the observability stack)otelcol-config-extras.yml— empty stub for customizations, always loaded last
To add your backend, open the file src/otel-collector/otelcol-config-extras.yml with an editor.
Start by adding a new exporter. For example, if your backend supports OTLP over HTTP, add the following:
exporters: otlphttp/example: endpoint: <your-endpoint-url>Then override the
exportersfor telemetry pipelines that you want to use for your backend.service: pipelines: traces: exporters: [debug, otlp_grpc/jaeger, span_metrics, otlphttp/example]
When merging YAML values with the Collector, objects are merged and arrays are
replaced. The span_metrics connector bridges traces to metrics, so it must
be retained on traces exporters and metrics receivers when overriding
those pipelines — omitting it causes the collector to crash. All other
exporters are optional: omitting one simply stops data from being sent to that
backend. The upstream exporter names are:
- traces:
debug,otlp_grpc/jaeger,span_metrics(required) - metrics:
debug,otlp_http/prometheus - logs:
debug,opensearch
Vendor backends might require you to add additional parameters for authentication, please check their documentation. Some backends require different exporters, you may find them and their documentation available at opentelemetry-collector-contrib/exporter.
After updating the otelcol-config-extras.yml, start the demo by running
make start. After a while, you should see the traces flowing into your backend
as well.
docker-composeis deprecated. For details, see Migrate to Compose V2. ↩︎ ↩︎
Feedback
Esta página foi útil?
Thank you. Your feedback is appreciated!
Please let us know how we can improve this page. Your feedback is appreciated!