fluent-plugin-jfrog-send-metrics 0.1.3 → 0.1.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9478058c782a2032a4c64326c8941af41447d76c37e2d0fc3b503b4f2228e9fe
|
4
|
+
data.tar.gz: a94e57be5396a7b63df48bf3bef059f8363fbf77f0d865b0314ee60db4af5db1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f466df47d3e31fc06288db81256508334c7c88bf84128894b67bb870e9f948218b2daaab5d2bc37f7706c67a9c053a781f580ea07d1a4582c27ed4930708457
|
7
|
+
data.tar.gz: 4781bd4f82988877e7fd0dcb7b48a6fd4d2fd1c99c3404657c161d970bbe2423ebf654f4f73f0ca1e2bf71ba8420e9c08e363ae06e793ccdac9682b5a977dcf0
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fluent-plugin-jfrog-send-metrics (0.1.
|
4
|
+
fluent-plugin-jfrog-send-metrics (0.1.4)
|
5
5
|
fluentd (>= 0.14.10, < 2)
|
6
6
|
rest-client (~> 2.0)
|
7
7
|
|
@@ -10,7 +10,7 @@ GEM
|
|
10
10
|
specs:
|
11
11
|
ansi (1.5.0)
|
12
12
|
builder (3.2.4)
|
13
|
-
concurrent-ruby (1.
|
13
|
+
concurrent-ruby (1.1.9)
|
14
14
|
cool.io (1.7.1)
|
15
15
|
domain_name (0.5.20190701)
|
16
16
|
unf (>= 0.0.5, < 1.0.0)
|
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = "fluent-plugin-jfrog-send-metrics"
|
6
|
-
spec.version = "0.1.
|
6
|
+
spec.version = "0.1.4"
|
7
7
|
spec.authors = ["MahithaB"]
|
8
8
|
spec.email = ["60710901+MahithaB@users.noreply.github.com"]
|
9
9
|
|
@@ -8,7 +8,24 @@ class DatadogMetrics
|
|
8
8
|
@url = url
|
9
9
|
end
|
10
10
|
|
11
|
-
def
|
11
|
+
def add_custom_data(ddtags, record)
|
12
|
+
if ddtags.length() > 0
|
13
|
+
record_series = record['series']
|
14
|
+
data_array = []
|
15
|
+
record_series.each do |interim_data|
|
16
|
+
interim_data['tags'] ||= []
|
17
|
+
interim_data['tags'].push(*ddtags)
|
18
|
+
data_array << interim_data
|
19
|
+
end
|
20
|
+
record['series'] = data_array
|
21
|
+
return record
|
22
|
+
end
|
23
|
+
return record
|
24
|
+
end
|
25
|
+
|
26
|
+
def send_metrics(ddtags, record)
|
27
|
+
puts "Additional tags to be added to metrics are", ddtags
|
28
|
+
metrics_data = add_custom_data(ddtags, record)
|
12
29
|
puts "Sending received metrics data"
|
13
30
|
response = RestClient::Request.new(
|
14
31
|
method: :post,
|
@@ -28,6 +28,7 @@ module Fluent
|
|
28
28
|
config_param :target_platform, :string, default: ''
|
29
29
|
config_param :apikey, :string, default: ''
|
30
30
|
config_param :url, :string, default: 'https://metric-api.newrelic.com/metric/v1'
|
31
|
+
config_param :ddtags, :array, default: []
|
31
32
|
|
32
33
|
# `configure` is called before `start`.
|
33
34
|
# 'conf' is a `Hash` that includes the configuration parameters.
|
@@ -47,7 +48,7 @@ module Fluent
|
|
47
48
|
vendor.send_metrics(record)
|
48
49
|
elsif @target_platform == 'DATADOG'
|
49
50
|
vendor = DatadogMetrics.new(@apikey, @url)
|
50
|
-
vendor.send_metrics(record)
|
51
|
+
vendor.send_metrics(@ddtags, record)
|
51
52
|
end
|
52
53
|
end
|
53
54
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-jfrog-send-metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MahithaB
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|