René's URL Explorer Experiment


Title: AwsLambdaIntegration crashes when lambda is triggered by EventBridge Pipe source · Issue #2545 · getsentry/sentry-python · GitHub

Open Graph Title: AwsLambdaIntegration crashes when lambda is triggered by EventBridge Pipe source · Issue #2545 · getsentry/sentry-python

X Title: AwsLambdaIntegration crashes when lambda is triggered by EventBridge Pipe source · Issue #2545 · getsentry/sentry-python

Description: How do you use Sentry? Sentry Saas (sentry.io) Version 1.38.0 Steps to Reproduce Create an EventBridge pipe in AWS with any source, and a destination of a lambda function Instrument the lambda function with sentry and include the AwsLamb...

Open Graph Description: How do you use Sentry? Sentry Saas (sentry.io) Version 1.38.0 Steps to Reproduce Create an EventBridge pipe in AWS with any source, and a destination of a lambda function Instrument the lambda func...

X Description: How do you use Sentry? Sentry Saas (sentry.io) Version 1.38.0 Steps to Reproduce Create an EventBridge pipe in AWS with any source, and a destination of a lambda function Instrument the lambda func...

Opengraph URL: https://github.com/getsentry/sentry-python/issues/2545

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"AwsLambdaIntegration crashes when lambda is triggered by EventBridge Pipe source ","articleBody":"### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Version\n\n1.38.0\n\n### Steps to Reproduce\n\n1. Create an EventBridge pipe in AWS with any source, and a destination of a lambda function\r\n2. Instrument the lambda function with sentry and include the AwsLambdaIntegration\r\n3. Observe that when triggered by events from the pipe, sentry errors out while trying to trace the function\r\n\r\nThe following is the stack trace that is printed out in the logs\r\n\r\n```\r\nAttributeError: 'list' object has no attribute 'items'\r\nTraceback (most recent call last):\r\n  File \"/var/task/sentry_sdk/integrations/aws_lambda.py\", line 145, in sentry_handler\r\n    transaction = continue_trace(\r\n  File \"/var/task/sentry_sdk/api.py\", line 269, in continue_trace\r\n    return Hub.current.continue_trace(environ_or_headers, op, name, source)\r\n  File \"/var/task/sentry_sdk/hub.py\", line 596, in continue_trace\r\n    normalize_incoming_data(environ_or_headers),\r\n  File \"/var/task/sentry_sdk/tracing_utils.py\", line 497, in normalize_incoming_data\r\n    for key, value in incoming_data.items():\r\n```\n\n### Expected Result\n\nSentry is able to trace the function invocation\n\n### Actual Result\n\nSentry crashes and ends execution of the function.\r\n\r\nThe root of the issue seems to be that the `AwsLambdaIntegration` expects that if the `headers` key exists in the request, that it will be a dictionary. However when EventBridge triggers the lambda with data, it sends headers as an empty list. Sample payload below.\r\n\r\n```json\r\n[\r\n{\r\n    \"topic\": \"lps-ranges\",\r\n    \"partition\": 1,\r\n    \"offset\": 0,\r\n    \"timestamp\": 1701268939207,\r\n    \"timestampType\": \"CREATE_TIME\",\r\n    \"key\": \"REDACTED\",\r\n    \"value\": \"REDACTED\",\r\n    \"headers\": [],\r\n    \"eventSourceArn\": \"REDACTED\",\r\n    \"bootstrapServers\": \"REDACTED\",\r\n    \"eventSource\": \"aws:kafka\",\r\n    \"eventSourceKey\": \"lps-ranges-1\"\r\n}\r\n]\r\n```\r\n\r\nThis is where the error is caused in the lambda integration. https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/integrations/aws_lambda.py#L140-L143\r\n\r\nThis should probably be inverted to set headers to an empty dict if it is not a dict, instead of checking only if it is None.","author":{"url":"https://github.com/davidcroda","@type":"Person","name":"davidcroda"},"datePublished":"2023-11-29T16:02:44Z","url":"https://github.com/getsentry/sentry-python/issues/2545"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:23710cff-ddae-ccf8-60b5-c8084dc38968
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE86C:5885B:85FF5:B72E6:6B007F69
html-safe-nonce1ec96b71fa5a354dc83b27a508bc601ed1b62fe7d07ee8e9a641434c606d346e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODZDOjU4ODVCOjg1RkY1OkI3MkU2OjZCMDA3RjY5IiwidmlzaXRvcl9pZCI6Ijc3NDAwNDM1MzYwOTUwMTg4NTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb2650655f26bfbc52b24b74eab4567470b6c7ae0a0b76ac0bc3064ab00f28bed
hovercard-subject-tagissue:2016920091
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-python/2545/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9969c616ce2ac68d1534def0083c865d1766594145fe5779aff5d0c67afd2530/getsentry/sentry-python/issues/2545
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9969c616ce2ac68d1534def0083c865d1766594145fe5779aff5d0c67afd2530/getsentry/sentry-python/issues/2545
og:image:altHow do you use Sentry? Sentry Saas (sentry.io) Version 1.38.0 Steps to Reproduce Create an EventBridge pipe in AWS with any source, and a destination of a lambda function Instrument the lambda func...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedavidcroda
hostnamegithub.com
expected-hostnamegithub.com
None82c186f13e104004ab7bdb779f3195e59dd38bfde531aaa74b76470fc2462b83
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id137814779
octolytics-dimension-repository_nwogetsentry/sentry-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id137814779
octolytics-dimension-repository_network_root_nwogetsentry/sentry-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released1bc2aa1939001689f5ce935982c10a6138f745c
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-python/issues/2545#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fissues%2F2545
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fissues%2F2545
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-python
Reloadhttps://github.com/getsentry/sentry-python/issues/2545
Reloadhttps://github.com/getsentry/sentry-python/issues/2545
Reloadhttps://github.com/getsentry/sentry-python/issues/2545
getsentryhttps://github.com/getsentry
sentry-pythonhttps://github.com/getsentry/sentry-python
Codehttps://github.com/getsentry/sentry-python
Issues345 (345)https://github.com/getsentry/sentry-python/issues
Pull requests41 (41)https://github.com/getsentry/sentry-python/pulls
Discussionshttps://github.com/getsentry/sentry-python/discussions
Actionshttps://github.com/getsentry/sentry-python/actions
Security and quality2 (2)https://github.com/getsentry/sentry-python/security
Insightshttps://github.com/getsentry/sentry-python/insights
https://github.com/getsentry/sentry-python
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-python/issues/2545
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-python/issues/2545
#2546https://github.com/getsentry/sentry-python/pull/2546
AwsLambdaIntegration crashes when lambda is triggered by EventBridge Pipe source https://github.com/getsentry/sentry-python/issues/2545#top
#2546https://github.com/getsentry/sentry-python/pull/2546
https://github.com/sentrivana
Bughttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Bug%22
Integration: AWS Lambdahttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Integration%3A%20AWS%20Lambda%22
https://github.com/davidcroda
davidcrodahttps://github.com/davidcroda
on Nov 29, 2023https://github.com/getsentry/sentry-python/issues/2545#issue-2016920091
https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/integrations/aws_lambda.py#L140-L143https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/integrations/aws_lambda.py#L140-L143
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Nov 29, 2023https://github.com/getsentry/sentry-python/issues/2545#event-11098455529
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀https://github.com/orgs/getsentry/projects/76
on Nov 29, 2023https://github.com/getsentry/sentry-python/issues/2545#event-14872899887
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀https://github.com/orgs/getsentry/projects/76
on Nov 29, 2023https://github.com/getsentry/sentry-python/issues/2545
davidcrodahttps://github.com/davidcroda
on Nov 29, 2023https://github.com/getsentry/sentry-python/issues/2545#event-11098457088
davidcrodahttps://github.com/davidcroda
on Nov 29, 2023https://github.com/getsentry/sentry-python/issues/2545#event-11098685333
fix(): Handle AWS Lambda EventBridge source with list headershttps://github.com/davidcroda/sentry-python/commit/8e2b90d164572d01930fa9a64107991bd9499a59
https://docs.github.com/articles/closing-issues-via-commit-messages
8e2b90dhttps://github.com/davidcroda/sentry-python/commit/8e2b90d164572d01930fa9a64107991bd9499a59
fix(integrations): Handle AWS Lambda EventBridge source with list hea…https://github.com/davidcroda/sentry-python/commit/844ea75fb433e69ddb7307a83756299fe9f05b10
https://docs.github.com/articles/closing-issues-via-commit-messages
844ea75https://github.com/davidcroda/sentry-python/commit/844ea75fb433e69ddb7307a83756299fe9f05b10
fix(integrations): Fix Lambda integration with EventBridge sourcehttps://github.com/davidcroda/sentry-python/commit/e64bfa65dc21a0644f13fe456b06b1d515e0328c
https://docs.github.com/articles/closing-issues-via-commit-messages
e64bfa6https://github.com/davidcroda/sentry-python/commit/e64bfa65dc21a0644f13fe456b06b1d515e0328c
sentrivanahttps://github.com/sentrivana
Type: Bughttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Type%3A%20Bug%22
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Nov 30, 2023https://github.com/getsentry/sentry-python/issues/2545#event-11107469397
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀https://github.com/orgs/getsentry/projects/76
on Nov 30, 2023https://github.com/getsentry/sentry-python/issues/2545
sentrivanahttps://github.com/sentrivana
on Nov 30, 2023https://github.com/getsentry/sentry-python/issues/2545#event-11107470547
sentrivanahttps://github.com/sentrivana
Integration: AWS Lambdahttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Integration%3A%20AWS%20Lambda%22
on Nov 30, 2023https://github.com/getsentry/sentry-python/issues/2545#event-11107479512
davidcrodahttps://github.com/davidcroda
on Nov 30, 2023https://github.com/getsentry/sentry-python/issues/2545#event-11112873214
fix(integrations): Fix Lambda integration with EventBridge sourcehttps://github.com/davidcroda/sentry-python/commit/5d30d736c2be71c73c02f04c4925a6b79bd69b93
https://docs.github.com/articles/closing-issues-via-commit-messages
5d30d73https://github.com/davidcroda/sentry-python/commit/5d30d736c2be71c73c02f04c4925a6b79bd69b93
sentrivanahttps://github.com/sentrivana
completedhttps://github.com/getsentry/sentry-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#2546https://github.com/getsentry/sentry-python/pull/2546
on Dec 1, 2023https://github.com/getsentry/sentry-python/issues/2545#event-11121640390
sentrivanahttps://github.com/sentrivana
on Dec 1, 2023https://github.com/getsentry/sentry-python/issues/2545#event-11121640593
fix(integrations): Fix Lambda integration with EventBridge source (#2546https://github.com/getsentry/sentry-python/commit/837f29458d149349248a1749d3480253c83662d2
#2546https://github.com/getsentry/sentry-python/pull/2546
https://docs.github.com/articles/closing-issues-via-commit-messages
837f294https://github.com/getsentry/sentry-python/commit/837f29458d149349248a1749d3480253c83662d2
stephanie-andersonhttps://github.com/stephanie-anderson
Type: Bughttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Type%3A%20Bug%22
on Nov 21, 2024https://github.com/getsentry/sentry-python/issues/2545#event-15380628803
Bughttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Bug%22
on Aug 13, 2025https://github.com/getsentry/sentry-python/issues/2545#event-19125016433
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-python/issues/2545
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-python/issues/2545
sentrivanahttps://github.com/sentrivana
Bughttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Bug%22
Integration: AWS Lambdahttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Integration%3A%20AWS%20Lambda%22
GitHub Issues with 👀https://github.com/orgs/getsentry/projects/76
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.