Skip to content

Conversation

@crysmags
Copy link
Collaborator

What does this PR do?

Adding a check to verify the span is present on the context before calling finish.

Motivation

There is a current escalation where the customer is using a long standing websocket connection and migrating traffic kubernetes pods while maintaining the same websocket. In doing so it appears the span on the context, which is the is lost and when attempting to call finish there is no longer a present span.

@crysmags crysmags marked this pull request as ready for review December 19, 2025 20:53
@crysmags crysmags requested review from a team as code owners December 19, 2025 20:53
@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.47%. Comparing base (93ec9f5) to head (890fbf0).

Files with missing lines Patch % Lines
packages/datadog-plugin-ws/src/producer.js 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7149      +/-   ##
==========================================
- Coverage   84.48%   84.47%   -0.02%     
==========================================
  Files         523      523              
  Lines       22448    22452       +4     
==========================================
+ Hits        18966    18967       +1     
- Misses       3482     3485       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

github-actions bot commented Dec 19, 2025

Overall package size

Self size: 4.39 MB
Deduped: 5.21 MB
No deduping: 5.21 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.0 | 68.46 kB | 797.03 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@pr-commenter
Copy link

pr-commenter bot commented Dec 19, 2025

Benchmarks

Benchmark execution time: 2025-12-22 19:33:40

Comparing candidate commit 890fbf0 in PR branch crysmags/er-dec with baseline commit 93ec9f5 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 289 metrics, 31 unstable metrics.

@crysmags crysmags changed the title FIx: Ws -add guardrail to bindAsyncStart in Publisher, to guard against not finding span in ctx. FIx: Ws -add guardrail to bindAsyncStart in Publisher. Dec 22, 2025
@datadog-official
Copy link

datadog-official bot commented Dec 22, 2025

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

❄️ 1 New flaky test detected

cypress@latest commonJS can report code coverage if it is available from integration-tests/cypress/cypress.spec.js (Datadog) (Fix with Cursor)
Cannot read properties of undefined (reading 'payload')

ℹ️ Info

🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 890fbf0 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

Copy link
Collaborator

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

Please also add a regression test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants