glass_octopus 2.0.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/glass_octopus.gemspec +3 -3
- data/lib/glass_octopus/middleware/common_logger.rb +3 -3
- data/lib/glass_octopus/middleware/new_relic.rb +6 -1
- data/lib/glass_octopus/version.rb +1 -1
- metadata +14 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82416096fcfae0755ce9d9c9e0a71521be8bc5935d693c1861f85357dd771d5a
|
4
|
+
data.tar.gz: 216122bcad01fb00f76892b55da5415a014088c0658cc481565cf26cea62adea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8403ac42ffb41b0f3fa2c037b590ebf06ac7b2cf3791c74975663ce1c0e9c3f50f2814fc7de443c30201945cab1d247b3d235386ad8ab10cc0da54ecbc5ad50d
|
7
|
+
data.tar.gz: 0fc5eb1f1047eb08262dd833c72e29a79457196d87149ed653d42e0140ccb27ac1bf990a2c56924a275984cb9fc6aff8a7ab7f0764fbfdb14ded39a588a6eeba
|
data/.gitignore
CHANGED
data/glass_octopus.gemspec
CHANGED
@@ -29,8 +29,8 @@ EOF
|
|
29
29
|
spec.add_development_dependency "guard", "~> 2.14"
|
30
30
|
spec.add_development_dependency "guard-minitest", "~> 2.4"
|
31
31
|
spec.add_development_dependency "terminal-notifier-guard", "~> 1.7"
|
32
|
-
spec.add_development_dependency "ruby-kafka", "~>
|
33
|
-
spec.add_development_dependency "avro_turf", "~>
|
34
|
-
spec.add_development_dependency "sinatra", "
|
32
|
+
spec.add_development_dependency "ruby-kafka", "~> 1.0"
|
33
|
+
spec.add_development_dependency "avro_turf", "~> 1.0"
|
34
|
+
spec.add_development_dependency "sinatra", ">= 2.2.0"
|
35
35
|
spec.add_development_dependency "webmock", "~> 3.3.0"
|
36
36
|
end
|
@@ -3,7 +3,7 @@ require "benchmark"
|
|
3
3
|
module GlassOctopus
|
4
4
|
module Middleware
|
5
5
|
class CommonLogger
|
6
|
-
FORMAT = "Processed message. topic=%s
|
6
|
+
FORMAT = "Processed message. topic=%s partition=%d offset=%d key=%s runtime=%fms".freeze
|
7
7
|
|
8
8
|
def initialize(app, logger=nil, log_level=:info)
|
9
9
|
@app = app
|
@@ -27,8 +27,8 @@ module GlassOctopus
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def format_message(ctx, runtime)
|
30
|
-
format(FORMAT,
|
31
|
-
|
30
|
+
format(FORMAT, ctx.message.topic,
|
31
|
+
ctx.message.partition, ctx.message.offset, ctx.message.key, runtime)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -20,7 +20,12 @@ module GlassOctopus
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def call(ctx)
|
23
|
-
|
23
|
+
options = @options.merge(params: {
|
24
|
+
topic: ctx.message.topic,
|
25
|
+
partition: ctx.message.partition,
|
26
|
+
offset: ctx.message.offset,
|
27
|
+
})
|
28
|
+
perform_action_with_newrelic_trace(options) do
|
24
29
|
@app.call(ctx)
|
25
30
|
end
|
26
31
|
rescue Exception => ex
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glass_octopus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tamás Michelberger
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -100,42 +100,42 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: '1.0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: '1.0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: avro_turf
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: '1.0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: '1.0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: sinatra
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 2.
|
131
|
+
version: 2.2.0
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - "
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 2.
|
138
|
+
version: 2.2.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: webmock
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,7 +196,7 @@ homepage: https://github.com/sspinc/glass-octopus
|
|
196
196
|
licenses:
|
197
197
|
- MIT
|
198
198
|
metadata: {}
|
199
|
-
post_install_message:
|
199
|
+
post_install_message:
|
200
200
|
rdoc_options: []
|
201
201
|
require_paths:
|
202
202
|
- lib
|
@@ -211,9 +211,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
211
211
|
- !ruby/object:Gem::Version
|
212
212
|
version: '0'
|
213
213
|
requirements: []
|
214
|
-
|
215
|
-
|
216
|
-
signing_key:
|
214
|
+
rubygems_version: 3.1.6
|
215
|
+
signing_key:
|
217
216
|
specification_version: 4
|
218
217
|
summary: A Kafka consumer framework. Like Rack but for Kafka.
|
219
218
|
test_files: []
|