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

feat(sdk-metrics)!: replace attributeKeys with custom processors option #4532

Open
wants to merge 2 commits into
base: next
Choose a base branch
from

Conversation

pichlermarc
Copy link
Member

@pichlermarc pichlermarc commented Mar 8, 2024

Which problem is this PR solving?

See #4109

Drops the attributeKeys view option that implemented an "Allow List" for attribute keys.

Adds

  • createAllowListAttributesProcessor(), which replicates the functionality previously provided by attributeKeys
  • createDenyListAttributesProcessor(), which allows for dropping one or more attributes when added to a View, this can be useful for turning off attributes that are not needed or too high cardinality.
  • Adds IAttributesProcessor for custom attributes processors

Fixes #4109

Type of change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

  • Unit tests

@pichlermarc pichlermarc changed the title feat(sdk-metrics)!: replace attributeKeys with an option to add custom processors feat(sdk-metrics)!: replace attributeKeys with custom processors option Mar 8, 2024
Copy link

codecov bot commented Mar 8, 2024

Codecov Report

Merging #4532 (9a662b6) into next (6804066) will increase coverage by 0.01%.
Report is 1 commits behind head on next.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #4532      +/-   ##
==========================================
+ Coverage   92.87%   92.89%   +0.01%     
==========================================
  Files         328      328              
  Lines        9466     9484      +18     
  Branches     2023     2023              
==========================================
+ Hits         8792     8810      +18     
  Misses        674      674              
Files Coverage Δ
...ckages/sdk-metrics/src/state/AsyncMetricStorage.ts 100.00% <100.00%> (ø)
packages/sdk-metrics/src/state/MeterSharedState.ts 96.61% <100.00%> (ø)
...ackages/sdk-metrics/src/state/SyncMetricStorage.ts 100.00% <100.00%> (ø)
...ckages/sdk-metrics/src/view/AttributesProcessor.ts 100.00% <100.00%> (ø)
packages/sdk-metrics/src/view/View.ts 100.00% <100.00%> (ø)

@pichlermarc pichlermarc force-pushed the feat/custom-attribute-processors branch 4 times, most recently from 9dcb15f to 2342658 Compare March 8, 2024 12:06
@pichlermarc pichlermarc force-pushed the feat/custom-attribute-processors branch from 2342658 to a279256 Compare March 8, 2024 12:13
@pichlermarc pichlermarc added pkg:sdk-metrics target:next-major-release This PR targets the next major release (`next` branch) labels Mar 8, 2024
@pichlermarc pichlermarc marked this pull request as ready for review March 8, 2024 12:18
@pichlermarc pichlermarc requested a review from a team as a code owner March 8, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:sdk-metrics target:next-major-release This PR targets the next major release (`next` branch)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants