Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support OTEL_ATTRIBUTE_COUNT_LIMIT #2055

Closed
owais opened this issue Aug 18, 2021 · 3 comments · Fixed by #2139
Closed

Support OTEL_ATTRIBUTE_COUNT_LIMIT #2055

owais opened this issue Aug 18, 2021 · 3 comments · Fixed by #2139

Comments

@owais
Copy link
Contributor

owais commented Aug 18, 2021

Spec mentions global OTEL_ATTRIBUTE_COUNT_LIMIT env var. According tot he spec, any model specific attribute count limit such as span, event or link attribute count limit should fallback to this if the model specific limit is not specified by the user.

@lzchen
Copy link
Contributor

lzchen commented Aug 19, 2021

Perhaps this should be understood as: Even if model specific limit has a default value, if the model specific value is not provided, but OTEL_ATTRIBUTE_COUNT_LIMIT IS provided, it would use the provided global value?

@owais
Copy link
Contributor Author

owais commented Aug 19, 2021

That is how I think it should work as well but spec says if the default is provided then it should use the default instead of the global (OTEL_ATTRIBUTE_COUNT_LIMIT).

From the spec:

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.

@owais
Copy link
Contributor Author

owais commented Aug 19, 2021

I created this issue to clarify or update spec: open-telemetry/opentelemetry-specification#1878

owais added a commit to owais/opentelemetry-python that referenced this issue Sep 23, 2021
owais added a commit to owais/opentelemetry-python that referenced this issue Sep 23, 2021
owais added a commit to owais/opentelemetry-python that referenced this issue Sep 23, 2021
owais added a commit to owais/opentelemetry-python that referenced this issue Sep 23, 2021
owais added a commit to owais/opentelemetry-python that referenced this issue Sep 23, 2021
owais added a commit that referenced this issue Sep 25, 2021
* Add support for OTEL_ATTRIBUTE_COUNT_LIMIT

Fixes #2055
Fixes #2111

* Update opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py

Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>

Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants