You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have two types of limits today. Global limits and model specific limits. Here is what the spec has to say about the case where both global and model specific versions of the same limit are defined:
An SDK MAY implement model-specific limits, for example SpanAttributeCountLimit. If both a general and a model-specific limit are implemented, then the SDK MUST first attempt to use the model-specific limit, if it isn't set and doesn't have a default, then the SDK MUST attempt to use the general limit.
Model specific limits OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT and OTEL_LINK_ATTRIBUTE_COUNT_LIMIT all have default values of 128. This means if an SDK implements the model specific limits thenOTEL_ATTRIBUTE_COUNT_LIMIT will always be a noop. I think this can be counter intuitive to users. As a user, if I don't specify any model specific limit and only a single global limit, I'd expect all models to respect the global limit. This would also allow users to specify common limits using the global limit option and then override just one of the model specific limits. For example, if I want to limit link attribute count to 16 but everything else to 32, today I have to specify the following env vars:
Specifying the global OTEL_ATTRIBUTE_COUNT_LIMIT would have no effect here as all of the above have default values (128) which would be used in case these env vars were not specified.
I think it'd be far more intuitive if users could set the following values to achieve the same effect.
What are you trying to achieve?
We have two types of limits today. Global limits and model specific limits. Here is what the spec has to say about the case where both global and model specific versions of the same limit are defined:
List of global limits and model specific limits.
Model specific limits
OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT
,OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT
andOTEL_LINK_ATTRIBUTE_COUNT_LIMIT
all have default values of 128. This means if an SDK implements the model specific limits thenOTEL_ATTRIBUTE_COUNT_LIMIT
will always be a noop. I think this can be counter intuitive to users. As a user, if I don't specify any model specific limit and only a single global limit, I'd expect all models to respect the global limit. This would also allow users to specify common limits using the global limit option and then override just one of the model specific limits. For example, if I want to limit link attribute count to 16 but everything else to 32, today I have to specify the following env vars:Specifying the global OTEL_ATTRIBUTE_COUNT_LIMIT would have no effect here as all of the above have default values (128) which would be used in case these env vars were not specified.
I think it'd be far more intuitive if users could set the following values to achieve the same effect.
I propose the SDK should use the following order to load model specific limits:
The text was updated successfully, but these errors were encountered: