File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ mod runtime;
3535extern crate tracing;
3636use packages:: uname:: Uname ;
3737use std:: collections:: HashMap ;
38- use std:: mem:: size_of;
38+ use std:: mem:: { size_of, size_of_val } ;
3939use std:: sync:: Arc ;
4040
4141use async_graphql:: QueryPathSegment ;
@@ -225,6 +225,7 @@ impl ApolloTracing {
225225 let mut trace_and_stats = TracesAndStats :: new ( ) ;
226226 trace_and_stats. mut_trace ( ) . push ( trace) ;
227227
228+ info ! ( target: "size-ext-2" , size = ?size_of_val( & trace_and_stats) ) ;
228229 hashmap. insert ( name, trace_and_stats) ;
229230 }
230231 }
@@ -254,6 +255,17 @@ impl ApolloTracing {
254255 report. set_traces_per_query ( hashmap_to_send) ;
255256 report. set_header ( ( * header_tokio) . clone ( ) ) ;
256257
258+ let test = match protobuf:: Message :: write_to_bytes ( & report) {
259+ Ok ( message) => {
260+ info ! ( target: "size-ext" , size = ?size_of_val( & message) ) ;
261+ } ,
262+ Err ( err) => {
263+ span_batch. in_scope ( || {
264+ error ! ( target: TARGET_LOG , error = ?err, report = ?report) ;
265+ } ) ;
266+ }
267+ } ;
268+
257269 let msg = match protobuf:: Message :: write_to_bytes ( & report) {
258270 Ok ( message) => message,
259271 Err ( err) => {
You can’t perform that action at this time.
0 commit comments