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

Added OTEL for tracing, metrics, logging (Console and OTLP exporters) #384

Merged
merged 16 commits into from
Mar 19, 2024
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -422,3 +422,6 @@ FodyWeavers.xsd
*.db-wal

/src/TagzApp.Providers.Twitter/Models/SampleTweets.json.gz
/observability-config/tempo-data
/observability-config/loki-data
/observability-config/prometheus-data
99 changes: 86 additions & 13 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,87 @@
version: "3.7"
version: "3.8"
services:
web:
container_name: tagzapp.web
hostname: tagzappweb
build:
dockerfile: ./src/TagzApp.Blazor/dockerfile
context: .
ports:
- "80" # runs on a random local port. Change to "8080:80" if you want to run on localhost:8080
env_file:
# when .env values are used in this docker-compose file like 'hostname: $hostname' for example it is strongly recommended to inject them by referencing them like 'docker compose up --env-file .env' or 'docker compose up --env-file .env.local'
- .env
- .env.local
# TODO: This was not implemented yet...
# web:
# container_name: tagzapp.web
# hostname: tagzappweb
# build:
# dockerfile: ./src/TagzApp.Blazor/dockerfile
# context: .
# ports:
# - "80" # runs on a random local port. Change to "8080:80" if you want to run on localhost:8080
# env_file:
# # when .env values are used in this docker-compose file like 'hostname: $hostname' for example it is strongly recommended to inject them by referencing them like 'docker compose up --env-file .env' or 'docker compose up --env-file .env.local'
# - .env
# - .env.local
# depends_on:
# - otelcol

grafana:
image: grafana/grafana:10.3.1
environment:
- "GF_AUTH_DISABLE_LOGIN_FORM=true"
- "GF_AUTH_ANONYMOUS_ENABLED=true"
- "GF_AUTH_ANONYMOUS_ORG_ROLE=Admin"
- "GF_FEATURE_TOGGLES_ENABLE=traceToMetrics"
volumes:
- ./observability-config/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
- ./observability-config/grafana-dashboard.yaml:/etc/grafana/provisioning/dashboards/main.yaml
- ./observability-config/dashboards:/var/lib/grafana/dashboards
ports:
- "3000:3000"
depends_on:
- tempo
- loki

otelcol:
image: otel/opentelemetry-collector-contrib:0.95.0
deploy:
resources:
limits:
memory: 125M
restart: unless-stopped
command: [ "--config=/etc/otelcol-config.yaml" ]
volumes:
- ./observability-config/otelcol-config.yaml:/etc/otelcol-config.yaml
ports:
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver

loki:
image: grafana/loki:2.9.4
ports:
- "3100"
command: -config.file=/etc/loki/local-config.yaml
volumes:
- ./observability-config/loki-data:/loki
depends_on:
- otelcol

tempo:
image: grafana/tempo:2.3.1
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ./observability-config/tempo.yaml:/etc/tempo.yaml
- ./observability-config/tempo-data:/tmp/tempo
ports:
- "14268" # jaeger ingest
- "3200" # tempo
- "4317" # otlp grpc
- "4318" # otlp http
- "9411" # zipkin
depends_on:
- prometheus
- loki

prometheus:
image: prom/prometheus:v2.50.0
command:
- --config.file=/etc/prometheus.yaml
- --web.enable-remote-write-receiver
- --enable-feature=exemplar-storage
- --enable-feature=promql-experimental-functions
volumes:
- ./observability-config/prometheus.yaml:/etc/prometheus.yaml
- ./observability-config/prometheus-data:/prometheus
ports:
- "9090:9090"
Loading
Loading