puma-plugin-statsd 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ac5651e242dcf306ed0c5964de2c7178a142e9555333cfd203e043dada926a6
4
- data.tar.gz: 9cc7a3b70cdcda54a824ca4d9b65714c16f7b20834bb348182eb787820b5e5e1
3
+ metadata.gz: 4794cf011c7fa906180ab8dfa2b0d89a0a1c942cbfbce0725d72facb68804a32
4
+ data.tar.gz: 65b939ecf211d9fb4749d67e03b273524ad61794758f5f6a89a6a6023e66c870
5
5
  SHA512:
6
- metadata.gz: 1222d6580444972583bec535348958301a8c5aa4860d08e87bb1e735fc09d9b2764a38b4c3b9aa355878b9080ca30ef80b413c55c0f8f4b97edf750515162a89
7
- data.tar.gz: 07e8987c8ce8f8f3db573241f824c80224aec9ffa2f5b1e8bbd474105981d6529c0c1a4a870995622f62c9edad1181aaced6c3382b8746aebf9149f51d0842c9
6
+ metadata.gz: 8de8010e2f5716873518f03ebf3534ae2f4059423d825c2cd1da728fa8cf4511b3220abe661d8ab1d12f945f954934d4e6361b936ced61310162fa33440b014e
7
+ data.tar.gz: dbb9a2486a4b1f01a69de349286c280897ab243fbab47507c695b6eaeda38ca91e4a9780d8d874b48a06411261c1b6ebdc1c71343048ac06c2ee842114e68428
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.1.0 2021-12-04
4
+
5
+ * Adds support for Datadog unified service tagging (env, service, version) (PR #[31](https://github.com/yob/puma-plugin-statsd/pull/37))
6
+
3
7
  ## 2.0.0 2021-07-27
4
8
 
5
9
  * Require puma 5 or better
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Puma Statsd Plugin
2
2
 
3
- [Puma][puma] integration with [statsd](statsd) for easy tracking of key metrics
3
+ [Puma][puma] integration with [statsd][statsd] for easy tracking of key metrics
4
4
  that puma can provide:
5
5
 
6
6
  * puma.workers
@@ -140,6 +140,22 @@ Puma::Plugin.create do
140
140
  end
141
141
  end
142
142
 
143
+ # Support the Unified Service Tagging from Datadog, so that we can share
144
+ # the metric tags with the application running
145
+ #
146
+ # https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging
147
+ if ENV.has_key?("DD_ENV")
148
+ tags << "env:#{ENV["DD_ENV"]}"
149
+ end
150
+
151
+ if ENV.has_key?("DD_SERVICE")
152
+ tags << "service:#{ENV["DD_SERVICE"]}"
153
+ end
154
+
155
+ if ENV.has_key?("DD_VERSION")
156
+ tags << "version:#{ENV["DD_VERSION"]}"
157
+ end
158
+
143
159
  # Return nil if we have no environment variable tags. This way we don't
144
160
  # send an unnecessary '|' on the end of each stat
145
161
  return nil if tags.empty?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma-plugin-statsd
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Healy
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-27 00:00:00.000000000 Z
11
+ date: 2021-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: puma
@@ -100,7 +100,7 @@ dependencies:
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
- description:
103
+ description:
104
104
  email: james@yob.id.au
105
105
  executables:
106
106
  - statsd-to-stdout
@@ -116,7 +116,7 @@ homepage: https://github.com/yob/puma-plugin-statsd
116
116
  licenses:
117
117
  - MIT
118
118
  metadata: {}
119
- post_install_message:
119
+ post_install_message:
120
120
  rdoc_options: []
121
121
  require_paths:
122
122
  - lib
@@ -131,8 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  requirements: []
134
- rubygems_version: 3.0.3
135
- signing_key:
134
+ rubygems_version: 3.2.3
135
+ signing_key:
136
136
  specification_version: 4
137
137
  summary: Send puma metrics to statsd via a background thread
138
138
  test_files: []