Skip to content

Commit b8367d5

Browse files
committed
Update readme and changelog
Signed-off-by: Xabier Larrakoetxea <[email protected]>
1 parent 59a20b8 commit b8367d5

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
## [Unreleased]
44

5+
### Breaking changes
6+
7+
- The Recorder methods now receive `service` argument to identify the service.
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)
16+
517
## [0.5.0] - 2019-12-12
618

719
### Added

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
UNIT_TEST_CMD := go test `go list ./... | grep -v vendor` -race -v
33
INTEGRATION_TEST_CMD := go test `go list ./... | grep -v vendor` -race -v -tags='integration'
44
BENCHMARK_CMD := go test `go list ./... | grep -v vendor` -benchmem -bench=.
5-
DEPS_CMD := GO111MODULE=on go mod tidy && GO111MODULE=on go mod vendor
5+
DEPS_CMD := go mod tidy
66
MOCKS_CMD := go generate ./internal/mocks
77

88
.PHONY: default

Readme.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ The factory options are the ones that are passed in the moment of creating the m
129129

130130
This is the implementation of the metrics backend, by default it's a dummy recorder.
131131

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+
132136
#### GroupedStatus
133137

134138
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,
163167

164168
#### SizeBuckets
165169

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.
167171

168172
#### Registry
169173

0 commit comments

Comments
 (0)