grape-appsignal 0.2.2 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b3640f070cbad3d5c18fbd06cd7994528a319fa
4
- data.tar.gz: 350802302c0d2482ab6d420e003147c2b33a6a6d
3
+ metadata.gz: 858d3282919c11fa61d0b327def403754a7f09a3
4
+ data.tar.gz: cc176dc11602e423482b51bd1a4c20d53ee75ee6
5
5
  SHA512:
6
- metadata.gz: 17beb0ede9668ebce99d084551b9d46b43bb6295f0823f469d1cfb8558ad56fe7699b3e32bbe692e223f832ac25ccbcadc8bc5258081210f4f39fdf487483fb8
7
- data.tar.gz: fdbdca8b4ecbdc8bd654c81b96256ac5ba8b24debf5ba8b4103f8a7a9e29407de0e8b14cd014c237fb7cd868f379b2d9c9e2dd5e9cb777798d586d4de109f959
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|
@@ -1,5 +1,5 @@
1
1
  module Appsignal
2
2
  module Grape
3
- VERSION = "0.2.2"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-appsignal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Madsen