Title: otel spans not flushed in _after? · Issue #682 · DataDog/datadog-lambda-python · GitHub
Open Graph Title: otel spans not flushed in _after? · Issue #682 · DataDog/datadog-lambda-python
X Title: otel spans not flushed in _after? · Issue #682 · DataDog/datadog-lambda-python
Description: Expected Behavior Spans from uncaught exceptions should still reliably reach datadog. Actual Behavior Many spans from uncaught errors are lost before they can be sent. This needs further investigation, but I suspect it's because datadog_...
Open Graph Description: Expected Behavior Spans from uncaught exceptions should still reliably reach datadog. Actual Behavior Many spans from uncaught errors are lost before they can be sent. This needs further investigat...
X Description: Expected Behavior Spans from uncaught exceptions should still reliably reach datadog. Actual Behavior Many spans from uncaught errors are lost before they can be sent. This needs further investigat...
Opengraph URL: https://github.com/DataDog/datadog-lambda-python/issues/682
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"otel spans not flushed in _after?","articleBody":"## Expected Behavior\nSpans from uncaught exceptions should still reliably reach datadog.\n\n## Actual Behavior\nMany spans from uncaught errors are lost before they can be sent. \n\nThis needs further investigation, but I suspect it's because datadog_wrapper's _after method specifically flushes ddtrace-generated spans but not opentelemetry-api ones? Maybe it needs to also call TracerProvider.force_flush if applicable?\n\n## Specifications\n\n - Datadog Lambda Layer version: 86\n - Python version: 3.11.14\n \n## Stacktrace\n \n ```\n Paste here\n ```","author":{"url":"https://github.com/vin","@type":"Person","name":"vin"},"datePublished":"2025-11-22T10:02:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/682/datadog-lambda-python/issues/682"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e07a6c94-da0f-183f-a403-ee12f0e6db68 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD26:1B821B:11A15FA:16ACF2D:69909E98 |
| html-safe-nonce | 40b214c8e7433f242d8c3289633d4d9b582435721b33f7f21adad4ca2b67f64d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDI2OjFCODIxQjoxMUExNUZBOjE2QUNGMkQ6Njk5MDlFOTgiLCJ2aXNpdG9yX2lkIjoiNDIwMjM2NTg3MDEzNDA0MjI2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a152633945414ba260c069893419f55f68c6587075533903686c213effbe84db |
| hovercard-subject-tag | issue:3654428134 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/DataDog/datadog-lambda-python/682/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3c6dbcf2c840072640f1ce6046ee7849872998a278adae976ab3c2530465c0f8/DataDog/datadog-lambda-python/issues/682 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3c6dbcf2c840072640f1ce6046ee7849872998a278adae976ab3c2530465c0f8/DataDog/datadog-lambda-python/issues/682 |
| og:image:alt | Expected Behavior Spans from uncaught exceptions should still reliably reach datadog. Actual Behavior Many spans from uncaught errors are lost before they can be sent. This needs further investigat... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vin |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/DataDog/datadog-lambda-python git https://github.com/DataDog/datadog-lambda-python.git |
| octolytics-dimension-user_id | 365230 |
| octolytics-dimension-user_login | DataDog |
| octolytics-dimension-repository_id | 183265904 |
| octolytics-dimension-repository_nwo | DataDog/datadog-lambda-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 183265904 |
| octolytics-dimension-repository_network_root_nwo | DataDog/datadog-lambda-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width