We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31a3491 commit c8d86ecCopy full SHA for c8d86ec
opentelemetry-sdk/src/logs/log_emitter.rs
@@ -40,6 +40,9 @@ pub struct LoggerProvider {
40
41
/// Default logger name if empty string is provided.
42
const DEFAULT_COMPONENT_NAME: &str = "rust.opentelemetry.io/sdk/logger";
43
+// According to a Go-specific study mentioned on https://go.dev/blog/slog,
44
+// up to 5 attributes is the most common case. We have chosen 8 as the default
45
+// capacity for attributes to avoid reallocation in common scenarios.
46
const PREALLOCATED_ATTRIBUTE_CAPACITY: usize = 8;
47
48
impl opentelemetry::logs::LoggerProvider for LoggerProvider {
0 commit comments