You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,18 @@
2
2
3
3
## [Unreleased]
4
4
5
+
### Breaking changes
6
+
7
+
- The Recorder methods now receive properties in a single argument, this will make less breaking changes and better API (there where too many arguments for a function).
8
+
9
+
### Added
10
+
11
+
- Added new `service` property to identify the service.
12
+
13
+
### Changed
14
+
15
+
- The Recorder methods now receive properties in a single argument, this will make less breaking changes and better API (there where too many arguments for a function)
Copy file name to clipboardExpand all lines: Readme.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,6 +129,10 @@ The factory options are the ones that are passed in the moment of creating the m
129
129
130
130
This is the implementation of the metrics backend, by default it's a dummy recorder.
131
131
132
+
#### Service
133
+
134
+
This is an optional argument that can be used to set a specific service on all the middleware metrics, this is helpful when the service uses multiple middlewares on the same app, for example for the HTTP api server and the metrics server. This also gives the ability to use the same recorder with different middlewares.
135
+
132
136
#### GroupedStatus
133
137
134
138
Storing all the status codes could increase the cardinality of the metrics, usually this is not a common case because the used status codes by a service are not too much and are finite, but some services use a lot of different status codes, grouping the status on the `\dxx` form could impact the performance (in a good way) of the queries on Prometheus (as they are already aggregated), on the other hand it losses detail. For example the metrics code `code="401"`, `code="404"`, `code="403"` with this enabled option would end being `code="4xx"` label. By default is disabled.
@@ -163,7 +167,7 @@ DurationBuckets are the buckets used for the request duration histogram metric,
163
167
164
168
#### SizeBuckets
165
169
166
-
This works the same as the `DurationBuckets` but for the metric that measures the size of the responses. It's measured in bytes and by default goes form 1B to 1GB.
170
+
This works the same as the `DurationBuckets` but for the metric that measures the size of the responses. It's measured in bytes and by default goes from 1B to 1GB.
0 commit comments