Skip to content

Commit 0b23ea3

Browse files
committed
Update CHANGELOG.md for 3.0.0
Signed-off-by: Chris Sinjakli <chris@sinjakli.co.uk>
1 parent e0456e9 commit 0b23ea3

1 file changed

Lines changed: 67 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 67 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,40 @@
11
# CHANGELOG
22

3-
# Upcoming 3.0.0 / 2021-??-?? (not released yet, these are the merged PRs we'll release)
3+
# Unreleased changes
4+
5+
_None outstanding_
6+
7+
# 3.0.0 / 2022-??-?? (TODO: edit commit to add date before merging)
48

59
This new major version includes some breaking changes. They should be reasonably easy to
610
adapt to, but please read the details below:
711

812
## Breaking changes
913

10-
- [#206](https://github.com/prometheus/client_ruby/pull/206) Include SCRIPT_NAME when
14+
Please refer to [UPGRADING.md](UPGRADING.md) for details on upgrading from versions
15+
`< 3.0.0`.
16+
17+
- [#206](https://github.com/prometheus/client_ruby/pull/206) Include `SCRIPT_NAME` when
1118
determining path in Collector:
12-
When determining the path for a request, Rack::Request prefixes the
13-
SCRIPT_NAME. This was a problem with our code when using mountable engines,
14-
where the engine part of the path gets lost. This patch fixes that to include SCRIPT_NAME as part of the path.
19+
When determining the path for a request, `Rack::Request` prefixes the
20+
`SCRIPT_NAME`. This was a problem with our code when using mountable engines,
21+
where the engine part of the path gets lost. This patch fixes that to include `SCRIPT_NAME` as part of the path.
1522

1623
**This may be a breaking change**. Labels may change in existing metrics.
1724

25+
- [#245](https://github.com/prometheus/client_ruby/pull/206) Use framework-specific route
26+
info and handle consecutive path segments containing IDs in Collector:
27+
When generating the `path` label, we now use framework-specific information from the
28+
request environment to produce better labels for apps written in the Sinatra and Grape
29+
frameworks. Rails doesn't provide the information we need to do the same there, but we
30+
hope to get such functionality added in a future release.
31+
32+
Our framework-agnostic fallback (which Rails apps will use) has also been improved. It
33+
now supports stripping IDs/UUIDs from consecutive path segments, where previously only
34+
alternating segments would be correctly stripped.
35+
36+
**This may be a breaking change**. Labels may change in existing metrics.
37+
1838
- [#209](https://github.com/prometheus/client_ruby/pull/209) Automatically initialize metrics
1939
without labels.
2040
Following the [Prometheus Best Practices](https://prometheus.io/docs/practices/instrumentation/#avoid-missing-metrics),
@@ -28,21 +48,55 @@ adapt to, but please read the details below:
2848
result in a significant increase to the number of time series being exported. We
2949
recommend you test this and make sure it doesn't cause problems.
3050

31-
- [#220](https://github.com/prometheus/client_ruby/pull/220) Improvements to PushGateway client:
51+
- [#220](https://github.com/prometheus/client_ruby/pull/220) and [#234](https://github.com/prometheus/client_ruby/pull/234)
52+
Improvements to Pushgateway client:
3253
- The `job` parameter is now mandatory when instantiating `Prometheus::Client::Push`
3354
and will raise `ArgumentError` if not specified, or if `nil` or an empty string/object
3455
are passed.
3556
- The `Prometheus::Client::Push` initializer now takes keyword arguments.
36-
- We now correctly handle an empty value for `instance` when generating the path to
37-
the PushGateway.
38-
- Fixed URI escaping of spaces in the path to PushGateway. In the past, spaces were
39-
being encoded as `+` instead of `%20`, which is invalid.
57+
- You can now pass a set of arbitrary key-value pairs (`grouping_key`) to uniquely
58+
identify a job instance, rather than just an `instance` label.
59+
- Fixed URI escaping of spaces in the path when pushing to to Pushgateway. In the
60+
past, spaces were being encoded as `+` instead of `%20`, which resulted in
61+
incorrect label values in the grouping key.
62+
- We now correctly encode special values in `job` and `grouping_key` that can't
63+
ordinarily be represented in the URL. This mean you can have a forward slash (`/`)
64+
in a grouping key label value, or set one to the empty string.
65+
- We validate that labels in your `grouping_key` don't clash with labels in the
66+
metrics being submitted, and raise an error if they do.
67+
- We raise an error on a non-2xx HTTP response from the Pushgateway.
4068

4169
**This is a breaking change if you use Pushgateway**. You will need to update your
4270
code to pass keyword arguments to the `Prometheus::Client::Push` initializer.
43-
4471

45-
# 2.2.0 / 2021-06-?? <-- TODO: update this date when we merge this and cut the new version
72+
- [#242](https://github.com/prometheus/client_ruby/pull/242) Move HTTP Basic
73+
Authentication credentials in `Prometheus::Client::Push` to separate method call:
74+
In earlier versions, these were provided as part of the `gateway` URL, which had some
75+
significant downsides when it came to special characters in usernames/passwords.
76+
77+
These credentials must now be passed via an explicit call to `basic_auth` on an
78+
instance of `Prometheus::Client::Push`.
79+
80+
**This is a breaking change if you use Pushgateway with HTTP Basic Authentication**.
81+
You will need to update your code to call this method instead of including the
82+
credentials in the URL.
83+
84+
- [#236](https://github.com/prometheus/client_ruby/pull/236) Validate label names:
85+
Previously, we didn't validate that label names match the character set required by
86+
Prometheus (`[a-zA-Z_][a-zA-Z0-9_]*`). As of this release, we raise an error if a
87+
metric is initialized with label names that don't match that regex.
88+
89+
**This is a breaking change**. While it's likely that Prometheus server would have
90+
been failing to scrape metrics with such labels anyway, declaring them will now cause
91+
an error to be raised in your code.
92+
93+
- [#237](https://github.com/prometheus/client_ruby/pull/237) Drop support for old Ruby versions:
94+
Ruby versions below 2.6 are no longer supported upstream, and `client_ruby` is no
95+
longer tested against them.
96+
97+
**This may be a breaking change**. We no longer make efforts to ensure that
98+
`client_ruby` works on older versions, and any issues filed specific to them will be
99+
considered invalid.
46100

47101
## New Features
48102

@@ -53,7 +107,7 @@ adapt to, but please read the details below:
53107
through that port.
54108

55109
- [#222](https://github.com/prometheus/client_ruby/pull/222) Enable configuring `Net::HTTP`
56-
timeouts for PushGateway calls.
110+
timeouts for Pushgateway calls.
57111
You can now specify `open_timeout` and `read_timeout` when instantiating
58112
`Prometheus::Client::Push`, to control these timeouts.
59113

0 commit comments

Comments
 (0)