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(eap): Adds enabled prop to SpanTagsProvider #81188

Merged
merged 5 commits into from
Nov 22, 2024

Conversation

edwardgou-sentry
Copy link
Contributor

Adds an enabled prop to SpanTagsProvider to control fetching tags

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 22, 2024
@edwardgou-sentry edwardgou-sentry marked this pull request as ready for review November 22, 2024 17:13
Copy link

codecov bot commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 55.00000% with 9 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...p/views/alerts/rules/metric/ruleConditionsForm.tsx 50.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #81188      +/-   ##
==========================================
+ Coverage   80.33%   80.36%   +0.02%     
==========================================
  Files        7223     7217       -6     
  Lines      320122   320031      -91     
  Branches    20779    20775       -4     
==========================================
+ Hits       257174   257194      +20     
+ Misses      62553    62443     -110     
+ Partials      395      394       -1     

const {data: indexedTags} = useSpanFieldCustomTags({
enabled: dataset === DiscoverDatasets.SPANS_INDEXED,
enabled: dataset === DiscoverDatasets.SPANS_INDEXED && enabled,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: if you're concerned about undefined being passed through here unexpected, you could always rewrite it as enabled ? dataset === DiscoverDatasets.SPAN_INDEXED : false and so on

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 going to leave as is for now, since undefined is a valid default value for useSpanFieldCustomTags if we want. But also enabled is required now anyways so we won't run into this scenario.

Copy link

codecov bot commented Nov 22, 2024

Bundle Report

Changes will increase total bundle size by 16.32kB (0.05%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
app-webpack-bundle-array-push 31.98MB 16.32kB (0.05%) ⬆️

@edwardgou-sentry edwardgou-sentry merged commit 327f975 into master Nov 22, 2024
43 of 44 checks passed
@edwardgou-sentry edwardgou-sentry deleted the egou/feat/span-tags-provider-enabled-option branch November 22, 2024 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants