grape-appsignal 0.2.2 → 0.3.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 858d3282919c11fa61d0b327def403754a7f09a3
|
4
|
+
data.tar.gz: cc176dc11602e423482b51bd1a4c20d53ee75ee6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1f1c0ece2081125e6e78f82a0ea1ce9e2143743637737017cd5c5c7d2d556081963e94c9de56dd5225936495a19ae0baa031adefa78d084815617c546d9492b
|
7
|
+
data.tar.gz: 3ed231a95f68584ece63014e2f66472e9e8f5e2de6ac8fe689c1715f33702fe43bd89eb62c4d50df7ed9d1fc8b52609790a09fc768626ce47206055b63e941a1
|
@@ -14,10 +14,10 @@ module Appsignal
|
|
14
14
|
|
15
15
|
request_path = env['api.endpoint'].routes.first.route_path[1..-1].sub(/\(\.:format\)\z/, "")
|
16
16
|
|
17
|
-
metric_name = "grape.#{req.request_method}.#{request_path}"
|
17
|
+
metric_name = "process_action.grape.#{req.request_method}.#{request_path}"
|
18
18
|
metric_name = metric_name.gsub(/\/:?/, '.')
|
19
19
|
|
20
|
-
action = "#{env['PATH_INFO']}"
|
20
|
+
action = "GRAPE#{env['PATH_INFO']}"
|
21
21
|
action = action.gsub(/\//, '::')
|
22
22
|
|
23
23
|
ActiveSupport::Notifications.instrument(metric_name, { method: method, path: request_path, action: action, class: "API" } ) do |payload|
|
@@ -37,12 +37,12 @@ describe Appsignal::Grape::Middleware do
|
|
37
37
|
|
38
38
|
it "delivers a payload consistent with the API call."do
|
39
39
|
expect(subject.payload ).to eq(
|
40
|
-
{ method: "GET" , path: "hello/:id", action: "::hello::1337", class: "API"}
|
40
|
+
{ method: "GET" , path: "hello/:id", action: "GRAPE::hello::1337", class: "API"}
|
41
41
|
)
|
42
42
|
end
|
43
43
|
|
44
44
|
it "names the payload consistent with the API call."do
|
45
|
-
expect(subject.name ).to eq("grape.GET.hello.id")
|
45
|
+
expect(subject.name ).to eq("process_action.grape.GET.hello.id")
|
46
46
|
end
|
47
47
|
|
48
48
|
context "verify the api request" do
|
@@ -70,12 +70,12 @@ describe Appsignal::Grape::Middleware do
|
|
70
70
|
|
71
71
|
it "delivers a payload consistent with the API call."do
|
72
72
|
expect(subject.payload ).to eq(
|
73
|
-
{ method: "GET" , path: "api/:version/hello/:name", action: "::api::v1::hello::mark", class: "API"}
|
73
|
+
{ method: "GET" , path: "api/:version/hello/:name", action: "GRAPE::api::v1::hello::mark", class: "API"}
|
74
74
|
)
|
75
75
|
end
|
76
76
|
|
77
77
|
it "names the payload consistent with the API call."do
|
78
|
-
expect(subject.name ).to eq("grape.GET.api.version.hello.name")
|
78
|
+
expect(subject.name ).to eq("process_action.grape.GET.api.version.hello.name")
|
79
79
|
end
|
80
80
|
|
81
81
|
context "verify the api request" do
|