Skip to content

Commit a8c5fa0

Browse files
authored
Rename k6quickpizza_server_* metric prefix to quickpizza_server (#345)
1 parent fcb2792 commit a8c5fa0

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

docs/metrics.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,20 @@ These metrics are generated from distributed traces and are configured in Grafan
4848

4949
## QuickPizza Application Metrics
5050

51-
`k6quickpizza_server_*`
51+
`quickpizza_server_*`
5252

5353
These are custom application metrics specific to the QuickPizza application, implemented using the Prometheus Go client library.
5454

55-
- `k6quickpizza_server_pizza_recommendations_total`: Total number of pizza recommendations served (Counter metric).
55+
- `quickpizza_server_pizza_recommendations_total`: Total number of pizza recommendations served (Counter metric).
5656

57-
- `k6quickpizza_server_number_of_ingredients_per_pizza`: Distribution of ingredients per pizza (Classic Histogram).
57+
- `quickpizza_server_number_of_ingredients_per_pizza`: Distribution of ingredients per pizza (Classic Histogram).
5858

59-
- `k6quickpizza_server_number_of_ingredients_per_pizza_alternate`: Distribution of ingredients per pizza (Native Histogram).
59+
- `quickpizza_server_number_of_ingredients_per_pizza_alternate`: Distribution of ingredients per pizza (Native Histogram).
6060

61-
- `k6quickpizza_server_pizza_calories_per_slice`: Distribution of calories per pizza slice (Classic Histogram).
61+
- `quickpizza_server_pizza_calories_per_slice`: Distribution of calories per pizza slice (Classic Histogram).
6262

63-
- `k6quickpizza_server_pizza_calories_per_slice_alternate`: Distribution of calories per pizza slice (Native Histogram).
63+
- `quickpizza_server_pizza_calories_per_slice_alternate`: Distribution of calories per pizza slice (Native Histogram).
6464

65-
- `k6quickpizza_server_http_requests_total`: Total number of HTTP requests received (Counter metric).
65+
- `quickpizza_server_http_requests_total`: Total number of HTTP requests received (Counter metric).
6666

67-
- `k6quickpizza_server_http_request_duration_seconds`: Duration of HTTP request processing (Classic Histogram).
67+
- `quickpizza_server_http_request_duration_seconds`: Duration of HTTP request processing (Classic Histogram).

pkg/http/http.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,22 @@ import (
5050
// Variables storing prometheus metrics.
5151
var (
5252
pizzaRecommendations = promauto.NewCounterVec(prometheus.CounterOpts{
53-
Namespace: "k6quickpizza",
53+
Namespace: "quickpizza",
5454
Subsystem: "server",
5555
Name: "pizza_recommendations_total",
5656
Help: "The total number of pizza recommendations",
5757
}, []string{"vegetarian", "tool"})
5858

5959
numberOfIngredientsPerPizza = promauto.NewHistogram(prometheus.HistogramOpts{
60-
Namespace: "k6quickpizza",
60+
Namespace: "quickpizza",
6161
Subsystem: "server",
6262
Name: "number_of_ingredients_per_pizza",
6363
Help: "The number of ingredients per pizza",
6464
Buckets: []float64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20},
6565
})
6666

6767
numberOfIngredientsPerPizzaNativeHistogram = promauto.NewHistogram(prometheus.HistogramOpts{
68-
Namespace: "k6quickpizza",
68+
Namespace: "quickpizza",
6969
Subsystem: "server",
7070
Name: "number_of_ingredients_per_pizza_alternate",
7171
Help: "The number of ingredients per pizza (Native Histogram)",
@@ -75,15 +75,15 @@ var (
7575
})
7676

7777
pizzaCaloriesPerSlice = promauto.NewHistogram(prometheus.HistogramOpts{
78-
Namespace: "k6quickpizza",
78+
Namespace: "quickpizza",
7979
Subsystem: "server",
8080
Name: "pizza_calories_per_slice",
8181
Help: "The number of calories per slice of pizza",
8282
Buckets: []float64{100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000},
8383
})
8484

8585
pizzaCaloriesPerSliceNativeHistogram = promauto.NewHistogram(prometheus.HistogramOpts{
86-
Namespace: "k6quickpizza",
86+
Namespace: "quickpizza",
8787
Subsystem: "server",
8888
Name: "pizza_calories_per_slice_alternate",
8989
Help: "The number of calories per slice of pizza (Native Histogram)",
@@ -93,14 +93,14 @@ var (
9393
})
9494

9595
httpRequests = promauto.NewCounterVec(prometheus.CounterOpts{
96-
Namespace: "k6quickpizza",
96+
Namespace: "quickpizza",
9797
Subsystem: "server",
9898
Name: "http_requests_total",
9999
Help: "The total number of HTTP requests",
100100
}, []string{"method", "path", "status"})
101101

102102
httpRequestDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{
103-
Namespace: "k6quickpizza",
103+
Namespace: "quickpizza",
104104
Subsystem: "server",
105105
Name: "http_request_duration_seconds",
106106
Help: "The duration of HTTP requests",

0 commit comments

Comments
 (0)