-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Networking & Observability
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Sometimes we want to fill out attributes for logging without inlining them into LOGV2 macro.
When we append a Date_t attribute, it is captured as CustomAttributeValue.
However, when CustomAttributeValue is created, it captures the value to be logged via reference:
So if we want to log a Date_t object, we must ensure that the same instance of Date_t is alive between adding it to DynamicAttributes and actually logging those DynamicAttributes via LOGV2 macro.
We should consider capturing small trivially-copyable objects by-value in CustomAttributeValue.