lusis-signalfx 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/signalfx.rb +9 -9
- data/lib/signalfx/signal_fx_client.rb +6 -6
- data/lib/signalfx/version.rb +1 -1
- metadata +20 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d88d1f80313e8a30bc87675b9e3f78bf4020ccf1
|
4
|
+
data.tar.gz: e2a3afccdd10643c95b3e012346876bd801fc20f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a62608ae0321dae5effab7aeb7e2607ea18e9a86b23920ea73f0b4ff3412425c1332118e4df1eb145234e7a6eabfdc5daa365f58a01cb0c5d4ea24e93dd3ad61
|
7
|
+
data.tar.gz: fdb90020065b496679ced13fbbb247cac3117e7ca8877da135603bd1824f96f1f6fed5e379fbd5b5356f95c1086ec2ef6c78ae5a25533d0c439e747f218c7c53
|
data/lib/signalfx.rb
CHANGED
@@ -21,21 +21,21 @@ module SignalFx
|
|
21
21
|
# @param timeout - number
|
22
22
|
# @param batch_size - number
|
23
23
|
# @param user_agents - array
|
24
|
-
def self.new(api_token, enable_aws_unique_id
|
25
|
-
api_endpoint
|
26
|
-
batch_size
|
24
|
+
def self.new(api_token, enable_aws_unique_id = false, ingest_endpoint = SignalFX::Config::DEFAULT_INGEST_ENDPOINT,
|
25
|
+
api_endpoint = SignalFX::Config::DEFAULT_API_ENDPOINT, timeout = SignalFX::Config::DEFAULT_TIMEOUT,
|
26
|
+
batch_size = SignalFX::Config::DEFAULT_BATCH_SIZE, user_agents = [])
|
27
27
|
begin
|
28
28
|
require_relative './proto/signal_fx_protocol_buffers.pb'
|
29
|
-
ProtoBufSignalFx.new(api_token, enable_aws_unique_id
|
30
|
-
api_endpoint
|
31
|
-
batch_size
|
29
|
+
ProtoBufSignalFx.new(api_token, enable_aws_unique_id, ingest_endpoint,
|
30
|
+
api_endpoint, timeout,
|
31
|
+
batch_size, user_agents)
|
32
32
|
|
33
33
|
rescue Exception => e
|
34
34
|
puts "Protocol Buffers not installed properly. Switch to JSON.
|
35
35
|
#{e}"
|
36
|
-
JsonSignalFx.new(api_token, enable_aws_unique_id
|
37
|
-
api_endpoint
|
38
|
-
batch_size
|
36
|
+
JsonSignalFx.new(api_token, enable_aws_unique_id, ingest_endpoint,
|
37
|
+
api_endpoint, timeout,
|
38
|
+
batch_size, user_agents)
|
39
39
|
end
|
40
40
|
|
41
41
|
|
@@ -15,9 +15,9 @@ class SignalFxClient
|
|
15
15
|
INGEST_ENDPOINT_SUFFIX = 'v2/datapoint'
|
16
16
|
API_ENDPOINT_SUFFIX = 'v1/event'
|
17
17
|
|
18
|
-
def initialize(api_token, enable_aws_unique_id
|
19
|
-
api_endpoint
|
20
|
-
batch_size
|
18
|
+
def initialize(api_token, enable_aws_unique_id = false, ingest_endpoint = SignalFX::Config::DEFAULT_INGEST_ENDPOINT,
|
19
|
+
api_endpoint = SignalFX::Config::DEFAULT_API_ENDPOINT, timeout = SignalFX::Config::DEFAULT_TIMEOUT,
|
20
|
+
batch_size = SignalFX::Config::DEFAULT_BATCH_SIZE, user_agents = [])
|
21
21
|
|
22
22
|
@api_token = api_token
|
23
23
|
@ingest_endpoint = ingest_endpoint
|
@@ -51,7 +51,7 @@ class SignalFxClient
|
|
51
51
|
# cumulative counters to report.
|
52
52
|
# gauges (list): a list of dictionaries representing the gauges to report.
|
53
53
|
# counters (list): a list of dictionaries representing the counters to report.
|
54
|
-
def send(cumulative_counters
|
54
|
+
def send(cumulative_counters = nil, gauges = nil, counters = nil)
|
55
55
|
process_datapoint('cumulative_counter', cumulative_counters)
|
56
56
|
process_datapoint('gauge', gauges)
|
57
57
|
process_datapoint('counter', counters)
|
@@ -77,7 +77,7 @@ class SignalFxClient
|
|
77
77
|
# cumulative counters to report.
|
78
78
|
# gauges (list): a list of dictionaries representing the gauges to report.
|
79
79
|
# counters (list): a list of dictionaries representing the counters to report.
|
80
|
-
def send_async(cumulative_counters
|
80
|
+
def send_async(cumulative_counters = nil, gauges = nil, counters = nil)
|
81
81
|
process_datapoint('cumulative_counter', cumulative_counters)
|
82
82
|
process_datapoint('gauge', gauges)
|
83
83
|
process_datapoint('counter', counters)
|
@@ -115,7 +115,7 @@ class SignalFxClient
|
|
115
115
|
# event_type (string): the event type (name of the event time series).
|
116
116
|
# dimensions (dict): a map of event dimensions.
|
117
117
|
# properties (dict): a map of extra properties on that event.
|
118
|
-
def send_event(event_type, dimensions
|
118
|
+
def send_event(event_type, dimensions = {}, properties = {})
|
119
119
|
data = {
|
120
120
|
eventType: event_type,
|
121
121
|
dimensions: dimensions,
|
data/lib/signalfx/version.rb
CHANGED
metadata
CHANGED
@@ -1,73 +1,72 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lusis-signalfx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SignalFx, Inc
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: bundler
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
16
|
- - "~>"
|
18
17
|
- !ruby/object:Gem::Version
|
19
18
|
version: '1.10'
|
20
|
-
|
19
|
+
name: bundler
|
21
20
|
prerelease: false
|
21
|
+
type: :development
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.10'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
30
|
- - "~>"
|
32
31
|
- !ruby/object:Gem::Version
|
33
32
|
version: '10.0'
|
34
|
-
|
33
|
+
name: rake
|
35
34
|
prerelease: false
|
35
|
+
type: :development
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: rspec
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
44
43
|
requirements:
|
45
44
|
- - ">="
|
46
45
|
- !ruby/object:Gem::Version
|
47
46
|
version: '0'
|
48
|
-
|
47
|
+
name: rspec
|
49
48
|
prerelease: false
|
49
|
+
type: :development
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name: webmock
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
58
57
|
requirements:
|
59
58
|
- - "~>"
|
60
59
|
- !ruby/object:Gem::Version
|
61
60
|
version: '1.21'
|
62
|
-
|
61
|
+
name: webmock
|
63
62
|
prerelease: false
|
63
|
+
type: :development
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.21'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: protobuf
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
72
71
|
requirements:
|
73
72
|
- - "~>"
|
@@ -76,8 +75,9 @@ dependencies:
|
|
76
75
|
- - ">="
|
77
76
|
- !ruby/object:Gem::Version
|
78
77
|
version: 3.5.1
|
79
|
-
|
78
|
+
name: protobuf
|
80
79
|
prerelease: false
|
80
|
+
type: :runtime
|
81
81
|
version_requirements: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
83
|
- - "~>"
|
@@ -87,23 +87,20 @@ dependencies:
|
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: 3.5.1
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
|
-
name: rest-client
|
91
90
|
requirement: !ruby/object:Gem::Requirement
|
92
91
|
requirements:
|
93
92
|
- - "~>"
|
94
93
|
- !ruby/object:Gem::Version
|
95
94
|
version: '1.8'
|
96
|
-
|
95
|
+
name: rest-client
|
97
96
|
prerelease: false
|
97
|
+
type: :runtime
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '1.8'
|
103
|
-
description: This is a programmatic interface in Ruby for SignalFx's metadata and
|
104
|
-
ingest APIs. It is meant to provide a base for communicating with SignalFx APIs
|
105
|
-
that can be easily leveraged by scripts and applications to interact with SignalFx
|
106
|
-
or report metric and event data to SignalFx. Library supports Ruby 2.x versions
|
103
|
+
description: This is a programmatic interface in Ruby for SignalFx's metadata and ingest APIs. It is meant to provide a base for communicating with SignalFx APIs that can be easily leveraged by scripts and applications to interact with SignalFx or report metric and event data to SignalFx. Library supports Ruby 2.x versions
|
107
104
|
email:
|
108
105
|
- info@signalfx.com
|
109
106
|
executables: []
|
@@ -131,7 +128,7 @@ homepage: https://signalfx.com
|
|
131
128
|
licenses:
|
132
129
|
- Apache Software License v2 © SignalFx
|
133
130
|
metadata: {}
|
134
|
-
post_install_message:
|
131
|
+
post_install_message:
|
135
132
|
rdoc_options: []
|
136
133
|
require_paths:
|
137
134
|
- lib
|
@@ -146,10 +143,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
143
|
- !ruby/object:Gem::Version
|
147
144
|
version: '0'
|
148
145
|
requirements: []
|
149
|
-
rubyforge_project:
|
146
|
+
rubyforge_project:
|
150
147
|
rubygems_version: 2.4.8
|
151
|
-
signing_key:
|
148
|
+
signing_key:
|
152
149
|
specification_version: 4
|
153
150
|
summary: Ruby client library for SignalFx
|
154
151
|
test_files: []
|
155
|
-
has_rdoc:
|
152
|
+
has_rdoc:
|