René's URL Explorer Experiment


Title: fix(core): stop custom metric exporters breaking the metrics export by nicktrn · Pull Request #4613 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: fix(core): stop custom metric exporters breaking the metrics export by nicktrn · Pull Request #4613 · triggerdotdev/trigger.dev

X Title: fix(core): stop custom metric exporters breaking the metrics export by nicktrn · Pull Request #4613 · triggerdotdev/trigger.dev

Description: Summary Projects that configure their own metricExporters or metricReaders in trigger.config.ts were losing task metrics on nearly every run, and seeing an unexplained Failed to flush tracingSDK alongside OTLPExporterError: Bad Request in their run logs. Spans and logs kept working, so the runs otherwise looked healthy. Root cause and fix Every configured exporter gets its own PeriodicExportingMetricReader, and meterProvider.forceFlush() fans out across all readers with Promise.all, so two collections can land on the same millisecond. @opentelemetry/host-metrics divides by the elapsed interval to compute process.cpu.utilization (common.ts), so a zero interval yields 0/0. JSON.stringify(NaN) is null, and a collector rejects "asDouble": null with a 400 that drops the entire request, not just the offending point. flush() and shutdown() now walk the metric readers one at a time, so collections can no longer share a timestamp. Each reader is isolated, so one failing reader cannot skip the readers behind it, and every failure is logged with the reader that produced it. The first error is still rethrown, so callers see failures exactly as before. As a second layer, non-finite data points are dropped just before our own export, so a metric that divides by zero cannot take the rest of the batch with it. Exporters and readers supplied through trigger.config.ts are untouched by that filter and still receive raw data. The trade-off is that configured exporters now flush after the built-in one rather than alongside it, so flush latency is the sum rather than the max. An internal test package's dependency on core was replaced with a local helper, because core now needs that package in devDependencies and the two together formed a workspace cycle. Verification Tested against a real collector in a container: a batch containing a NaN reading is rejected with a 400 without the fix and accepted with it, and a single flush is asserted to collect from one reader at a time.

Open Graph Description: Summary Projects that configure their own metricExporters or metricReaders in trigger.config.ts were losing task metrics on nearly every run, and seeing an unexplained Failed to flush tracingSDK al...

