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(insights): add use eap hook #88917

Merged
merged 2 commits into from
Apr 7, 2025
Merged

Conversation

DominikB2014
Copy link
Contributor

@DominikB2014 DominikB2014 commented Apr 7, 2025

Adds a useEap hook to insights, this will make the migration to eap easier is a few ways

  1. When we release eap, we can just update useEap to return true when the feature is enabled rather then check the query params.
  2. I'm noticing we have to make the eap check in more places then i originally thought, so its better to have a single hook to handle it then checking location.query.useEap everytime.

@DominikB2014 DominikB2014 requested a review from a team as a code owner April 7, 2025 15:28
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 7, 2025
Copy link

codecov bot commented Apr 7, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
10124 1 10123 5
View the top 1 failed test(s) by shortest run time
useSpanSamples queries for current selection
Stack Traces | 0.019s run time
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

Expected: ".../organizations/org-slug/spans-samples/", ObjectContaining {"method": "GET", "query": {"additionalFields": ["transaction.id", "span_id"], "environment": ["prod"], "firstBound": 300, "lowerBound": 100, "project": [], "query": "span.group:221aa7ebd216 release:0.0.1", "referrer": "api-spec", "secondBound": 600, "statsPeriod": "10d", "upperBound": 900, "utc": false}}
Received: ".../organizations/org-slug/spans-samples/", {"data": undefined, "error": [Function error], "headers": undefined, "host": undefined, "method": "GET", "query": {"additionalFields": ["transaction.id", "span_id"], "environment": ["prod"], "firstBound": 300, "lowerBound": 100, "project": [], "query": "span.group:221aa7ebd216 release:0.0.1", "referrer": "api-spec", "secondBound": 600, "statsPeriod": "10d", "upperBound": 900, "useRpc": false, "utc": false}, "success": [Function success]}

Number of calls: 1
    at Object.<anonymous> (.../http/queries/useSpanSamples.spec.tsx:126:21)
    at Promise.then.completed (.../jest-circus/build/utils.js:298:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (.../jest-circus/build/utils.js:231:10)
    at _callCircusTest (.../jest-circus/build/run.js:316:40)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at _runTest (.../jest-circus/build/run.js:252:3)
    at _runTestsForDescribeBlock (.../jest-circus/build/run.js:126:9)
    at _runTestsForDescribeBlock (.../jest-circus/build/run.js:121:9)
    at run (.../jest-circus/build/run.js:71:3)
    at runAndTransformResultsToJestFormat (.../build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
    at jestAdapter (.../build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (.../jest-runner/build/runTest.js:367:16)
    at runTest (.../jest-runner/build/runTest.js:444:34)
    at Object.worker (.../jest-runner/build/testWorker.js:106:12)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@DominikB2014 DominikB2014 merged commit 7882b03 into master Apr 7, 2025
42 checks passed
@DominikB2014 DominikB2014 deleted the DominikB2014/add-use-eap-hook branch April 7, 2025 18:46
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.

2 participants