Open pellared opened 6 months ago
PTAL @open-telemetry/specs-logs-approvers
An important scaling factor for attributes is that they are commonly used by backends for indexing or other optimizations. Do we expect the body to be treated similarly by backends? If not, we probably don't need to apply the same strict limits, though other limits may be necessary.
Related, how would these limits apply to a non-structured body?
We might not want the limits by default, but I think its reasonable to have them available. Currently, its not possible to configure any limits for the body, and its cumbersome to do in the collector (see this slack convo - it previously wasn't possible).
Related, how would these limits apply to a non-structured body?
The key question is how do attribute limits work on an AnyValue type. Note this will be relevant for events as well.
The common attribute limits provide configuration for the max allowed attribute count, and the maximum attribute length limit.
AnyValue is a recursive data structure, and the common attribute limits were designed for a flat list of key value pairs. Here's how we might apply the rules to AnyValue:
AttributeValueLengthLimit
AttributeCountLimit
, apply limits recursively to each AnyValue valueNote that the current rules don't limit the number of entries in an array, which is odd. I've carried that rule forward into the proposal above, but perhaps there should be a third property which limits the number of array entries.
@jack-berg, I do not think that it would be good to use AttributeValueLengthLimit
and AttributeCountLimit
for Body
. Reasons:
For now, (as a baby-step) I simply propose to clarify in the specification that the attribute limits do not apply on the Body.
Side note: SeverityText
has also no limits.
@pellared @jack-berg please take a look, is this still needed? how can we move this forward?
Hard for me to evaluate as Logs are still Beta in OTel Go and I personally, I have not feedback on how much this feature is needed. I think we can still leave a "community-feedback".
What are you trying to achieve?
According to the docs there are only limits for the log attributes. See: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#logrecord-limits
From https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute-limits:
The same problem is applicable for log record body value.
Is it intentional or an oversight? Should the limits be also applied for body value (even though that the whole naming is around attributes)? Should we have different limits for log record value?