Skip to content

Exclude attribute#5332

Open
saurabh-saraswat wants to merge 3 commits into
open-telemetry:mainfrom
saurabh-saraswat:exclude_attribute
Open

Exclude attribute#5332
saurabh-saraswat wants to merge 3 commits into
open-telemetry:mainfrom
saurabh-saraswat:exclude_attribute

Conversation

@saurabh-saraswat

@saurabh-saraswat saurabh-saraswat commented Jun 19, 2026

Copy link
Copy Markdown

Description

Added support for parameter exclude_attribute_keys in View. During consume_measurement removed the attributes which were in exclude_attribute_keys

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • [✔] 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

  • [ ✔ ] Use exclude parameter while creating view like :
    view = View(
    instrument_name="api_counter",
    exclude_attribute_keys={"email", "phone"},
    )

Does This PR Require a Contrib Repo Change?

No

Checklist:

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

@saurabh-saraswat saurabh-saraswat requested a review from a team as a code owner June 19, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant