|
19 | 19 |
|
20 | 20 | expect_metric( |
21 | 21 | tags: a_hash_including( |
22 | | - location: "MetricsController#index", |
23 | | - hook: "sql", |
24 | | - name: "Metric Create", |
25 | | - class_name: "Metric", |
26 | | - operation: "INSERT", |
27 | | - additional_tag: :value, |
28 | | - server: Socket.gethostname, |
29 | | - app_name: :app_name, |
30 | | - tags_middleware: :tags_middleware |
| 22 | + hook: "sql", |
| 23 | + name: "Metric Create", |
| 24 | + class_name: "Metric", |
| 25 | + operation: "INSERT" |
31 | 26 | ), |
32 | 27 | values: a_hash_including( |
33 | | - additional_value: :value, |
34 | | - request_id: :request_id, |
35 | | - value: be_between(1, 500), |
36 | | - sql: "INSERT INTO \"metrics\" (\"name\", \"created_at\", \"updated_at\") VALUES (xxx)" |
| 28 | + value: be_between(1, 500), |
| 29 | + sql: "INSERT INTO \"metrics\" (\"name\", \"created_at\", \"updated_at\") VALUES (xxx)" |
37 | 30 | ) |
38 | 31 | ) |
39 | 32 | end |
|
45 | 38 |
|
46 | 39 | expect_metric( |
47 | 40 | tags: a_hash_including( |
48 | | - location: "MetricsController#index", |
49 | | - hook: "sql", |
50 | | - name: "SQL", |
51 | | - class_name: "SQL", |
52 | | - operation: "INSERT", |
53 | | - additional_tag: :value, |
54 | | - server: Socket.gethostname, |
55 | | - app_name: :app_name, |
56 | | - tags_middleware: :tags_middleware |
| 41 | + hook: "sql", |
| 42 | + name: "SQL", |
| 43 | + class_name: "SQL", |
| 44 | + operation: "INSERT" |
57 | 45 | ), |
58 | 46 | values: a_hash_including( |
59 | | - additional_value: :value, |
60 | | - request_id: :request_id, |
61 | | - value: be_between(1, 500), |
62 | | - sql: "INSERT INTO \"metrics\" (\"name\", \"created_at\", \"updated_at\") VALUES (xxx)" |
| 47 | + value: be_between(1, 500), |
| 48 | + sql: "INSERT INTO \"metrics\" (\"name\", \"created_at\", \"updated_at\") VALUES (xxx)" |
63 | 49 | ) |
64 | 50 | ) |
65 | 51 | end |
|
71 | 57 |
|
72 | 58 | expect_metric( |
73 | 59 | tags: a_hash_including( |
74 | | - location: "MetricsController#index", |
75 | 60 | hook: "sql" |
76 | 61 | ), |
77 | 62 | timestamp: 1_514_797_200 |
|
85 | 70 |
|
86 | 71 | expect_no_metric( |
87 | 72 | tags: a_hash_including( |
88 | | - location: "MetricsController#index", |
89 | 73 | hook: "sql" |
90 | 74 | ) |
91 | 75 | ) |
|
0 commit comments