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

fix(trace-view): Hoist out the logs hook from the trace waterfall #87665

Merged
merged 2 commits into from
Mar 24, 2025

Conversation

colin-sentry
Copy link
Member

@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 a review from Abdkhan14 March 21, 2025 22:37
@colin-sentry colin-sentry requested a review from a team as a code owner 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
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.
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