File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -241,8 +241,23 @@ unsafe impl Send for OciConnection {}
241
241
242
242
impl SimpleConnection for OciConnection {
243
243
fn batch_execute ( & mut self , query : & str ) -> QueryResult < ( ) > {
244
- self . raw . execute ( query, & [ ] ) . map_err ( ErrorHelper :: from) ?;
245
- Ok ( ( ) )
244
+ self . instrumentation
245
+ . on_connection_event ( InstrumentationEvent :: start_query (
246
+ & diesel:: connection:: StrQueryHelper :: new ( query) ,
247
+ ) ) ;
248
+ let r = self
249
+ . raw
250
+ . execute ( query, & [ ] )
251
+ . map_err ( ErrorHelper :: from)
252
+ . map_err ( Into :: into)
253
+ . map ( |_| ( ) ) ;
254
+ self . instrumentation
255
+ . on_connection_event ( InstrumentationEvent :: finish_query (
256
+ & diesel:: connection:: StrQueryHelper :: new ( query) ,
257
+ r. as_ref ( ) . err ( ) ,
258
+ ) ) ;
259
+
260
+ r
246
261
}
247
262
}
248
263
You can’t perform that action at this time.
0 commit comments