Compare commits

...
5 Commits
Author SHA1 Message Date
steffen911 66aa2fd48e chore: release v3.65.2 2025-06-03 22:02:11 +02:00
Steffen SchmitzandGitHub f822bf1049 chore: add opt-out flag from queue length metric checks (#7123) 2025-06-03 19:21:35 +00:00
Hassieb PakzadGitHubellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
96ec24aad8 fix(otel): set trace io from root span (#7127)
* fix(otel): set trace io from root span

* Update web/src/features/otel/server/index.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-03 16:48:58 +00:00
steffen911 068fbd0cc6 chore: release v3.65.1 2025-06-03 11:33:30 +02:00
Steffen SchmitzandGitHub 7c8b76d573 security: bump tar-fs, rollup version (#7116)
* security: bump tar-fs version

* chore: bump rollup version
2025-06-03 08:13:54 +00:00
9 changed files with 174 additions and 95 deletions
+4 -2
View File
@@ -1,6 +1,6 @@
{
"name": "langfuse",
"version": "3.65.0",
"version": "3.65.2",
"author": "engineering@langfuse.com",
"license": "MIT",
"private": true,
@@ -86,7 +86,9 @@
"pnpm": {
"overrides": {
"nanoid": "^3.3.8",
"katex": "^0.16.21"
"katex": "^0.16.21",
"tar-fs": "^2.1.2",
"rollup@^4.0.0": "^4.22.4"
},
"patchedDependencies": {
"next-auth@4.24.11": "patches/next-auth@4.24.11.patch"
+131 -66
View File
@@ -7,6 +7,8 @@ settings:
overrides:
nanoid: ^3.3.8
katex: ^0.16.21
tar-fs: ^2.1.2
rollup@^4.0.0: ^4.22.4
patchedDependencies:
next-auth@4.24.11:
@@ -4349,7 +4351,7 @@ packages:
resolution: {integrity: sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==}
engines: {node: '>=16.0.0 || 14 >= 14.17'}
peerDependencies:
rollup: ^2.68.0||^3.0.0||^4.0.0
rollup: ^4.22.4
peerDependenciesMeta:
rollup:
optional: true
@@ -4358,73 +4360,108 @@ packages:
resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==}
engines: {node: '>=14.0.0'}
peerDependencies:
rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
rollup: ^4.22.4
peerDependenciesMeta:
rollup:
optional: true
'@rollup/rollup-android-arm-eabi@4.13.0':
resolution: {integrity: sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg==}
'@rollup/rollup-android-arm-eabi@4.41.1':
resolution: {integrity: sha512-NELNvyEWZ6R9QMkiytB4/L4zSEaBC03KIXEghptLGLZWJ6VPrL63ooZQCOnlx36aQPGhzuOMwDerC1Eb2VmrLw==}
cpu: [arm]
os: [android]
'@rollup/rollup-android-arm64@4.13.0':
resolution: {integrity: sha512-BSbaCmn8ZadK3UAQdlauSvtaJjhlDEjS5hEVVIN3A4bbl3X+otyf/kOJV08bYiRxfejP3DXFzO2jz3G20107+Q==}
'@rollup/rollup-android-arm64@4.41.1':
resolution: {integrity: sha512-DXdQe1BJ6TK47ukAoZLehRHhfKnKg9BjnQYUu9gzhI8Mwa1d2fzxA1aw2JixHVl403bwp1+/o/NhhHtxWJBgEA==}
cpu: [arm64]
os: [android]
'@rollup/rollup-darwin-arm64@4.13.0':
resolution: {integrity: sha512-Ovf2evVaP6sW5Ut0GHyUSOqA6tVKfrTHddtmxGQc1CTQa1Cw3/KMCDEEICZBbyppcwnhMwcDce9ZRxdWRpVd6g==}
'@rollup/rollup-darwin-arm64@4.41.1':
resolution: {integrity: sha512-5afxvwszzdulsU2w8JKWwY8/sJOLPzf0e1bFuvcW5h9zsEg+RQAojdW0ux2zyYAz7R8HvvzKCjLNJhVq965U7w==}
cpu: [arm64]
os: [darwin]
'@rollup/rollup-darwin-x64@4.13.0':
resolution: {integrity: sha512-U+Jcxm89UTK592vZ2J9st9ajRv/hrwHdnvyuJpa5A2ngGSVHypigidkQJP+YiGL6JODiUeMzkqQzbCG3At81Gg==}
'@rollup/rollup-darwin-x64@4.41.1':
resolution: {integrity: sha512-egpJACny8QOdHNNMZKf8xY0Is6gIMz+tuqXlusxquWu3F833DcMwmGM7WlvCO9sB3OsPjdC4U0wHw5FabzCGZg==}
cpu: [x64]
os: [darwin]
'@rollup/rollup-linux-arm-gnueabihf@4.13.0':
resolution: {integrity: sha512-8wZidaUJUTIR5T4vRS22VkSMOVooG0F4N+JSwQXWSRiC6yfEsFMLTYRFHvby5mFFuExHa/yAp9juSphQQJAijQ==}
'@rollup/rollup-freebsd-arm64@4.41.1':
resolution: {integrity: sha512-DBVMZH5vbjgRk3r0OzgjS38z+atlupJ7xfKIDJdZZL6sM6wjfDNo64aowcLPKIx7LMQi8vybB56uh1Ftck/Atg==}
cpu: [arm64]
os: [freebsd]
'@rollup/rollup-freebsd-x64@4.41.1':
resolution: {integrity: sha512-3FkydeohozEskBxNWEIbPfOE0aqQgB6ttTkJ159uWOFn42VLyfAiyD9UK5mhu+ItWzft60DycIN1Xdgiy8o/SA==}
cpu: [x64]
os: [freebsd]
'@rollup/rollup-linux-arm-gnueabihf@4.41.1':
resolution: {integrity: sha512-wC53ZNDgt0pqx5xCAgNunkTzFE8GTgdZ9EwYGVcg+jEjJdZGtq9xPjDnFgfFozQI/Xm1mh+D9YlYtl+ueswNEg==}
cpu: [arm]
os: [linux]
'@rollup/rollup-linux-arm64-gnu@4.13.0':
resolution: {integrity: sha512-Iu0Kno1vrD7zHQDxOmvweqLkAzjxEVqNhUIXBsZ8hu8Oak7/5VTPrxOEZXYC1nmrBVJp0ZcL2E7lSuuOVaE3+w==}
'@rollup/rollup-linux-arm-musleabihf@4.41.1':
resolution: {integrity: sha512-jwKCca1gbZkZLhLRtsrka5N8sFAaxrGz/7wRJ8Wwvq3jug7toO21vWlViihG85ei7uJTpzbXZRcORotE+xyrLA==}
cpu: [arm]
os: [linux]
'@rollup/rollup-linux-arm64-gnu@4.41.1':
resolution: {integrity: sha512-g0UBcNknsmmNQ8V2d/zD2P7WWfJKU0F1nu0k5pW4rvdb+BIqMm8ToluW/eeRmxCared5dD76lS04uL4UaNgpNA==}
cpu: [arm64]
os: [linux]
'@rollup/rollup-linux-arm64-musl@4.13.0':
resolution: {integrity: sha512-C31QrW47llgVyrRjIwiOwsHFcaIwmkKi3PCroQY5aVq4H0A5v/vVVAtFsI1nfBngtoRpeREvZOkIhmRwUKkAdw==}
'@rollup/rollup-linux-arm64-musl@4.41.1':
resolution: {integrity: sha512-XZpeGB5TKEZWzIrj7sXr+BEaSgo/ma/kCgrZgL0oo5qdB1JlTzIYQKel/RmhT6vMAvOdM2teYlAaOGJpJ9lahg==}
cpu: [arm64]
os: [linux]
'@rollup/rollup-linux-riscv64-gnu@4.13.0':
resolution: {integrity: sha512-Oq90dtMHvthFOPMl7pt7KmxzX7E71AfyIhh+cPhLY9oko97Zf2C9tt/XJD4RgxhaGeAraAXDtqxvKE1y/j35lA==}
'@rollup/rollup-linux-loongarch64-gnu@4.41.1':
resolution: {integrity: sha512-bkCfDJ4qzWfFRCNt5RVV4DOw6KEgFTUZi2r2RuYhGWC8WhCA8lCAJhDeAmrM/fdiAH54m0mA0Vk2FGRPyzI+tw==}
cpu: [loong64]
os: [linux]
'@rollup/rollup-linux-powerpc64le-gnu@4.41.1':
resolution: {integrity: sha512-3mr3Xm+gvMX+/8EKogIZSIEF0WUu0HL9di+YWlJpO8CQBnoLAEL/roTCxuLncEdgcfJcvA4UMOf+2dnjl4Ut1A==}
cpu: [ppc64]
os: [linux]
'@rollup/rollup-linux-riscv64-gnu@4.41.1':
resolution: {integrity: sha512-3rwCIh6MQ1LGrvKJitQjZFuQnT2wxfU+ivhNBzmxXTXPllewOF7JR1s2vMX/tWtUYFgphygxjqMl76q4aMotGw==}
cpu: [riscv64]
os: [linux]
'@rollup/rollup-linux-x64-gnu@4.13.0':
resolution: {integrity: sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==}
'@rollup/rollup-linux-riscv64-musl@4.41.1':
resolution: {integrity: sha512-LdIUOb3gvfmpkgFZuccNa2uYiqtgZAz3PTzjuM5bH3nvuy9ty6RGc/Q0+HDFrHrizJGVpjnTZ1yS5TNNjFlklw==}
cpu: [riscv64]
os: [linux]
'@rollup/rollup-linux-s390x-gnu@4.41.1':
resolution: {integrity: sha512-oIE6M8WC9ma6xYqjvPhzZYk6NbobIURvP/lEbh7FWplcMO6gn7MM2yHKA1eC/GvYwzNKK/1LYgqzdkZ8YFxR8g==}
cpu: [s390x]
os: [linux]
'@rollup/rollup-linux-x64-gnu@4.41.1':
resolution: {integrity: sha512-cWBOvayNvA+SyeQMp79BHPK8ws6sHSsYnK5zDcsC3Hsxr1dgTABKjMnMslPq1DvZIp6uO7kIWhiGwaTdR4Og9A==}
cpu: [x64]
os: [linux]
'@rollup/rollup-linux-x64-musl@4.13.0':
resolution: {integrity: sha512-9RyNqoFNdF0vu/qqX63fKotBh43fJQeYC98hCaf89DYQpv+xu0D8QFSOS0biA7cGuqJFOc1bJ+m2rhhsKcw1hw==}
'@rollup/rollup-linux-x64-musl@4.41.1':
resolution: {integrity: sha512-y5CbN44M+pUCdGDlZFzGGBSKCA4A/J2ZH4edTYSSxFg7ce1Xt3GtydbVKWLlzL+INfFIZAEg1ZV6hh9+QQf9YQ==}
cpu: [x64]
os: [linux]
'@rollup/rollup-win32-arm64-msvc@4.13.0':
resolution: {integrity: sha512-46ue8ymtm/5PUU6pCvjlic0z82qWkxv54GTJZgHrQUuZnVH+tvvSP0LsozIDsCBFO4VjJ13N68wqrKSeScUKdA==}
'@rollup/rollup-win32-arm64-msvc@4.41.1':
resolution: {integrity: sha512-lZkCxIrjlJlMt1dLO/FbpZbzt6J/A8p4DnqzSa4PWqPEUUUnzXLeki/iyPLfV0BmHItlYgHUqJe+3KiyydmiNQ==}
cpu: [arm64]
os: [win32]
'@rollup/rollup-win32-ia32-msvc@4.13.0':
resolution: {integrity: sha512-P5/MqLdLSlqxbeuJ3YDeX37srC8mCflSyTrUsgbU1c/U9j6l2g2GiIdYaGD9QjdMQPMSgYm7hgg0551wHyIluw==}
'@rollup/rollup-win32-ia32-msvc@4.41.1':
resolution: {integrity: sha512-+psFT9+pIh2iuGsxFYYa/LhS5MFKmuivRsx9iPJWNSGbh2XVEjk90fmpUEjCnILPEPJnikAU6SFDiEUyOv90Pg==}
cpu: [ia32]
os: [win32]
'@rollup/rollup-win32-x64-msvc@4.13.0':
resolution: {integrity: sha512-UKXUQNbO3DOhzLRwHSpa0HnhhCgNODvfoPWv2FCXme8N/ANFfhIPMGuOT+QuKd16+B5yxZ0HdpNlqPvTMS1qfw==}
'@rollup/rollup-win32-x64-msvc@4.41.1':
resolution: {integrity: sha512-Wq2zpapRYLfi4aKxf2Xff0tN+7slj2d4R87WEzqw7ZLsVvO5zwYCIuEGSZYiK41+GlwUo1HiR+GdkLEJnCKTCw==}
cpu: [x64]
os: [win32]
@@ -10681,8 +10718,8 @@ packages:
engines: {node: '>=14.18.0', npm: '>=8.0.0'}
hasBin: true
rollup@4.13.0:
resolution: {integrity: sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==}
rollup@4.41.1:
resolution: {integrity: sha512-cPmwD3FnFv8rKMBc1MxWCwVQFxwf1JEmSX3iQXrRVVG15zerAIXRjMFVWnd5Q5QvgKF7Aj+5ykXFhUl+QGnyOw==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
@@ -11212,8 +11249,8 @@ packages:
resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==}
engines: {node: '>=6'}
tar-fs@2.1.1:
resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==}
tar-fs@2.1.3:
resolution: {integrity: sha512-090nwYJDmlhwFwEW3QQl+vaNnxsO2yVsd45eTKRBzSzu+hlb1w2K9inVq5b0ngXuLVqQ4ApvsUHHnu/zQNkWAg==}
tar-stream@2.2.0:
resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==}
@@ -15941,7 +15978,7 @@ snapshots:
https-proxy-agent: 5.0.1
progress: 2.0.3
proxy-from-env: 1.1.0
tar-fs: 2.1.1
tar-fs: 2.1.3
unbzip2-stream: 1.4.3
yargs: 17.7.1
optionalDependencies:
@@ -16761,43 +16798,64 @@ snapshots:
optionalDependencies:
rollup: 3.29.5
'@rollup/rollup-android-arm-eabi@4.13.0':
'@rollup/rollup-android-arm-eabi@4.41.1':
optional: true
'@rollup/rollup-android-arm64@4.13.0':
'@rollup/rollup-android-arm64@4.41.1':
optional: true
'@rollup/rollup-darwin-arm64@4.13.0':
'@rollup/rollup-darwin-arm64@4.41.1':
optional: true
'@rollup/rollup-darwin-x64@4.13.0':
'@rollup/rollup-darwin-x64@4.41.1':
optional: true
'@rollup/rollup-linux-arm-gnueabihf@4.13.0':
'@rollup/rollup-freebsd-arm64@4.41.1':
optional: true
'@rollup/rollup-linux-arm64-gnu@4.13.0':
'@rollup/rollup-freebsd-x64@4.41.1':
optional: true
'@rollup/rollup-linux-arm64-musl@4.13.0':
'@rollup/rollup-linux-arm-gnueabihf@4.41.1':
optional: true
'@rollup/rollup-linux-riscv64-gnu@4.13.0':
'@rollup/rollup-linux-arm-musleabihf@4.41.1':
optional: true
'@rollup/rollup-linux-x64-gnu@4.13.0':
'@rollup/rollup-linux-arm64-gnu@4.41.1':
optional: true
'@rollup/rollup-linux-x64-musl@4.13.0':
'@rollup/rollup-linux-arm64-musl@4.41.1':
optional: true
'@rollup/rollup-win32-arm64-msvc@4.13.0':
'@rollup/rollup-linux-loongarch64-gnu@4.41.1':
optional: true
'@rollup/rollup-win32-ia32-msvc@4.13.0':
'@rollup/rollup-linux-powerpc64le-gnu@4.41.1':
optional: true
'@rollup/rollup-win32-x64-msvc@4.13.0':
'@rollup/rollup-linux-riscv64-gnu@4.41.1':
optional: true
'@rollup/rollup-linux-riscv64-musl@4.41.1':
optional: true
'@rollup/rollup-linux-s390x-gnu@4.41.1':
optional: true
'@rollup/rollup-linux-x64-gnu@4.41.1':
optional: true
'@rollup/rollup-linux-x64-musl@4.41.1':
optional: true
'@rollup/rollup-win32-arm64-msvc@4.41.1':
optional: true
'@rollup/rollup-win32-ia32-msvc@4.41.1':
optional: true
'@rollup/rollup-win32-x64-msvc@4.41.1':
optional: true
'@rushstack/eslint-patch@1.7.2': {}
@@ -23996,7 +24054,7 @@ snapshots:
extract-zip: 2.0.1
https-proxy-agent: 5.0.1
proxy-from-env: 1.1.0
tar-fs: 2.1.1
tar-fs: 2.1.3
unbzip2-stream: 1.4.3
ws: 8.13.0
optionalDependencies:
@@ -24493,23 +24551,30 @@ snapshots:
optionalDependencies:
fsevents: 2.3.3
rollup@4.13.0:
rollup@4.41.1:
dependencies:
'@types/estree': 1.0.5
'@types/estree': 1.0.7
optionalDependencies:
'@rollup/rollup-android-arm-eabi': 4.13.0
'@rollup/rollup-android-arm64': 4.13.0
'@rollup/rollup-darwin-arm64': 4.13.0
'@rollup/rollup-darwin-x64': 4.13.0
'@rollup/rollup-linux-arm-gnueabihf': 4.13.0
'@rollup/rollup-linux-arm64-gnu': 4.13.0
'@rollup/rollup-linux-arm64-musl': 4.13.0
'@rollup/rollup-linux-riscv64-gnu': 4.13.0
'@rollup/rollup-linux-x64-gnu': 4.13.0
'@rollup/rollup-linux-x64-musl': 4.13.0
'@rollup/rollup-win32-arm64-msvc': 4.13.0
'@rollup/rollup-win32-ia32-msvc': 4.13.0
'@rollup/rollup-win32-x64-msvc': 4.13.0
'@rollup/rollup-android-arm-eabi': 4.41.1
'@rollup/rollup-android-arm64': 4.41.1
'@rollup/rollup-darwin-arm64': 4.41.1
'@rollup/rollup-darwin-x64': 4.41.1
'@rollup/rollup-freebsd-arm64': 4.41.1
'@rollup/rollup-freebsd-x64': 4.41.1
'@rollup/rollup-linux-arm-gnueabihf': 4.41.1
'@rollup/rollup-linux-arm-musleabihf': 4.41.1
'@rollup/rollup-linux-arm64-gnu': 4.41.1
'@rollup/rollup-linux-arm64-musl': 4.41.1
'@rollup/rollup-linux-loongarch64-gnu': 4.41.1
'@rollup/rollup-linux-powerpc64le-gnu': 4.41.1
'@rollup/rollup-linux-riscv64-gnu': 4.41.1
'@rollup/rollup-linux-riscv64-musl': 4.41.1
'@rollup/rollup-linux-s390x-gnu': 4.41.1
'@rollup/rollup-linux-x64-gnu': 4.41.1
'@rollup/rollup-linux-x64-musl': 4.41.1
'@rollup/rollup-win32-arm64-msvc': 4.41.1
'@rollup/rollup-win32-ia32-msvc': 4.41.1
'@rollup/rollup-win32-x64-msvc': 4.41.1
fsevents: 2.3.3
roughjs@4.6.6:
@@ -25078,7 +25143,7 @@ snapshots:
tapable@2.2.1: {}
tar-fs@2.1.1:
tar-fs@2.1.3:
dependencies:
chownr: 1.1.4
mkdirp-classic: 0.5.3
@@ -25685,7 +25750,7 @@ snapshots:
dependencies:
esbuild: 0.20.2
postcss: 8.5.3
rollup: 4.13.0
rollup: 4.41.1
optionalDependencies:
'@types/node': 20.10.5
fsevents: 2.3.3
@@ -25695,7 +25760,7 @@ snapshots:
dependencies:
esbuild: 0.20.2
postcss: 8.5.3
rollup: 4.13.0
rollup: 4.41.1
optionalDependencies:
'@types/node': 20.11.29
fsevents: 2.3.3
@@ -25705,7 +25770,7 @@ snapshots:
dependencies:
esbuild: 0.20.2
postcss: 8.5.3
rollup: 4.13.0
rollup: 4.41.1
optionalDependencies:
'@types/node': 20.14.8
fsevents: 2.3.3
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "web",
"version": "3.65.0",
"version": "3.65.2",
"private": true,
"license": "MIT",
"engines": {
+1 -1
View File
@@ -1 +1 @@
export const VERSION = "v3.65.0";
export const VERSION = "v3.65.2";
+2 -2
View File
@@ -134,11 +134,11 @@ const extractInputAndOutput = (
// Langfuse
input =
domain === "trace"
domain === "trace" && attributes[LangfuseOtelSpanAttributes.TRACE_INPUT]
? attributes[LangfuseOtelSpanAttributes.TRACE_INPUT]
: attributes[LangfuseOtelSpanAttributes.OBSERVATION_INPUT];
output =
domain === "trace"
domain === "trace" && attributes[LangfuseOtelSpanAttributes.TRACE_OUTPUT]
? attributes[LangfuseOtelSpanAttributes.TRACE_OUTPUT]
: attributes[LangfuseOtelSpanAttributes.OBSERVATION_OUTPUT];
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "worker",
"version": "3.65.0",
"version": "3.65.2",
"description": "",
"license": "MIT",
"private": true,
+1 -1
View File
@@ -1 +1 @@
export const VERSION = "v3.65.0";
export const VERSION = "v3.65.2";
+5
View File
@@ -232,6 +232,11 @@ const EnvSchema = z.object({
.enum(["true", "false"])
.default("false"),
// Whether to collect queue length metrics. Experimental flag to understand redis performance around this command.
LANGFUSE_COLLECT_QUEUE_LENGTH_METRICS: z
.enum(["true", "false"])
.default("true"),
LANGFUSE_S3_CONCURRENT_READS: z.coerce.number().positive().default(50),
LANGFUSE_CLICKHOUSE_PROJECT_DELETION_CONCURRENCY_DURATION_MS: z.coerce
.number()
+28 -21
View File
@@ -11,6 +11,7 @@ import {
redisQueueRetryOptions,
traceException,
} from "@langfuse/shared/src/server";
import { env } from "../env";
export class WorkerManager {
private static workers: { [key: string]: Worker } = {};
@@ -35,27 +36,33 @@ export class WorkerManager {
},
);
const result = await processor(job);
const queue = WorkerManager.getQueue(queueName);
await Promise.allSettled([
queue?.count().then((count) => {
recordGauge(
convertQueueNameToMetricName(queueName) + ".length",
count,
{
unit: "records",
},
);
}),
queue?.getFailedCount().then((count) => {
recordGauge(
convertQueueNameToMetricName(queueName) + ".dlq_length",
count,
{
unit: "records",
},
);
}),
]);
// Collect queue metrics if enabled (defaults to true)
const collectQueueMetrics =
env.LANGFUSE_COLLECT_QUEUE_LENGTH_METRICS !== "false";
if (collectQueueMetrics) {
const queue = WorkerManager.getQueue(queueName);
await Promise.allSettled([
queue?.count().then((count) => {
recordGauge(
convertQueueNameToMetricName(queueName) + ".length",
count,
{
unit: "records",
},
);
}),
queue?.getFailedCount().then((count) => {
recordGauge(
convertQueueNameToMetricName(queueName) + ".dlq_length",
count,
{
unit: "records",
},
);
}),
]);
}
recordHistogram(
convertQueueNameToMetricName(queueName) + ".processing_time",
Date.now() - startTime,