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
* Ignore Gemfile.lock from Git
We don't really want to lock folks working on this gem into exact
versions of the various dependencies. Especially for certain
dependencies with native extensions, which might not install on
different platforms. This also organizes the .gitignore.
* Exclude dev-specific files from packed Gem
We can keep the size of the packaged Gem smaller by no including specs,
binstubs, git/github config, and other development-time-only files.
* Upgrade Rake (b/c why not?)
* Fix some spelling, grammar, and formatting
* Test newer Rubies and Ubuntus too!
* fixup ubuntu
* Run tests on a new PR
* Bring back Gemfile.lock and use latest Ruby 2.6
Even though Ruby 2.6 (and 2.7) are EoL'd, they are still supported by
this Gem. So let's use that oldest one locally too. Also, it appears it
is now recommended to include the Gemfile.lock in Git for Gems. The
guidance from Bundler use to be _NOT_ to include the .lock file. But,
time moves forward and things change. I'll adapt and learn too! 😅
https://bundler.io/guides/faq.html#using-gemfiles-inside-gems
* Appease Rubocop 👮
Copy file name to clipboardExpand all lines: README.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Puma plugin which should be able to handle all your metric needs regarding your webserver:
4
4
5
-
- ability to publish basic puma statistics (like queue backlog) to both logs and datadog
5
+
- ability to publish basic puma statistics (like queue backlog) to both logs and Datadog
6
6
- ability to add custom target whenever you need it
7
7
- ability to monitor puma socket listen queue (!)
8
8
- ability to report requests queue time via custom rack middleware - the time request spent between being accepted by Load Balancer and start of its processing by Puma worker
@@ -17,11 +17,15 @@ gem "puma-plugin-telemetry"
17
17
18
18
And then execute:
19
19
20
-
$ bundle install
20
+
```console
21
+
$ bundle install
22
+
```
21
23
22
24
Or install it yourself as:
23
25
24
-
$ gem install puma-plugin-telemetry
26
+
```console
27
+
$ gem install puma-plugin-telemetry
28
+
```
25
29
26
30
## Usage
27
31
@@ -39,15 +43,15 @@ end
39
43
40
44
### Basic
41
45
42
-
Output telemetry as JSON to STDOUT
46
+
Output telemetry as JSON to `STDOUT`
43
47
44
48
```ruby
45
49
config.add_target :io
46
50
```
47
51
48
-
### Datadog statsd target
52
+
### Datadog StatsD target
49
53
50
-
Given gem provides built in target for Datadog Statsd client, that uses batch operation to publish metrics.
54
+
Given gem provides built in target for Datadog StatsD client, that uses batch operation to publish metrics.
51
55
52
56
**NOTE** Be sure to have `dogstatsd` gem installed.
53
57
@@ -76,7 +80,7 @@ end
76
80
77
81
### Custom Targets
78
82
79
-
Target is a simple object that implements `call` methods that accepts `telemetry` hash object. This means it can be super simple `proc` or some sofisticated class calling some external API.
83
+
Target is a simple object that implements `call` methods that accepts `telemetry` hash object. This means it can be super simple `proc` or some sophisticated class calling some external API.
80
84
81
85
Just be mindful that if the API takes long to call, it will slow down frequency with which telemetry will get reported.
82
86
@@ -87,7 +91,7 @@ Just be mindful that if the API takes long to call, it will slow down frequency
87
91
88
92
## Extra middleware
89
93
90
-
This gems comes together with middleware for measuring request queue time, which will be reported in `request.env` and published to given statsd client.
94
+
This gems comes together with middleware for measuring request queue time, which will be reported in `request.env` and published to given StatsD client.
91
95
92
96
Example configuration:
93
97
@@ -110,7 +114,7 @@ This will provide proper metric in Datadog and in logs as well. Logs can be tran
110
114
111
115
## Development
112
116
113
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
117
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
114
118
115
119
To install this gem onto your local machine, run `bundle exec rake install`.
0 commit comments