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

add support for 0 global attribute limit and tests #2398

Merged
merged 3 commits into from
Jan 21, 2022

Conversation

Arnatious
Copy link
Contributor

Description

SpanLimits now properly supports a global attribute limit of 0. Previously it would treat 0 the same as None, and cause a cascade of limits to default.

Added tests to verify this behavior (test_span_zero_global_limit, test_span_zero_global_nonzero_model, test_span_zero_global_unset_model).

Fixes #2392

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • tox -e py38-opentelemetry-sdk -- trace/test_trace.py::TestSpanLimits

Does This PR Require a Contrib Repo Change?

Answer the following question based on these examples of changes that would require a Contrib Repo Change:

  • The OTel specification has changed which prompted this PR to update the method interfaces of opentelemetry-api/ or opentelemetry-sdk/
  • The method interfaces of test/util have changed: No
  • Scripts in scripts/ that were copied over to the Contrib repo have changed
  • Configuration files that were copied over to the Contrib repo have changed (when consistency between repositories is applicable) such as in
    • pyproject.toml
    • isort.cfg
    • .flake8
  • When a new .github/CODEOWNER is added: No
  • Major changes to project information, such as in:
    • README.md
    • CONTRIBUTING.md
  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@Arnatious Arnatious requested a review from a team January 21, 2022 05:04
@owais owais enabled auto-merge (squash) January 21, 2022 18:37
@owais owais merged commit 60a3b52 into open-telemetry:main Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Global span limit of 0 does not work
3 participants