Skip to content

Commit a2b7a7e

Browse files
committed
add comment
1 parent af0b7d1 commit a2b7a7e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

opentelemetry/src/logs/record.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,14 @@ pub trait LogRecord {
6161
}
6262

6363
/// Value types for representing arbitrary values in a log record.
64-
/// Note: The `tracing` and `log` crates only natively support basic types
65-
/// such as `i64`, `f64`, `StringValue`, and `bool`. The boxed types
66-
/// (`Bytes`, `ListAny`, and `Map`) are included to support custom appenders
67-
/// for other logging crates, as required by specifications.
68-
/// These types allow for handling dynamic data structures, so be mindful
69-
/// of the potential performance overhead associated with boxed vectors and maps.
64+
/// Note: The `tracing` and `log` crates only support basic types that can be
65+
/// converted to these core variants: `i64`, `f64`, `StringValue`, and `bool`.
66+
/// Any complex and custom types are suported through their Debug implemetnation,
67+
/// and converted to String. More complex types (`Bytes`, `ListAny`, and `Map`) are
68+
/// included here to meet specification requirements and are available to support
69+
/// custom appenders that may be implemented for other logging crates.
70+
/// These types allow for handling dynamic data structures, so keep in mind the
71+
/// potential performance overhead of using boxed vectors and maps in appenders.
7072
#[derive(Debug, Clone, PartialEq)]
7173
#[non_exhaustive]
7274
pub enum AnyValue {

0 commit comments

Comments
 (0)