hystrix_metrics 0.0.1-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. checksums.yaml +7 -0
  2. data/hystrix_metrics.gemspec +19 -0
  3. data/lib/com/fasterxml/jackson/core/jackson-core/2.5.2/jackson-core-2.5.2.jar +0 -0
  4. data/lib/com/netflix/archaius/archaius-core/0.4.1/archaius-core-0.4.1.jar +0 -0
  5. data/lib/com/netflix/hystrix/hystrix-core/1.4.10/hystrix-core-1.4.10.jar +0 -0
  6. data/lib/com/netflix/hystrix/hystrix-metrics-event-stream/1.4.10/hystrix-metrics-event-stream-1.4.10.jar +0 -0
  7. data/lib/commons-configuration/commons-configuration/1.8/commons-configuration-1.8.jar +0 -0
  8. data/lib/commons-lang/commons-lang/2.6/commons-lang-2.6.jar +0 -0
  9. data/lib/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar +0 -0
  10. data/lib/hystrix_metrics/metric.rb +24 -0
  11. data/lib/hystrix_metrics/metric_server.rb +40 -0
  12. data/lib/hystrix_metrics.rb +5 -0
  13. data/lib/hystrix_metrics_jars.rb +40 -0
  14. data/lib/io/reactivex/rxjava/1.0.10/rxjava-1.0.10.jar +0 -0
  15. data/lib/io/undertow/undertow-core/2.0.14.Final/undertow-core-2.0.14.Final.jar +0 -0
  16. data/lib/io/undertow/undertow-servlet/2.0.14.Final/undertow-servlet-2.0.14.Final.jar +0 -0
  17. data/lib/org/jboss/logging/jboss-logging/3.3.2.Final/jboss-logging-3.3.2.Final.jar +0 -0
  18. data/lib/org/jboss/spec/javax/annotation/jboss-annotations-api_1.2_spec/1.0.2.Final/jboss-annotations-api_1.2_spec-1.0.2.Final.jar +0 -0
  19. data/lib/org/jboss/spec/javax/servlet/jboss-servlet-api_4.0_spec/1.0.0.Final/jboss-servlet-api_4.0_spec-1.0.0.Final.jar +0 -0
  20. data/lib/org/jboss/xnio/xnio-api/3.3.8.Final/xnio-api-3.3.8.Final.jar +0 -0
  21. data/lib/org/jboss/xnio/xnio-nio/3.3.8.Final/xnio-nio-3.3.8.Final.jar +0 -0
  22. data/lib/org/slf4j/slf4j-api/1.7.0/slf4j-api-1.7.0.jar +0 -0
  23. metadata +81 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3c1ba4c02682c52b6e8c41417d056474ac0b9af6
