From 967625ef5714930f5a4c65aaaee829b53838ed5e Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Mon, 16 Dec 2024 09:30:46 -0800 Subject: [PATCH 1/4] Minor improvements to example doc --- examples/AspNetCore/README.md | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/examples/AspNetCore/README.md b/examples/AspNetCore/README.md index 001d3cdea08..7601f5eb292 100644 --- a/examples/AspNetCore/README.md +++ b/examples/AspNetCore/README.md @@ -1,6 +1,6 @@ -# OpenTelemetry ASP.NET Core 7 Web API Example +# OpenTelemetry ASP.NET Core Web API Example -This example uses the new WebApplication host that ships with .NET 7 +This example uses the new WebApplication host that ships with .NET and shows how to setup 1. OpenTelemetry logging @@ -13,7 +13,27 @@ service name, version and the machine on which this program is running. The sample rate is set to emit all the traces using `AlwaysOnSampler`. You can try out different samplers like `TraceIdRatioBasedSampler`. +## Running Dependencies via Docker + +The example by default writes telemetry to stdout. To enable telemetry export +via OTLP, update the `appsettings.json` file to replace `"console"` with +`"otlp"`. Launching the application will then send telemetry data via OTLP. + +Use the provided [docker-compose](docker-compose.yaml) file to spin up the +required dependencies, including: + +- **OTel Collector** Accept telemetry and forwards them to Tempo, Prometheus +- **Prometheus** to store metrics +- **Grafana (UI)** UI to view metrics, traces. (Exemplars can be used to jump + from metrics to traces) +- **Tempo** to store traces // TODO: Add a logging store also. + +Once the Docker containers are running, you can access the **Grafana UI** at: +[http://localhost:3000/](http://localhost:3000/) + ## References -* [ASP.NET Core 3.1 Example](https://github.com/open-telemetry/opentelemetry-dotnet/tree/98cb28974af43fc893ab80a8cead6e2d4163e144/examples/AspNetCore) -* [OpenTelemetry Project](https://opentelemetry.io/) +* [ASP.NET Core](https://learn.microsoft.com/aspnet/core/introduction-to-aspnet-core) +* [Docker](http://docker.com) +* [Prometheus](http://prometheus.io/docs) +* [Tempo](https://github.com/grafana/tempo) From 69b47ab92cf93aaf621d99be626823cbee0e2da5 Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Mon, 16 Dec 2024 09:34:17 -0800 Subject: [PATCH 2/4] mdfix --- examples/AspNetCore/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/AspNetCore/README.md b/examples/AspNetCore/README.md index 7601f5eb292..855a41b21b0 100644 --- a/examples/AspNetCore/README.md +++ b/examples/AspNetCore/README.md @@ -33,7 +33,7 @@ Once the Docker containers are running, you can access the **Grafana UI** at: ## References -* [ASP.NET Core](https://learn.microsoft.com/aspnet/core/introduction-to-aspnet-core) -* [Docker](http://docker.com) -* [Prometheus](http://prometheus.io/docs) -* [Tempo](https://github.com/grafana/tempo) +- [ASP.NET Core](https://learn.microsoft.com/aspnet/core/introduction-to-aspnet-core) +- [Docker](http://docker.com) +- [Prometheus](http://prometheus.io/docs) +- [Tempo](https://github.com/grafana/tempo) From 4af14815d07d361abf0feb22325a3c456457f05d Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Mon, 16 Dec 2024 09:55:38 -0800 Subject: [PATCH 3/4] Update examples/AspNetCore/README.md --- examples/AspNetCore/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/AspNetCore/README.md b/examples/AspNetCore/README.md index 855a41b21b0..105342a1839 100644 --- a/examples/AspNetCore/README.md +++ b/examples/AspNetCore/README.md @@ -19,7 +19,7 @@ The example by default writes telemetry to stdout. To enable telemetry export via OTLP, update the `appsettings.json` file to replace `"console"` with `"otlp"`. Launching the application will then send telemetry data via OTLP. -Use the provided [docker-compose](docker-compose.yaml) file to spin up the +Use the provided [docker-compose](./docker-compose.yaml) file to spin up the required dependencies, including: - **OTel Collector** Accept telemetry and forwards them to Tempo, Prometheus From 798027195bb2e1d58b6b92e841de2da4f81e4105 Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Mon, 16 Dec 2024 11:24:45 -0800 Subject: [PATCH 4/4] Update examples/AspNetCore/README.md --- examples/AspNetCore/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/AspNetCore/README.md b/examples/AspNetCore/README.md index 105342a1839..8ab5c23a0ad 100644 --- a/examples/AspNetCore/README.md +++ b/examples/AspNetCore/README.md @@ -19,7 +19,7 @@ The example by default writes telemetry to stdout. To enable telemetry export via OTLP, update the `appsettings.json` file to replace `"console"` with `"otlp"`. Launching the application will then send telemetry data via OTLP. -Use the provided [docker-compose](./docker-compose.yaml) file to spin up the +Use the provided "docker-compose.yaml" file to spin up the required dependencies, including: - **OTel Collector** Accept telemetry and forwards them to Tempo, Prometheus