Skip to content

Commit

Permalink
Added prometheus and grafana to compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornnorgaard committed Jun 19, 2024
1 parent a467c18 commit ddc2243
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
20 changes: 20 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,26 @@ services:
env_file:
- .env

prometheus:
image: prom/prometheus:v2.33.0
ports:
- "9090:9090"
command: [ "--config.file=/etc/prometheus/prometheus.yml" ]
volumes:
- ./configs/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml

grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
GF_SECURITY_ADMIN_USER: "admin"
GF_SECURITY_ADMIN_PASSWORD: "changeme"
volumes:
- ./volumes/grafana/:/var/lib/grafana
- ./configs/grafana/provisioning:/etc/grafana/provisioning
- ./configs/grafana/dashboards:/var/lib/grafana/dashboards

aspire-dashboard:
image: mcr.microsoft.com/dotnet/nightly/aspire-dashboard:8.0.0-preview.6
environment:
Expand Down
6 changes: 5 additions & 1 deletion src/Ast.Platform/Configurations/TelemetryConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ internal static void AddPlatformTelemetry(this IServiceCollection services, ICon
.SetResourceBuilder(resourceBuilder)
.AddMeter("Microsoft.AspNetCore.Server.Kestrel")
.AddMeter("Microsoft.AspNetCore.Hosting")
.AddMeter("Microsoft.AspNetCore.Http.Connections")
.AddMeter("Microsoft.AspNetCore.Routing")
.AddMeter("Microsoft.AspNetCore.Diagnostics")
.AddMeter("Microsoft.AspNetCore.RateLimiting")
.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddRuntimeInstrumentation()
Expand All @@ -52,4 +56,4 @@ internal static void AddPlatformTelemetry(this IServiceCollection services, ICon
internal static void UsePlatformTelemetry(this IApplicationBuilder app, IConfiguration configuration)
{
}
}
}

0 comments on commit ddc2243

Please sign in to comment.