4
+ data.tar.gz: '09b4261b1c9214cf392971476374f502c22e1d0c'
5
+ SHA512:
6
+ metadata.gz: 385ecb3070b2d84fe26c4aade61a62b7c163cec99b755cdaf6f321dad0cc09f95dec1bc9e87e51f836fa53ace66198f8d18c14057c8fc88ce27decb075abc74a
7
+ data.tar.gz: 120f1362eb23e3b6686bab9c98129e5099b3d4652ebee7f298dd5f8bd2c34abf556620981be5b7bb93e31693fb39540de661c282e911eb48c4336bb8fe4e3a57
@@ -0,0 +1,19 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'hystrix_metrics'
3
+ s.version = '0.0.1'
4
+ s.author = 'Chris Mowforth'
5
+ s.email = 'chris@mowforth.com'
6
+ s.license = 'Apache-2.0'
7
+ s.homepage = 'https://github.com/m0wfo/hystrix_metrics'
8
+ s.summary = 'Easily capture & expose Hystrix metrics in JRuby'
9
+ s.platform = 'java'
10
+
11
+ s.files = Dir.glob('lib/**/*') + ['hystrix_metrics.gemspec']
12
+
13
+ s.add_runtime_dependency 'jar-dependencies', '~> 0.3.0'
14
+
15
+ s.requirements << 'jar com.netflix.hystrix:hystrix-core, 1.4.10'
16
+ s.requirements << 'jar com.netflix.hystrix:hystrix-metrics-event-stream, 1.4.10'
17
+ s.requirements << 'jar io.undertow:undertow-servlet, 2.0.14.Final'
18
+
19
+ end
@@ -0,0 +1,24 @@
1
+ require 'hystrix_metrics_jars'
2
+
3
+ module HystrixMetrics
4
+ import com.netflix.hystrix.HystrixCommand
5
+ import com.netflix.hystrix.HystrixCommandKey
6
+ import com.netflix.hystrix.HystrixCommandGroupKey
7
+
8
+ class Metric < HystrixCommand
9
+
10
+ attr_reader :command
11
+
12
+ def initialize(name, work, group="Default")
13
+ @work = work
14
+ super(HystrixCommand::Setter
15
+ .withGroupKey(HystrixCommandGroupKey::Factory.asKey(group))
16
+ .andCommandKey(HystrixCommandKey::Factory.asKey(name)))
17
+ end
18
+
19
+ def run
20
+ @work.call
21
+ end
22
+ end
23
+
24
+ end
@@ -0,0 +1,40 @@
1
+ require 'hystrix_metrics_jars'
2
+
3
+ module HystrixMetrics
4
+
5
+ class MetricServer
6
+ import com.netflix.hystrix.contrib.metrics.eventstream.HystrixMetricsStreamServlet
7
+ import 'io.undertow.Handlers'
8
+ import 'io.undertow.Undertow'
9
+ import 'io.undertow.servlet.Servlets'
10
+
11
+ attr_reader :server
12
+
13
+ def initialize(port, path="/metrics")
14
+ servlet = Servlets.servlet("EventStream", HystrixMetricsStreamServlet.java_class).addMapping('/*')
15
+ classloader = java.lang.ClassLoader.getSystemClassLoader
16
+ builder = Servlets.deployment
17
+ .setDeploymentName("HystrixMetricServer")
18
+ .setClassLoader(classloader)
19
+ .setContextPath(path)
20
+ .addServlets(servlet)
21
+ manager = Servlets.defaultContainer.addDeployment(builder)
22
+ manager.deploy
23
+ path = Handlers.path(Handlers.redirect(path)).addPrefixPath(path, manager.start)
24
+
25
+ @server = Undertow.builder
26
+ .addHttpListener(port, "0.0.0.0")
27
+ .setHandler(path)
28
+ .build
29
+ end
30
+
31
+ def start
32
+ @server.start
33
+ end
34
+
35
+ def stop
36
+ @server.stop
37
+ end
38
+ end
39
+
40
+ end
@@ -0,0 +1,5 @@
1
+ require 'hystrix_metrics_jars'
2
+
3
+ module HystrixMetrics
4
+ class HystrixMetrics; end
5
+ end
@@ -0,0 +1,40 @@
1
+ # this is a generated file, to avoid over-writing it just delete this comment
2
+ begin
3
+ require 'jar_dependencies'
4
+ rescue LoadError
5
+ require 'com/netflix/hystrix/hystrix-metrics-event-stream/1.4.10/hystrix-metrics-event-stream-1.4.10.jar'
6
+ require 'org/jboss/xnio/xnio-api/3.3.8.Final/xnio-api-3.3.8.Final.jar'
7
+ require 'org/slf4j/slf4j-api/1.7.0/slf4j-api-1.7.0.jar'
8
+ require 'commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar'
9
+ require 'org/jboss/logging/jboss-logging/3.3.2.Final/jboss-logging-3.3.2.Final.jar'
10
+ require 'org/jboss/spec/javax/servlet/jboss-servlet-api_4.0_spec/1.0.0.Final/jboss-servlet-api_4.0_spec-1.0.0.Final.jar'
11
+ require 'commons-configuration/commons-configuration/1.8/commons-configuration-1.8.jar'
12
+ require 'io/reactivex/rxjava/1.0.10/rxjava-1.0.10.jar'
13
+ require 'com/fasterxml/jackson/core/jackson-core/2.5.2/jackson-core-2.5.2.jar'
14
+ require 'commons-lang/commons-lang/2.6/commons-lang-2.6.jar'
15
+ require 'com/netflix/hystrix/hystrix-core/1.4.10/hystrix-core-1.4.10.jar'
16
+ require 'io/undertow/undertow-servlet/2.0.14.Final/undertow-servlet-2.0.14.Final.jar'
17
+ require 'io/undertow/undertow-core/2.0.14.Final/undertow-core-2.0.14.Final.jar'
18
+ require 'org/jboss/spec/javax/annotation/jboss-annotations-api_1.2_spec/1.0.2.Final/jboss-annotations-api_1.2_spec-1.0.2.Final.jar'
19
+ require 'com/netflix/archaius/archaius-core/0.4.1/archaius-core-0.4.1.jar'
20
+ require 'org/jboss/xnio/xnio-nio/3.3.8.Final/xnio-nio-3.3.8.Final.jar'
21
+ end
22
+
23
+ if defined? Jars
24
+ require_jar 'com.netflix.hystrix', 'hystrix-metrics-event-stream', '1.4.10'
25
+ require_jar 'org.jboss.xnio', 'xnio-api', '3.3.8.Final'
26
+ require_jar 'org.slf4j', 'slf4j-api', '1.7.0'
27
+ require_jar 'commons-logging', 'commons-logging', '1.1.1'
28
+ require_jar 'org.jboss.logging', 'jboss-logging', '3.3.2.Final'
29
+ require_jar 'org.jboss.spec.javax.servlet', 'jboss-servlet-api_4.0_spec', '1.0.0.Final'
30
+ require_jar 'commons-configuration', 'commons-configuration', '1.8'
31
+ require_jar 'io.reactivex', 'rxjava', '1.0.10'
32
+ require_jar 'com.fasterxml.jackson.core', 'jackson-core', '2.5.2'
33
+ require_jar 'commons-lang', 'commons-lang', '2.6'
34
+ require_jar 'com.netflix.hystrix', 'hystrix-core', '1.4.10'
35
+ require_jar 'io.undertow', 'undertow-servlet', '2.0.14.Final'
36
+ require_jar 'io.undertow', 'undertow-core', '2.0.14.Final'
37
+ require_jar 'org.jboss.spec.javax.annotation', 'jboss-annotations-api_1.2_spec', '1.0.2.Final'
38
+ require_jar 'com.netflix.archaius', 'archaius-core', '0.4.1'
39
+ require_jar 'org.jboss.xnio', 'xnio-nio', '3.3.8.Final'
40
+ end
metadata ADDED
@@ -0,0 +1,81 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hystrix_metrics
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: java
6
+ authors:
7
+ - Chris Mowforth
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-10-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jar-dependencies
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.3.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.3.0
27
+ description:
28
+ email: chris@mowforth.com
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - hystrix_metrics.gemspec
34
+ - lib/com/fasterxml/jackson/core/jackson-core/2.5.2/jackson-core-2.5.2.jar
35
+ - lib/com/netflix/archaius/archaius-core/0.4.1/archaius-core-0.4.1.jar
36
+ - lib/com/netflix/hystrix/hystrix-core/1.4.10/hystrix-core-1.4.10.jar
37
+ - lib/com/netflix/hystrix/hystrix-metrics-event-stream/1.4.10/hystrix-metrics-event-stream-1.4.10.jar
38
+ - lib/commons-configuration/commons-configuration/1.8/commons-configuration-1.8.jar
39
+ - lib/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
40
+ - lib/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
41
+ - lib/hystrix_metrics.rb
42
+ - lib/hystrix_metrics/metric.rb
43
+ - lib/hystrix_metrics/metric_server.rb
44
+ - lib/hystrix_metrics_jars.rb
45
+ - lib/io/reactivex/rxjava/1.0.10/rxjava-1.0.10.jar
46
+ - lib/io/undertow/undertow-core/2.0.14.Final/undertow-core-2.0.14.Final.jar
47
+ - lib/io/undertow/undertow-servlet/2.0.14.Final/undertow-servlet-2.0.14.Final.jar
48
+ - lib/org/jboss/logging/jboss-logging/3.3.2.Final/jboss-logging-3.3.2.Final.jar
49
+ - lib/org/jboss/spec/javax/annotation/jboss-annotations-api_1.2_spec/1.0.2.Final/jboss-annotations-api_1.2_spec-1.0.2.Final.jar
50
+ - lib/org/jboss/spec/javax/servlet/jboss-servlet-api_4.0_spec/1.0.0.Final/jboss-servlet-api_4.0_spec-1.0.0.Final.jar
51
+ - lib/org/jboss/xnio/xnio-api/3.3.8.Final/xnio-api-3.3.8.Final.jar
52
+ - lib/org/jboss/xnio/xnio-nio/3.3.8.Final/xnio-nio-3.3.8.Final.jar
53
+ - lib/org/slf4j/slf4j-api/1.7.0/slf4j-api-1.7.0.jar
54
+ homepage: https://github.com/m0wfo/hystrix_metrics
55
+ licenses:
56
+ - Apache-2.0
57
+ metadata: {}
58
+ post_install_message:
59
+ rdoc_options: []
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ requirements:
73
+ - jar com.netflix.hystrix:hystrix-core, 1.4.10
74
+ - jar com.netflix.hystrix:hystrix-metrics-event-stream, 1.4.10
75
+ - jar io.undertow:undertow-servlet, 2.0.14.Final
76
+ rubyforge_project:
77
+ rubygems_version: 2.5.2.3
78
+ signing_key:
79
+ specification_version: 4
80
+ summary: Easily capture & expose Hystrix metrics in JRuby
81
+ test_files: []