File tree Expand file tree Collapse file tree 1 file changed +6
-27
lines changed
instrumentation/opentelemetry-instrumentation-celery/tests Expand file tree Collapse file tree 1 file changed +6
-27
lines changed Original file line number Diff line number Diff line change @@ -71,43 +71,22 @@ def test_basic_metric(self):
7171 def test_metric_uninstrument (self ):
7272 CeleryInstrumentor ().instrument ()
7373
74- self .get_metrics ()
74+ metrics = self .get_metrics ()
7575 self .assertEqual (
76- (
77- self .memory_metrics_reader .get_metrics_data ()
78- .resource_metrics [0 ]
79- .scope_metrics [0 ]
80- .metrics [0 ]
81- .data .data_points [0 ]
82- .bucket_counts [1 ]
83- ),
76+ metrics [0 ].data .data_points [0 ].bucket_counts [1 ],
8477 1 ,
8578 )
8679
87- self .get_metrics ()
80+ metrics = self .get_metrics ()
8881 self .assertEqual (
89- (
90- self .memory_metrics_reader .get_metrics_data ()
91- .resource_metrics [0 ]
92- .scope_metrics [0 ]
93- .metrics [0 ]
94- .data .data_points [0 ]
95- .bucket_counts [1 ]
96- ),
82+ metrics [0 ].data .data_points [0 ].bucket_counts [1 ],
9783 2 ,
9884 )
9985
10086 CeleryInstrumentor ().uninstrument ()
10187
102- self .get_metrics ()
88+ metrics = self .get_metrics ()
10389 self .assertEqual (
104- (
105- self .memory_metrics_reader .get_metrics_data ()
106- .resource_metrics [0 ]
107- .scope_metrics [0 ]
108- .metrics [0 ]
109- .data .data_points [0 ]
110- .bucket_counts [1 ]
111- ),
90+ metrics [0 ].data .data_points [0 ].bucket_counts [1 ],
11291 2 ,
11392 )
You can’t perform that action at this time.
0 commit comments