Skip to content

Commit

Permalink
app instructions
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
  • Loading branch information
pavolloffay committed Nov 6, 2023
1 parent bb50b25 commit a3a9747
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 03-app-instrumentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ If all works, the frontend application should emit metrics and print them to the
}
```
Now replace the `ConsoleSpanExporter` with an `OTLPTraceExporter` as outlined in the [Exporters](https://opentelemetry.io/docs/instrumentation/js/exporters/) documentation (make use of `opentelemetry/exporter-metrics-otlp-grpc` & `opentelemetry/exporter-trace-otlp-grpc`)
Now replace the `ConsoleSpanExporter` with an `OTLPTraceExporter` as outlined in the [Exporters](https://opentelemetry.io/docs/instrumentation/js/exporters/) documentation (make use of OTLP HTTP exporter)
The metrics can be reported to the Prometheus server running locally:
```bash
docker run --rm -it -p 9090:9090 --name=p8s -v ./app/prometheus-docker.yaml:/tmp/prometheus-docker.yaml:z prom/prometheus:v2.47.2 --config.file=/tmp/prometheus-docker.yaml --enable-feature=otlp-write-receiver
```
Alternatively, you can run the OpenTelemetry collector locally with debug exporter:
Alternatively, you can run the OpenTelemetry collector locally with debug exporter (use OTLP gRPC exporter, make use of `opentelemetry/exporter-metrics-otlp-grpc` & `opentelemetry/exporter-trace-otlp-grpc`):
```bash
docker run --rm -it -p 4317:4317 --name=otel-collector ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:0.88.0 --config https://raw.githubusercontent.com/pavolloffay/kubecon-na-2023-opentelemetry-kubernetes-metrics-tutorial/main/app/collector-docker.yaml
```
Expand Down

0 comments on commit a3a9747

Please sign in to comment.