mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
updates to go and dotnet metrics integrations
This commit is contained in:
parent
17394dde98
commit
aca91ac997
@ -19,16 +19,15 @@ namespace work.Pages
|
|||||||
sw.Stop();
|
sw.Stop();
|
||||||
ProcessedJobCount.Inc();
|
ProcessedJobCount.Inc();
|
||||||
var histogram =
|
var histogram =
|
||||||
Metrics
|
Metrics.CreateHistogram(
|
||||||
.CreateHistogram(
|
|
||||||
"dotnet_request_duration_seconds",
|
"dotnet_request_duration_seconds",
|
||||||
"Histogram for the duration in seconds.",
|
"Histogram for the duration in seconds.",
|
||||||
new[] { 0.02, 0.05, 0.1, 0.15, 0.2, 0.5, 0.8, 1 },
|
new HistogramConfiguration
|
||||||
"GET",
|
{
|
||||||
"/");
|
Buckets = Histogram.LinearBuckets(start: 1, width: 1, count: 5)
|
||||||
|
});
|
||||||
|
|
||||||
histogram
|
histogram.Observe(sw.Elapsed.TotalSeconds);
|
||||||
.Observe(sw.Elapsed.TotalSeconds);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,29 +3,22 @@
|
|||||||
|
|
||||||
To run any of the commands, please ensure you open a terminal and navigate to the path where this readme is located.
|
To run any of the commands, please ensure you open a terminal and navigate to the path where this readme is located.
|
||||||
|
|
||||||
## Start Prometheus
|
## Start Prometheus, Grafana & Dashboards
|
||||||
|
|
||||||
```
|
```
|
||||||
docker-compose up -d prometheus
|
docker-compose up -d prometheus
|
||||||
docker-compose up -d grafana
|
docker-compose up -d grafana
|
||||||
|
docker-compose up -d grafana-dashboards
|
||||||
```
|
```
|
||||||
|
|
||||||
Wait for Grafana to start up
|
|
||||||
Import the dashboards
|
|
||||||
```
|
|
||||||
TODO
|
|
||||||
```
|
|
||||||
|
|
||||||
You should see all application targets un `UNKNOWN` or `DOWN` status.
|
|
||||||
```http://localhost:9090/targets```
|
|
||||||
|
|
||||||
## Start the example app you prefer
|
## Start the example app you prefer
|
||||||
|
|
||||||
```
|
```
|
||||||
docker-compose up -d golang-application
|
docker-compose up -d --build go-application
|
||||||
docker-compose up -d python-application
|
docker-compose up -d --build python-application
|
||||||
docker-compose up -d dotnet-application
|
docker-compose up -d --build dotnet-application
|
||||||
docker-compose up -d nodejs-application
|
docker-compose up -d --build nodejs-application
|
||||||
```
|
```
|
||||||
|
|
||||||
## Generate some requests by opening the application in the browser
|
## Generate some requests by opening the application in the browser
|
||||||
|
Loading…
x
Reference in New Issue
Block a user