|
15 | 15 | )
|
16 | 16 | end
|
17 | 17 | let(:metadata) { Temporal::Metadata.generate_activity_metadata(task, namespace) }
|
| 18 | + let(:workflow_name) { task.workflow_type.name } |
18 | 19 | let(:activity_name) { 'TestActivity' }
|
19 | 20 | let(:connection) { instance_double('Temporal::Connection::GRPC') }
|
20 | 21 | let(:middleware_chain) { Temporal::Middleware::Chain.new }
|
|
125 | 126 |
|
126 | 127 | expect(Temporal.metrics)
|
127 | 128 | .to have_received(:timing)
|
128 |
| - .with('activity_task.queue_time', an_instance_of(Integer), activity: activity_name, namespace: namespace) |
| 129 | + .with('activity_task.queue_time', an_instance_of(Integer), activity: activity_name, namespace: namespace, workflow: workflow_name) |
129 | 130 | end
|
130 | 131 |
|
131 | 132 | it 'sends latency metric' do
|
132 | 133 | subject.process
|
133 | 134 |
|
134 | 135 | expect(Temporal.metrics)
|
135 | 136 | .to have_received(:timing)
|
136 |
| - .with('activity_task.latency', an_instance_of(Integer), activity: activity_name, namespace: namespace) |
| 137 | + .with('activity_task.latency', an_instance_of(Integer), activity: activity_name, namespace: namespace, workflow: workflow_name) |
137 | 138 | end
|
138 | 139 |
|
139 | 140 | context 'with async activity' do
|
|
203 | 204 |
|
204 | 205 | expect(Temporal.metrics)
|
205 | 206 | .to have_received(:timing)
|
206 |
| - .with('activity_task.queue_time', an_instance_of(Integer), activity: activity_name, namespace: namespace) |
| 207 | + .with('activity_task.queue_time', an_instance_of(Integer), activity: activity_name, namespace: namespace, workflow: workflow_name) |
207 | 208 | end
|
208 | 209 |
|
209 | 210 | it 'sends latency metric' do
|
210 | 211 | subject.process
|
211 | 212 |
|
212 | 213 | expect(Temporal.metrics)
|
213 | 214 | .to have_received(:timing)
|
214 |
| - .with('activity_task.latency', an_instance_of(Integer), activity: activity_name, namespace: namespace) |
| 215 | + .with('activity_task.latency', an_instance_of(Integer), activity: activity_name, namespace: namespace, workflow: workflow_name) |
215 | 216 | end
|
216 | 217 |
|
217 | 218 | context 'with ScriptError exception' do
|
|
0 commit comments