Skip to content

Commit 4ff6298

Browse files
committed
feat: add size for TracesAndStats
1 parent cfe57d2 commit 4ff6298

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
9+
### Fix
10+
11+
- Do not send Traces over than 4mb
912

1013
## [1.0.1]
1114

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ mod runtime;
3535
extern crate tracing;
3636
use packages::uname::Uname;
3737
use std::collections::HashMap;
38+
use std::mem::size_of;
3839
use std::sync::Arc;
3940

4041
use async_graphql::QueryPathSegment;
@@ -211,6 +212,9 @@ impl ApolloTracing {
211212
} {
212213
trace!(target: TARGET_LOG, message = "Trace registered", trace = ?trace, name = ?name);
213214

215+
let size = size_of::<TracesAndStats>();
216+
info!(target: "size-ext", size = ?size);
217+
214218
// We bufferize traces and create a Full Report every X
215219
// traces
216220
match hashmap.get_mut(&name) {

0 commit comments

Comments
 (0)