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

Ns 3201 dropped attributes count in exporters #2

Open
wants to merge 43 commits into
base: main
Choose a base branch
from

Conversation

nstawski
Copy link
Owner

@nstawski nstawski commented Oct 12, 2023

Description

This pull request adds the limit on the metrics to prevent the unintended cardinality explosion. For more information, see open-telemetry#2700
New tests are added for this functionality. Additionally, I moved the InMemoryMetricExporter so it could be used for more tests, and added tests for it.

Fixes open-telemetry#2700

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

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

  • Added opentelemetry-sdk/tests/metrics/test_in_memory_metric_exporter.py
  • Added opentelemetry-sdk/tests/metrics/test_metric_cardinality_limit.py
  • Updated ns-3201-dropped-attributes-count-in-exporters to use the moved InMemoryMetricExporter

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

  • 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

  • Major changes to project information, such as in:

    • README.md
    • CONTRIBUTING.md
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added

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.

Basic protection against the unintended cardinality explosion or similar problems
1 participant