kumonos 0.7.0 → 0.8.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 +4 -4
- data/.travis.yml +2 -0
- data/Rakefile +9 -0
- data/exe/kumonos-relay +20 -5
- data/lib/kumonos/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8bce93ae7e9f596bc9be6c4095b9e743536ff10
|
4
|
+
data.tar.gz: e3d0d47a86b65f3434e5b10757e543105ead5385
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc1a11c5f9762e9eb7463447ed8c4b4b30127c9185e5cad69ba5fe5d73839a67a4d54d8729511b66d68a1f34026261eaf84b74ba9c40bbda9309bb1836ad4324
|
7
|
+
data.tar.gz: 2384a77f383f890ffdc67c1f1c8a24ac6b36303a4a50a242e87c4251f7b9011b47ee91c5a8510df55312038b31bcd9affd584b2d6311d3e8e0236a6dd9f7a0ab
|
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
@@ -15,5 +15,14 @@ task :integration_test do
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
+
desc 'Run full integration test'
|
19
|
+
task :full_integration_test do
|
20
|
+
ENV['TEST_WITH_RELAY'] = '1'
|
21
|
+
Rake::Task['integration_test'].invoke
|
22
|
+
end
|
23
|
+
|
18
24
|
desc 'Run all tests'
|
19
25
|
task all: %i[spec rubocop integration_test]
|
26
|
+
|
27
|
+
desc 'Run all tests including slow ones'
|
28
|
+
task full: %i[spec rubocop full_integration_test]
|
data/exe/kumonos-relay
CHANGED
@@ -10,18 +10,18 @@ class StatConvertor
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def call(line)
|
13
|
-
convert_cluster(add_default_tag(line)) + "\n"
|
13
|
+
convert_listener(convert_cluster(add_default_tag(line))) + "\n"
|
14
14
|
end
|
15
15
|
|
16
16
|
private
|
17
17
|
|
18
|
-
# envoy.cluster.ab-testing.external.upstream_rq_200
|
19
|
-
|
18
|
+
# envoy.cluster.ab-testing.external.upstream_rq_200:1|c
|
19
|
+
CLUSTER_PATTERN = /\Aenvoy\.cluster\.([^.]+)\./
|
20
20
|
def convert_cluster(line)
|
21
|
-
if line.match(
|
21
|
+
if line.match(CLUSTER_PATTERN)
|
22
22
|
name = Regexp.last_match(1)
|
23
23
|
[
|
24
|
-
line.gsub(
|
24
|
+
line.gsub(CLUSTER_PATTERN, 'envoy.cluster.'),
|
25
25
|
",cluster:#{name}"
|
26
26
|
].join
|
27
27
|
else
|
@@ -29,6 +29,21 @@ class StatConvertor
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
+
# XXX: ipv4 only
|
33
|
+
# envoy.listener.0.0.0.0_9211.http.ingress_http.downstream_rq_5xx:0|c
|
34
|
+
LISTENER_PATTERN = /\Aenvoy\.listener\.(\d+\.\d+\.\d+.\d+_\d+)./
|
35
|
+
def convert_listener(line)
|
36
|
+
if line.match(LISTENER_PATTERN)
|
37
|
+
listener = Regexp.last_match(1)
|
38
|
+
[
|
39
|
+
line.gsub(LISTENER_PATTERN, 'envoy.listener.'),
|
40
|
+
",listener:#{listener}"
|
41
|
+
].join
|
42
|
+
else
|
43
|
+
line
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
32
47
|
def add_default_tag(line)
|
33
48
|
[
|
34
49
|
"#{line.chomp}|#",
|
data/lib/kumonos/version.rb
CHANGED