Skip to content

Commit

Permalink
Minor improvements to example doc
Browse files Browse the repository at this point in the history
  • Loading branch information
cijothomas committed Dec 16, 2024
1 parent c94c422 commit 967625e
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions examples/AspNetCore/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)

Check failure on line 36 in examples/AspNetCore/README.md

View workflow job for this annotation

GitHub Actions / lint-md / run-markdownlint

Unordered list style

examples/AspNetCore/README.md:36:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk] https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md004.md
* [Docker](http://docker.com)

Check failure on line 37 in examples/AspNetCore/README.md

View workflow job for this annotation

GitHub Actions / lint-md / run-markdownlint

Unordered list style

examples/AspNetCore/README.md:37:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk] https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md004.md
* [Prometheus](http://prometheus.io/docs)

Check failure on line 38 in examples/AspNetCore/README.md

View workflow job for this annotation

GitHub Actions / lint-md / run-markdownlint

Unordered list style

examples/AspNetCore/README.md:38:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk] https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md004.md
* [Tempo](https://github.com/grafana/tempo)

Check failure on line 39 in examples/AspNetCore/README.md

View workflow job for this annotation

GitHub Actions / lint-md / run-markdownlint

Unordered list style

examples/AspNetCore/README.md:39:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk] https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md004.md

0 comments on commit 967625e

Please sign in to comment.