Skip to content

Conversation

@colin-sentry
Copy link
Contributor

@colin-sentry colin-sentry commented Mar 21, 2025

On some pages (like replay) - the spans waterfall is embedded without the context provider, which would give this error:

Error: useContext for "LogsPageDataContext" must be inside a Provider with a value

This hoists out the logic for hiding the waterfall into a property.

@colin-sentry colin-sentry requested review from a team and Abdkhan14 March 21, 2025 22:37
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 21, 2025
@codecov
Copy link

codecov bot commented Mar 21, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
9984 1 9983 12
View the top 1 failed test(s) by shortest run time
useReplayData should concat N segment responses and pass them into ReplayReader
Stack Traces | 0.25s run time
Error: expect(received).toStrictEqual(expected) // deep equality

- Expected  - 65
+ Received  +  5

@@ -1,72 +1,12 @@
- ObjectContaining {
-   "attachments": Array [
-     Object {
-       "data": Object {},
-       "timestamp": 1672592400000,
-       "type": 0,
-     },
  Object {
-       "data": Object {},
-       "timestamp": 1672592400000,
-       "type": 1,
-     },
-     Object {
-       "data": Object {
-         "height": 600,
-         "href": "http://localhost/",
-         "width": 800,
-       },
-       "timestamp": 1672592400000,
-       "type": 4,
-     },
-     Object {
-       "data": Object {
-         "metric": undefined,
-         "payload": Object {
-           "category": "console",
-           "data": Object {
-             "logger": "unknown",
-           },
-           "level": "fatal",
-           "message": "Hello World",
-           "timestamp": 1672592400,
-           "type": "debug",
-         },
-         "tag": "breadcrumb",
-       },
-       "timestamp": 1672592400000,
-       "type": 5,
-     },
-     Object {
-       "data": Object {
-         "payload": Object {
-           "data": Object {
-             "decodedBodySize": 1712,
-             "domComplete": 10000,
-             "domContentLoadedEventEnd": 9952,
-             "domContentLoadedEventStart": 9950,
-             "domInteractive": 9800,
-             "duration": 10000,
-             "encodedBodySize": 849,
-             "loadEventEnd": 10000,
-             "loadEventStart": 10000,
-             "redirectCount": 0,
-             "size": 1149,
-           },
-           "description": "",
-           "endTimestamp": 1672592410,
-           "op": "navigation.navigate",
-           "startTimestamp": 1672592400,
-         },
-         "tag": "performanceSpan",
-       },
-       "timestamp": 1672592400000,
-       "type": 5,
-     },
-   ],
+   "attachments": Array [],
    "errors": Array [],
+   "fetchError": undefined,
+   "fetching": true,
+   "onRetry": [Function anonymous],
+   "projectSlug": "project-slug",
    "replayRecord": Object {
      "activity": 0,
      "browser": Object {
        "name": "Other",
        "version": "",
    at Object.<anonymous> (.../replays/hooks/useReplayData.spec.tsx:180:28)
    at runNextTicks (node:internal/process/task_queues:65:5)
    at listOnTimeout (node:internal/timers:555:9)
    at processTimers (node:internal/timers:529:7)

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

@colin-sentry colin-sentry merged commit bc85dd8 into master Mar 24, 2025
40 checks passed
@colin-sentry colin-sentry deleted the fix_logs_context branch March 24, 2025 15:50
andrewshie-sentry pushed a commit that referenced this pull request Mar 27, 2025
…7665)

On some pages (like replay) - the spans waterfall is embedded without
the context provider, which would give this error:

```
Error: useContext for "LogsPageDataContext" must be inside a Provider with a value
```

This hoists out the logic for hiding the waterfall into a property.
@github-actions github-actions bot locked and limited conversation to collaborators Apr 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants