prometheus-client-mmap 0.19.1 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1696ef06da9827e278d689a18f5f2accbdbb7ef1c893de81b538acb75c141af
4
- data.tar.gz: 7bc559ef0cf4913378ab3cea8661013584d5dd4bc136d4d12adedd7e4884cfc6
3
+ metadata.gz: ddabdc180689b2098a062a41246907e31fc76ce668a4f1ca520c225f802a6dcd
4
+ data.tar.gz: b41caad16aa1f6710440fca61baf78cc84dd1e9a187f20b7e59afcb39d736b6b
5
5
  SHA512:
6
- metadata.gz: aead55eab5d73783daf0b4d831ab85b046f057a21b0f3becf7556276d1a9a0e9ad051ef777c11a1ff07bf3bc452c3958b33b53e23b2695a1d3389bfecb1a679a
7
- data.tar.gz: 37273dce63fa8b8b9ab4b07381dfd59da1ce3ff902a463a20c3629888f6f591cfe04120bbd4ba03d87bcecee08adb3ffba8fa1255d7219ee3718b3c81773fe8c
6
+ metadata.gz: a5275669d21536a3d379ca606bff7f3df76aaa61df01b8f4ff5ad599304dfb19ec73f156e07eac2157c257373eb49bd4cfdaf951d6321b3dd3af4eb9245e3067
7
+ data.tar.gz: 65e34ad07012ea9e5e8c61594bbffbf37fa26019bdb673014b597abf10107c5b80c9f6ab065313402225fefcbc6494472f46b7e31e181eeac547e30196c6e071
data/README.md CHANGED
@@ -34,6 +34,20 @@ http_requests = prometheus.counter(:http_requests, 'A counter of HTTP requests m
34
34
  http_requests.increment
35
35
  ```
36
36
 
37
+ ## Rust extension (experimental)
38
+
39
+ In an effort to improve maintainability, there is now an optional Rust
40
+ implementation that reads the metric files and outputs the multiprocess
41
+ metrics to text. If `rustc` is available, then the Rust extension will
42
+ be built automatically. The `use_rust` keyword argument can be used:
43
+
44
+ ```ruby
45
+ puts Prometheus::Client::Formats::Text.marshal_multiprocess(use_rust: true)
46
+ ```
47
+
48
+ Note that this parameter will likely be deprecated and removed once the Rust
49
+ extension becomes the default mode.
50
+
37
51
  ### Rack middleware
38
52
 
39
53
  There are two [Rack][2] middlewares available, one to expose a metrics HTTP
@@ -230,6 +244,19 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
230
244
 
231
245
  To install this gem onto your local machine, run `bundle exec rake install`.
232
246
 
247
+ ### Releasing a new version
248
+
249
+ To release a new version:
250
+
251
+ 1. Update `lib/prometheus/client/version.rb` with the version number.
252
+ 1. Update `CHANGELOG.md` with the changes in the release.
253
+ 1. Create a merge request and merge it to `master`.
254
+ 1. Push a new tag to the repository.
255
+
256
+ The new version with precompiled, native gems will automatically be
257
+ published to [RubyGems](https://rubygems.org/gems/prometheus-client-mmap) when the
258
+ pipeline for the tag completes.
259
+
233
260
  [1]: https://github.com/prometheus/prometheus
234
261
  [2]: http://rack.github.io/
235
262
  [3]: https://gitlab.com/gitlab-org/prometheus-client-mmap/badges/master/pipeline.svg
@@ -4,7 +4,7 @@ require 'fileutils'
4
4
  $CFLAGS << ' -std=c99 -D_POSIX_C_SOURCE=200809L -Wall -Wextra'
5
5
 
6
6
  if enable_config('fail-on-warning')
7
- $CFLAGS << ' -Werrno'
7
+ $CFLAGS << ' -Werror'
8
8
  end
9
9
 
10
10
  if enable_config('debug')
@@ -0,0 +1,23 @@
1
+ [target.aarch64-apple-darwin]
2
+ # Without this flag, when linking static libruby, the linker removes symbols
3
+ # (such as `_rb_ext_ractor_safe`) which it thinks are dead code... but they are
4
+ # not, and they need to be included for the `embed` feature to work with static
5
+ # Ruby.
6
+ rustflags = [
7
+ "-C", "link-dead-code=on",
8
+ "-C", "link-arg=-undefined",
9
+ "-C", "link-arg=dynamic_lookup",
10
+ ]
11
+
12
+ [target.x86_64-apple-darwin]
13
+ rustflags = [
14
+ "-C", "link-dead-code=on",
15
+ "-C", "link-arg=-undefined",
16
+ "-C", "link-arg=dynamic_lookup",
17
+ ]
18
+
19
+ [target.aarch64-unknown-linux-gnu]
20
+ rustflags = [ "-C", "link-dead-code=on" ]
21
+
22
+ [target.x86_64-unknown-linux-gnu]
23
+ rustflags = [ "-C", "link-dead-code=on" ]