@@ -4,9 +4,64 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
5
5
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
6
6
7
- ## [ 0.19.0] - unreleased
7
+ ## [ 0.19.0-alpha]
8
+
9
+ This is a large release including multiple breaking changes. Major user-facing
10
+ improvement of this release is support for the OpenMetrics Protobuf format.
11
+
12
+ ### Upgrade guide:
13
+
14
+ - Don't box before registering.
15
+
16
+ ``` diff
17
+ registry.register(
18
+ "my_metric",
19
+ "This is my metric",
20
+ - Box::new(my_metric.clone()),
21
+ + my_metric.clone(),
22
+ );
23
+ ```
24
+
25
+ - Gauge uses ` i64 ` instead of ` u64 ` .
26
+
27
+ ``` diff
28
+ my_gauge
29
+ - .set(42u64);
30
+ + .set(42i64);
31
+ ```
32
+
33
+ - Derive ` EncodeLabelSet ` for ` struct ` and ` EncodeLabelValue ` for ` enum ` instead of just ` Encode ` for all and require ` Debug ` .
34
+
35
+ ``` diff
36
+ - #[derive(Clone, Hash, PartialEq, Eq, Encode)]
37
+ + #[derive(Clone, Hash, PartialEq, Eq, EncodeLabelSet, Debug)]
38
+ struct Labels {
39
+ path: String,
40
+ method: Method,
41
+ some_number: u64,
42
+ }
43
+
44
+ - #[derive(Clone, Hash, PartialEq, Eq, Encode)]
45
+ + #[derive(Clone, Hash, PartialEq, Eq, EncodeLabelValue, Debug)]
46
+ enum Method {
47
+ Get,
48
+ #[allow(dead_code)]
49
+ Put,
50
+ }
51
+ ```
52
+
53
+ - Encode as utf-8 and not as ` [u8] ` .
54
+
55
+ ``` diff
56
+ - let mut buffer = vec![];
57
+ + let mut buffer = String::new();
58
+ encode(&mut buffer, ®istry).unwrap();
59
+ ```
60
+
61
+ For details on each of these, see changelog entries below.
8
62
9
63
### Added
64
+
10
65
- Added support for the OpenMetrics protobuf format. See [ PR 83] .
11
66
- Added a ` remove ` method to ` Family ` to allow the removal of a specified label
12
67
set from a family. See [ PR 85] .
0 commit comments