X Description: Summary Projects that configure their own metricExporters or metricReaders in trigger.config.ts were losing task metrics on nearly every run, and seeing an unexplained Failed to flush tracingSDK al...

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/pull/4613

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:39460c3d-2bdb-ab14-bd93-86244d4f10f6
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDB54:2F463F:69AE98:9C8E27:6AFAF47D
html-safe-nonce940827b4b2e6393ba69615211197315ebd9d34779f2e1ecb02aa181a9a737384
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjU0OjJGNDYzRjo2OUFFOTg6OUM4RTI3OjZBRkFGNDdEIiwidmlzaXRvcl9pZCI6IjEwODMyODY2NjA0NjU3NTExNjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaca8ad1a1efb18ba9285ab24973dbc1f8cf404665ead994c97dd67b0d2e1bc432d
hovercard-subject-tagpull_request:4275584329
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/triggerdotdev/trigger.dev/pull/4613/files
twitter:imagehttps://avatars.githubusercontent.com/u/55853254?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/55853254?s=400&v=4
og:image:altSummary Projects that configure their own metricExporters or metricReaders in trigger.config.ts were losing task metrics on nearly every run, and seeing an unexplained Failed to flush tracingSDK al...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None0178036d8230524a18422872393ab7e708443ae4c2047f758560a2db870c1913
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git
octolytics-dimension-user_id95297378
octolytics-dimension-user_logintriggerdotdev
octolytics-dimension-repository_id572570113
octolytics-dimension-repository_nwotriggerdotdev/trigger.dev
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id572570113
octolytics-dimension-repository_network_root_nwotriggerdotdev/trigger.dev
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea85e96a83bed7871993e6b1ffda24105928eee17
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/4613/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4613%2Ffiles
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%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4613%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4613/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4613/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4613/files
triggerdotdevhttps://github.com/triggerdotdev
trigger.devhttps://github.com/triggerdotdev/trigger.dev
Codehttps://github.com/triggerdotdev/trigger.dev
Issues203 (203)https://github.com/triggerdotdev/trigger.dev/issues
Pull requests67 (67)https://github.com/triggerdotdev/trigger.dev/pulls
Discussionshttps://github.com/triggerdotdev/trigger.dev/discussions
Actionshttps://github.com/triggerdotdev/trigger.dev/actions
Projectshttps://github.com/triggerdotdev/trigger.dev/projects
Security and quality39 (39)https://github.com/triggerdotdev/trigger.dev/security
Insightshttps://github.com/triggerdotdev/trigger.dev/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
nicktrnhttps://github.com/nicktrn
mainhttps://github.com/triggerdotdev/trigger.dev/tree/main
fix/otel-metric-reader-collisions-tri-13193https://github.com/triggerdotdev/trigger.dev/tree/fix/otel-metric-reader-collisions-tri-13193
Conversation 24 https://github.com/triggerdotdev/trigger.dev/pull/4613
Commits 2 https://github.com/triggerdotdev/trigger.dev/pull/4613/commits
Checks 72 https://github.com/triggerdotdev/trigger.dev/pull/4613/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/4613/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4613/files
fix(core): stop custom metric exporters breaking the metrics export https://github.com/triggerdotdev/trigger.dev/pull/4613/files#top
Show all changes 2 commits https://github.com/triggerdotdev/trigger.dev/pull/4613/files
93933a2 fix(core): stop custom metric exporters breaking the metrics export nicktrn Aug 13, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4613/commits/93933a276ab52bf4f9d5c8622ea84a69c1617fc8
a4af9bc fix(core): do not retry a metric reader that failed to shut down nicktrn Aug 13, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4613/commits/a4af9bc63fa655344981da81d8556e3b4855867a
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/4613/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4613/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4613/files
lucky-pillows-invite.md https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-18eb1a976042ab6033070563c8c4aee1d01203248378adfb2fab50c6f8a61a1f
unit-tests-packages.yml https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-7b854f2f4aa2803482b5fe79d9947436d96f1e20758158b80c397ab3d002061b
package.json https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-ebbfd883833c9bab214535848de460634de756d5c7952bd8cb258b4669fdc01d
index.ts https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-5b3bdf721b6191d6295a181c45cdc3fcc55365683018b120ff32689710ba7ac7
otelCollector.ts https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-749ad01bfffcc58543af495f53a3deb53fdab2e476a68b4049cd68ef9f910549
utils.ts https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-a68419dd5694f155e62d37fbc827c84cda626732efabe66aee1e0bfb395c9753
package.json https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-0b810c38f3c138a3d5e44854edefd5eb966617ca84e62f06511f60acc40546c7
tracingSDK.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-716b0e1fdb971acc9cf57ac981e4ce48690f18aa0896bf7b56a58f0f4fdbe9fe
tracingSDK.ts https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-ce510b575f0568e5e9854cedbca289205f363324a89085ae9b668c3cc334cd93
tracingSDKShutdown.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-1c90625dc88e27dbeb587db244422f23ab8b92467af5d754057297890236ac55
otelProcessors.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-7d99fb45217ec09befcb365e8cee591da09adad0d775a831643a866241012662
otelProcessors.ts https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-c157666330f299da1cc8afed947fb6d2b34c410ecfd19fe3edc167c29fb2723c
pnpm-lock.yaml https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bb
.changeset/lucky-pillows-invite.mdhttps://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-18eb1a976042ab6033070563c8c4aee1d01203248378adfb2fab50c6f8a61a1f
View file https://github.com/triggerdotdev/trigger.dev/blob/a4af9bc63fa655344981da81d8556e3b4855867a/.changeset/lucky-pillows-invite.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4613/{{ revealButtonHref }}
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4613/files
.github/workflows/unit-tests-packages.ymlhttps://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-7b854f2f4aa2803482b5fe79d9947436d96f1e20758158b80c397ab3d002061b
View file https://github.com/triggerdotdev/trigger.dev/blob/a4af9bc63fa655344981da81d8556e3b4855867a/.github/workflows/unit-tests-packages.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4613/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-7b854f2f4aa2803482b5fe79d9947436d96f1e20758158b80c397ab3d002061b
https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-7b854f2f4aa2803482b5fe79d9947436d96f1e20758158b80c397ab3d002061b
internal-packages/testcontainers/package.jsonhttps://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-ebbfd883833c9bab214535848de460634de756d5c7952bd8cb258b4669fdc01d
View file https://github.com/triggerdotdev/trigger.dev/blob/a4af9bc63fa655344981da81d8556e3b4855867a/internal-packages/testcontainers/package.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4613/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-ebbfd883833c9bab214535848de460634de756d5c7952bd8cb258b4669fdc01d
https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-ebbfd883833c9bab214535848de460634de756d5c7952bd8cb258b4669fdc01d
internal-packages/testcontainers/src/index.tshttps://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-5b3bdf721b6191d6295a181c45cdc3fcc55365683018b120ff32689710ba7ac7
View file https://github.com/triggerdotdev/trigger.dev/blob/a4af9bc63fa655344981da81d8556e3b4855867a/internal-packages/testcontainers/src/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4613/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-5b3bdf721b6191d6295a181c45cdc3fcc55365683018b120ff32689710ba7ac7
https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-5b3bdf721b6191d6295a181c45cdc3fcc55365683018b120ff32689710ba7ac7
internal-packages/testcontainers/src/otelCollector.tshttps://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-749ad01bfffcc58543af495f53a3deb53fdab2e476a68b4049cd68ef9f910549
View file https://github.com/triggerdotdev/trigger.dev/blob/a4af9bc63fa655344981da81d8556e3b4855867a/internal-packages/testcontainers/src/otelCollector.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4613/{{ revealButtonHref }}
internal-packages/testcontainers/src/utils.tshttps://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-a68419dd5694f155e62d37fbc827c84cda626732efabe66aee1e0bfb395c9753
View file https://github.com/triggerdotdev/trigger.dev/blob/a4af9bc63fa655344981da81d8556e3b4855867a/internal-packages/testcontainers/src/utils.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4613/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-a68419dd5694f155e62d37fbc827c84cda626732efabe66aee1e0bfb395c9753
https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-a68419dd5694f155e62d37fbc827c84cda626732efabe66aee1e0bfb395c9753
https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-a68419dd5694f155e62d37fbc827c84cda626732efabe66aee1e0bfb395c9753
packages/core/package.jsonhttps://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-0b810c38f3c138a3d5e44854edefd5eb966617ca84e62f06511f60acc40546c7
View file https://github.com/triggerdotdev/trigger.dev/blob/a4af9bc63fa655344981da81d8556e3b4855867a/packages/core/package.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4613/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-0b810c38f3c138a3d5e44854edefd5eb966617ca84e62f06511f60acc40546c7
https://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-0b810c38f3c138a3d5e44854edefd5eb966617ca84e62f06511f60acc40546c7
packages/core/src/v3/otel/tracingSDK.test.tshttps://github.com/triggerdotdev/trigger.dev/pull/4613/files#diff-716b0e1fdb971acc9cf57ac981e4ce48690f18aa0896bf7b56a58f0f4fdbe9fe
View file https://github.com/triggerdotdev/trigger.dev/blob/a4af9bc63fa655344981da81d8556e3b4855867a/packages/core/src/v3/otel/tracingSDK.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4613/{{ revealButtonHref }}
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4613/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4613/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4613/files
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.