Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat: optionally upload all incoming events to S3 (#3488)

Steffen Schmitz278df5ab3c86
diff --git a/.env.prod.example b/.env.prod.example
index 052e0182cf..31cc87e965 100644
--- a/.env.prod.example
+++ b/.env.prod.example
@@ -100,6 +100,18 @@ ENCRYPTION_KEY="0000000000000000000000000000000000000000000000000000000000000000
# S3_REGION=
# BATCH_EXPORT_DOWNLOAD_LINK_EXPIRATION_HOURS=
+# S3 storage for events, optional, used to persist all incoming events
+# LANGFUSE_S3_EVENT_UPLOAD_ENABLED="true"
+# LANGFUSE_S3_EVENT_UPLOAD_BUCKET=
+# Optional prefix to be used within the bucket. Must end with `/` if set
+# LANGFUSE_S3_EVENT_UPLOAD_PREFIX=events/
+# The following four options are optional and fallback to the normal SDK credential provider chain if omitted
+# See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html
+# LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT=
+# LANGFUSE_S3_EVENT_UPLOAD_REGION=
+# LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID=
+# LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY=
+
# Exports are streamed to S3 in pages to avoid memory issues
# The page size can be adjusted if needed to optimize performance
# DB_EXPORT_PAGE_SIZE=1000
diff --git a/packages/shared/src/server/services/S3StorageService.ts b/packages/shared/src/server/services/S3StorageService.ts
index e52847d7fe..c16030c6c9 100644
--- a/packages/shared/src/server/services/S3StorageService.ts
+++ b/packages/shared/src/server/services/S3StorageService.ts
@@ -1,5 +1,9 @@
import type { Readable } from "stream";
-import { GetObjectCommand, S3Client } from "@aws-sdk/client-s3";
+import {
+ GetObjectCommand,
+ PutObjectCommand,
+ S3Client,
+} from "@aws-sdk/client-s3";
import { Upload } from "@aws-sdk/lib-storage";
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
import { logger } from "../logger";
@@ -16,20 +20,26 @@ export class S3StorageService {
private bucketName: string;
constructor(params: {
- accessKeyId: string;
- secretAccessKey: string;
+ accessKeyId: string | undefined;
+ secretAccessKey: string | undefined;
bucketName: string;
- endpoint: string;
- region: string;
+ endpoint: string | undefined;
+ region: string | undefined;
}) {
const { accessKeyId, secretAccessKey, bucketName, endpoint, region } =
params;
+ // Use accessKeyId and secretAccessKey if provided or fallback to default credentials
+ const credentials =
+ accessKeyId !== undefined && secretAccessKey !== undefined
+ ? {
+ accessKeyId,
+ secretAccessKey,
+ }
+ : undefined;
+
this.client = new S3Client({
- credentials: {
- accessKeyId,
- secretAccessKey,
- },
+ credentials,
endpoint,
region,
});
@@ -57,11 +67,27 @@ export class S3StorageService {
return { signedUrl };
} catch (err) {
- logger.error(err);
+ logger.error(`Failed to upload file to ${fileName}`, err);
throw new Error("Failed to upload to S3 or generate signed URL");
}
}
+ public async uploadJson(path: string, body: Record<string, unknown>) {
+ const putCommand = new PutObjectCommand({
+ Bucket: this.bucketName,
+ Key: path,
+ Body: JSON.stringify(body),
+ ContentType: "application/json",
+ });
+
+ try {
+ await this.client.send(putCommand);
+ } catch (err) {
+ logger.error(`Failed to upload JSON to S3 ${path}`, err);
+ throw Error("Failed to upload JSON to S3");
+ }
+ }
+
private async getSignedUrl(
fileName: string,
ttlSeconds: number,
@@ -77,6 +103,7 @@ export class S3StorageService {
{ expiresIn: ttlSeconds },
);
} catch (err) {
+ logger.error(`Failed to generate presigned URL for ${fileName}`, err);
throw Error("Failed to generate signed URL");
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 606a961d29..23f495275c 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -43,7 +43,7 @@ importers:
next-auth:
specifier: ^4.24.7
zod:
specifier: ^3.23.8
version: 3.23.8
@@ -95,7 +95,7 @@ importers:
'@vercel/style-guide':
specifier: ^6.0.0
eslint-config-next:
specifier: ^14.2.6
@@ -187,7 +187,7 @@ importers:
version: 4.17.21
next-auth:
specifier: ^4.24.7
nodemailer:
specifier: ^6.9.13
version: 6.9.13
@@ -360,6 +360,9 @@ importers:
'@opentelemetry/instrumentation':
specifier: ^0.52.1
version: 0.52.1(@opentelemetry/[email protected])
+ '@opentelemetry/instrumentation-aws-sdk':
+ specifier: ^0.44.0
+ version: 0.44.0(@opentelemetry/[email protected])
'@opentelemetry/instrumentation-http':
specifier: ^0.52.1
version: 0.52.1(@opentelemetry/[email protected])
@@ -572,7 +575,7 @@ importers:
next-auth:
specifier: ^4.24.7
next-query-params:
specifier: ^5.0.0
@@ -676,7 +679,7 @@ importers:
'@testing-library/jest-dom':
specifier: ^6.4.6
'@testing-library/react':
specifier: ^15.0.7
@@ -794,6 +797,9 @@ importers:
'@opentelemetry/instrumentation':
specifier: ^0.52.1
version: 0.52.1(@opentelemetry/[email protected])
+ '@opentelemetry/instrumentation-aws-sdk':
+ specifier: ^0.44.0
+ version: 0.44.0(@opentelemetry/[email protected])
'@opentelemetry/instrumentation-express':
specifier: ^0.41.1
version: 0.41.1(@opentelemetry/[email protected])
@@ -2572,6 +2578,10 @@ packages:
resolution: {integrity: sha512-qnSqB2DQ9TPP96dl8cDubDvrUyWc0/sK81xHTK8eSUspzDM3bsewX903qclQFvVhgStjRWdC5bLb3kQqMkfV5A==}
engines: {node: '>=14'}
+ '@opentelemetry/[email protected]':
+ resolution: {integrity: sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==}
+ engines: {node: '>=14'}
+
'@opentelemetry/[email protected]':
resolution: {integrity: sha512-O2yRJce1GOc6PAy3QxFM4NzFiWzvScDC1/5ihYBL6BUEVdq0XMWN01sppE+H6bBXbaFYipjwFLEWLg5PaSOThA==}
engines: {node: '>=8.0.0'}
@@ -2656,6 +2666,12 @@ packages:
peerDependencies:
'@opentelemetry/api': ^1.3.0
+ '@opentelemetry/[email protected]':
+ resolution: {integrity: sha512-HIWFg4TDQsayceiikOnruMmyQ0SZYW6WiR+wknWwWVLHC3lHTCpAnqzp5V42ckArOdlwHZu2Jvq2GMSM4Myx3w==}
+ engines: {node: '>=14'}
+ peerDependencies:
+ '@opentelemetry/api': ^1.3.0
+
'@opentelemetry/[email protected]':
resolution: {integrity: sha512-NKHuTIn1JrxfKZ8sVZjwT/bD3wyijkipiWzBvvxGj8pJJJNP5shVHWcEJhk5tQsfKQc4LproTAPdklex1o5/ag==}
engines: {node: '>=14'}
@@ -2986,6 +3002,12 @@ packages:
peerDependencies:
'@opentelemetry/api': ^1.3.0
+ '@opentelemetry/[email protected]':
+ resolution: {integrity: sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==}
+ engines: {node: '>=14'}
+ peerDependencies:
+ '@opentelemetry/api': ^1.3.0
+
'@opentelemetry/[email protected]':
resolution: {integrity: sha512-JUmjmrCmE1/fc4LjCQMqLfudgSl5OpUkzx7iA94b4jgeODM7zWxUoVXL7/CT7fWf47Cn+pmKjMvTCSESqZZ3mA==}
engines: {node: '>=14'}
@@ -3016,6 +3038,12 @@ packages:
peerDependencies:
'@opentelemetry/api': ^1.0.0
+ '@opentelemetry/[email protected]':
+ resolution: {integrity: sha512-rY4L/2LWNk5p/22zdunpqVmgz6uN419DsRTw5KFMa6u21tWhXS8devlMy4h8m8nnS20wM7r6yYweCNNKjgLYJw==}
+ engines: {node: '>=14'}
+ peerDependencies:
+ '@opentelemetry/api': ^1.0.0
+
'@opentelemetry/[email protected]':
resolution: {integrity: sha512-soZQdO9EAROMwa9bL2C0VLadbrfRjSA9t7g6X8sL0X1B8V59pzOayYMyTW9qTECn9uuJV98A7qOnJm6KH6yk8w==}
engines: {node: '>=14'}
@@ -3137,6 +3165,10 @@ packages:
resolution: {integrity: sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ==}
engines: {node: '>=14'}
+ '@opentelemetry/[email protected]':
+ resolution: {integrity: sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==}
+ engines: {node: '>=14'}
+
'@opentelemetry/[email protected]':
resolution: {integrity: sha512-nSDlnHSqzC3pXn/wZEZVLuAuJ1MYMXPBwtv2qAbCa3847SaHItdE7SzUq/Jtb0KZmh1zfAbNi3AAMjztTT4Ugg==}
engines: {node: '>=14'}
@@ -13000,42 +13032,6 @@ snapshots:
jest-util: 29.7.0
slash: 3.0.0
- dependencies:
- '@jest/console': 29.7.0
- '@jest/reporters': 29.7.0
- '@jest/test-result': 29.7.0
- '@jest/transform': 29.7.0
- '@jest/types': 29.6.3
- '@types/node': 20.14.8
- ansi-escapes: 4.3.2
- chalk: 4.1.2
- ci-info: 3.9.0
- exit: 0.1.2
- graceful-fs: 4.2.11
- jest-changed-files: 29.7.0
- jest-config: 29.7.0(@types/[email protected])
- jest-haste-map: 29.7.0
- jest-message-util: 29.7.0
- jest-regex-util: 29.6.3
- jest-resolve: 29.7.0
- jest-resolve-dependencies: 29.7.0
- jest-runner: 29.7.0
- jest-runtime: 29.7.0
- jest-snapshot: 29.7.0
- jest-util: 29.7.0
- jest-validate: 29.7.0
- jest-watcher: 29.7.0
- micromatch: 4.0.8
- pretty-format: 29.7.0
- slash: 3.0.0
- strip-ansi: 6.0.1
- transitivePeerDependencies:
- - babel-plugin-macros
- - supports-color
- - ts-node
- optional: true
-
dependencies:
'@jest/console': 29.7.0
@@ -13507,7 +13503,7 @@ snapshots:
dependencies:
'@prisma/client': 5.17.0([email protected])
'@next/[email protected]': {}
@@ -13640,6 +13636,10 @@ snapshots:
dependencies:
'@opentelemetry/api': 1.8.0
+ '@opentelemetry/[email protected]':
+ dependencies:
+ '@opentelemetry/api': 1.8.0
+
'@opentelemetry/[email protected]': {}
'@opentelemetry/[email protected]': {}
@@ -13796,6 +13796,16 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ '@opentelemetry/[email protected](@opentelemetry/[email protected])':
+ dependencies:
+ '@opentelemetry/api': 1.8.0
+ '@opentelemetry/core': 1.25.1(@opentelemetry/[email protected])
+ '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/[email protected])
+ '@opentelemetry/propagation-utils': 0.30.11(@opentelemetry/[email protected])
+ '@opentelemetry/semantic-conventions': 1.27.0
+ transitivePeerDependencies:
+ - supports-color
+
'@opentelemetry/[email protected](@opentelemetry/[email protected])':
dependencies:
'@opentelemetry/api': 1.8.0
@@ -13828,7 +13838,7 @@ snapshots:
'@opentelemetry/api': 1.9.0
'@opentelemetry/core': 1.25.1(@opentelemetry/[email protected])
'@opentelemetry/instrumentation': 0.52.1(@opentelemetry/[email protected])
- '@opentelemetry/semantic-conventions': 1.25.1
+ '@opentelemetry/semantic-conventions': 1.27.0
'@types/connect': 3.4.36
transitivePeerDependencies:
- supports-color
@@ -13898,7 +13908,7 @@ snapshots:
'@opentelemetry/api': 1.9.0
'@opentelemetry/core': 1.25.1(@opentelemetry/[email protected])
'@opentelemetry/instrumentation': 0.52.1(@opentelemetry/[email protected])
- '@opentelemetry/semantic-conventions': 1.25.1
+ '@opentelemetry/semantic-conventions': 1.27.0
transitivePeerDependencies:
- supports-color
@@ -13964,7 +13974,7 @@ snapshots:
'@opentelemetry/api': 1.9.0
'@opentelemetry/core': 1.25.1(@opentelemetry/[email protected])
'@opentelemetry/instrumentation': 0.52.1(@opentelemetry/[email protected])
- '@opentelemetry/semantic-conventions': 1.25.1
+ '@opentelemetry/semantic-conventions': 1.27.0
transitivePeerDependencies:
- supports-color
@@ -14050,7 +14060,7 @@ snapshots:
'@opentelemetry/api': 1.9.0
'@opentelemetry/core': 1.25.1(@opentelemetry/[email protected])
'@opentelemetry/instrumentation': 0.52.1(@opentelemetry/[email protected])
- '@opentelemetry/semantic-conventions': 1.25.1
+ '@opentelemetry/semantic-conventions': 1.27.0
transitivePeerDependencies:
- supports-color
@@ -14084,7 +14094,7 @@ snapshots:
'@opentelemetry/api': 1.9.0
'@opentelemetry/instrumentation': 0.52.1(@opentelemetry/[email protected])
'@opentelemetry/sdk-metrics': 1.23.0(@opentelemetry/[email protected])
- '@opentelemetry/semantic-conventions': 1.25.1
+ '@opentelemetry/semantic-conventions': 1.27.0
transitivePeerDependencies:
- supports-color
@@ -14102,7 +14112,7 @@ snapshots:
'@opentelemetry/api': 1.9.0
'@opentelemetry/core': 1.25.1(@opentelemetry/[email protected])
'@opentelemetry/instrumentation': 0.52.1(@opentelemetry/[email protected])
- '@opentelemetry/semantic-conventions': 1.25.1
+ '@opentelemetry/semantic-conventions': 1.27.0
transitivePeerDependencies:
- supports-color
@@ -14119,7 +14129,7 @@ snapshots:
dependencies:
'@opentelemetry/api': 1.9.0
'@opentelemetry/instrumentation': 0.52.1(@opentelemetry/[email protected])
- '@opentelemetry/semantic-conventions': 1.25.1
+ '@opentelemetry/semantic-conventions': 1.27.0
'@opentelemetry/sql-common': 0.40.1(@opentelemetry/[email protected])
transitivePeerDependencies:
- supports-color
@@ -14137,7 +14147,7 @@ snapshots:
dependencies:
'@opentelemetry/api': 1.9.0
'@opentelemetry/instrumentation': 0.52.1(@opentelemetry/[email protected])
- '@opentelemetry/semantic-conventions': 1.25.1
+ '@opentelemetry/semantic-conventions': 1.27.0
'@types/mysql': 2.15.22
transitivePeerDependencies:
- supports-color
@@ -14154,7 +14164,7 @@ snapshots:
dependencies:
'@opentelemetry/api': 1.9.0
'@opentelemetry/instrumentation': 0.52.1(@opentelemetry/[email protected])
- '@opentelemetry/semantic-conventions': 1.25.1
+ '@opentelemetry/semantic-conventions': 1.27.0
transitivePeerDependencies:
- supports-color
@@ -14181,7 +14191,7 @@ snapshots:
dependencies:
'@opentelemetry/api': 1.9.0
'@opentelemetry/instrumentation': 0.52.1(@opentelemetry/[email protected])
- '@opentelemetry/semantic-conventions': 1.25.1
+ '@opentelemetry/semantic-conventions': 1.27.0
'@opentelemetry/sql-common': 0.40.1(@opentelemetry/[email protected])
'@types/pg': 8.6.1
'@types/pg-pool': 2.0.4
@@ -14209,7 +14219,7 @@ snapshots:
'@opentelemetry/api': 1.9.0
'@opentelemetry/instrumentation': 0.52.1(@opentelemetry/[email protected])
'@opentelemetry/redis-common': 0.36.2
- '@opentelemetry/semantic-conventions': 1.25.1
+ '@opentelemetry/semantic-conventions': 1.27.0
transitivePeerDependencies:
- supports-color
@@ -14328,6 +14338,18 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ '@opentelemetry/[email protected](@opentelemetry/[email protected])':
+ dependencies:
+ '@opentelemetry/api': 1.8.0
+ '@opentelemetry/api-logs': 0.53.0
+ '@types/shimmer': 1.2.0
+ import-in-the-middle: 1.11.0
+ require-in-the-middle: 7.4.0
+ semver: 7.6.3
+ shimmer: 1.2.1
+ transitivePeerDependencies:
+ - supports-color
+
'@opentelemetry/[email protected](@opentelemetry/[email protected])':
dependencies:
'@opentelemetry/api': 1.8.0
@@ -14362,6 +14384,10 @@ snapshots:
dependencies:
'@opentelemetry/api': 1.8.0
+ '@opentelemetry/[email protected](@opentelemetry/[email protected])':
+ dependencies:
+ '@opentelemetry/api': 1.8.0
+
'@opentelemetry/[email protected](@opentelemetry/[email protected])':
dependencies:
'@opentelemetry/api': 1.8.0
@@ -14528,6 +14554,8 @@ snapshots:
'@opentelemetry/[email protected]': {}
+ '@opentelemetry/[email protected]': {}
+
'@opentelemetry/[email protected](@opentelemetry/[email protected])':
dependencies:
'@opentelemetry/api': 1.8.0
@@ -15825,10 +15853,10 @@ snapshots:
'@opentelemetry/instrumentation-redis-4': 0.41.0(@opentelemetry/[email protected])
'@opentelemetry/resources': 1.25.1(@opentelemetry/[email protected])
'@opentelemetry/sdk-trace-base': 1.25.1(@opentelemetry/[email protected])
- '@opentelemetry/semantic-conventions': 1.25.1
+ '@opentelemetry/semantic-conventions': 1.27.0
'@prisma/instrumentation': 5.17.0
'@sentry/core': 8.26.0
- '@sentry/opentelemetry': 8.26.0(@opentelemetry/[email protected])(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected])
+ '@sentry/opentelemetry': 8.26.0(@opentelemetry/[email protected])(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected])
'@sentry/types': 8.26.0
'@sentry/utils': 8.26.0
import-in-the-middle: 1.11.0
@@ -15848,13 +15876,13 @@ snapshots:
'@sentry/types': 8.26.0
'@sentry/utils': 8.26.0
- '@sentry/[email protected](@opentelemetry/[email protected])(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected])':
+ '@sentry/[email protected](@opentelemetry/[email protected])(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected])':
dependencies:
'@opentelemetry/api': 1.9.0
- '@opentelemetry/core': 1.25.1(@opentelemetry/[email protected])
- '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/[email protected])
- '@opentelemetry/sdk-trace-base': 1.25.1(@opentelemetry/[email protected])
- '@opentelemetry/semantic-conventions': 1.25.1
+ '@opentelemetry/core': 1.25.1(@opentelemetry/[email protected])
+ '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/[email protected])
+ '@opentelemetry/sdk-trace-base': 1.25.1(@opentelemetry/[email protected])
+ '@opentelemetry/semantic-conventions': 1.27.0
'@sentry/core': 8.26.0
'@sentry/types': 8.26.0
'@sentry/utils': 8.26.0
@@ -16465,7 +16493,7 @@ snapshots:
lz-string: 1.5.0
pretty-format: 27.5.1
dependencies:
'@adobe/css-tools': 4.4.0
'@babel/runtime': 7.24.7
@@ -16479,7 +16507,7 @@ snapshots:
'@jest/globals': 29.7.0
'@types/jest': 29.5.12
- vitest: 1.5.3(@types/[email protected])
dependencies:
@@ -16721,7 +16749,7 @@ snapshots:
dependencies:
- '@types/node': 20.10.5
+ '@types/node': 20.14.8
'@types/[email protected]': {}
@@ -17255,7 +17283,7 @@ snapshots:
'@ungap/[email protected]': {}
dependencies:
'@babel/core': 7.24.3
'@babel/eslint-parser': 7.24.1(@babel/[email protected])([email protected])
@@ -17263,19 +17291,19 @@ snapshots:
'@typescript-eslint/eslint-plugin': 7.3.1(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])
'@typescript-eslint/parser': 7.12.0([email protected])([email protected])
eslint-config-prettier: 9.1.0([email protected])
- eslint-import-resolver-alias: 1.1.2([email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected]))
- eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])
eslint-plugin-eslint-comments: 3.2.0([email protected])
eslint-plugin-jsx-a11y: 6.8.0([email protected])
eslint-plugin-react: 7.34.1([email protected])
eslint-plugin-react-hooks: 4.6.0([email protected])
eslint-plugin-testing-library: 6.2.0([email protected])([email protected])
eslint-plugin-tsdoc: 0.2.17
eslint-plugin-unicorn: 51.0.1([email protected])
prettier-plugin-packagejson: 2.4.12([email protected])
optionalDependencies:
'@next/eslint-plugin-next': 14.2.6
@@ -18304,13 +18332,13 @@ snapshots:
crc-32: 1.2.2
readable-stream: 3.6.2
dependencies:
'@jest/types': 29.6.3
chalk: 4.1.2
exit: 0.1.2
graceful-fs: 4.2.11
- jest-config: 29.7.0(@types/[email protected])
jest-util: 29.7.0
prompts: 2.4.2
transitivePeerDependencies:
@@ -18318,15 +18346,14 @@ snapshots:
- babel-plugin-macros
- supports-color
- ts-node
- optional: true
dependencies:
'@jest/types': 29.6.3
chalk: 4.1.2
exit: 0.1.2
graceful-fs: 4.2.11
jest-util: 29.7.0
prompts: 2.4.2
transitivePeerDependencies:
@@ -18334,6 +18361,7 @@ snapshots:
- babel-plugin-macros
- supports-color
- ts-node
+ optional: true
@@ -18974,7 +19002,7 @@ snapshots:
eslint: 8.57.0
eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])([email protected])
eslint-plugin-jsx-a11y: 6.8.0([email protected])
eslint-plugin-react: 7.34.1([email protected])
eslint-plugin-react-hooks: 4.6.0([email protected])
@@ -18991,7 +19019,7 @@ snapshots:
dependencies:
eslint: 8.57.0
eslint-plugin-n: 16.6.2([email protected])
eslint-plugin-promise: 6.4.0([email protected])
@@ -19000,9 +19028,9 @@ snapshots:
eslint: 8.57.0
eslint-plugin-turbo: 1.13.4([email protected])
dependencies:
dependencies:
@@ -19012,13 +19040,13 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
debug: 4.3.6
enhanced-resolve: 5.17.1
eslint: 8.57.0
fast-glob: 3.3.2
get-tsconfig: 4.8.0
is-core-module: 2.15.1
@@ -19035,7 +19063,7 @@ snapshots:
enhanced-resolve: 5.17.1
eslint: 8.57.0
fast-glob: 3.3.2
get-tsconfig: 4.8.0
is-core-module: 2.15.1
@@ -19046,14 +19074,14 @@ snapshots:
- eslint-import-resolver-webpack
- supports-color
dependencies:
debug: 3.2.7
optionalDependencies:
'@typescript-eslint/parser': 7.12.0([email protected])([email protected])
eslint: 8.57.0
eslint-import-resolver-node: 0.3.9
- eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])
transitivePeerDependencies:
- supports-color
@@ -19081,7 +19109,7 @@ snapshots:
eslint: 8.57.0
ignore: 5.3.1
dependencies:
array-includes: 3.1.7
array.prototype.findlastindex: 1.2.4
@@ -19091,7 +19119,7 @@ snapshots:
doctrine: 2.1.0
eslint: 8.57.0
eslint-import-resolver-node: 0.3.9
hasown: 2.0.2
is-core-module: 2.15.1
is-glob: 4.0.3
@@ -19108,13 +19136,13 @@ snapshots:
- eslint-import-resolver-webpack
- supports-color
dependencies:
'@typescript-eslint/utils': 5.62.0([email protected])([email protected])
eslint: 8.57.0
optionalDependencies:
'@typescript-eslint/eslint-plugin': 7.3.1(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])
- jest: 29.7.0
+ jest: 29.7.0(@types/[email protected])([email protected])
transitivePeerDependencies:
- supports-color
- typescript
@@ -19156,12 +19184,12 @@ snapshots:
dependencies:
eslint: 8.57.0
globals: 13.24.0
optionalDependencies:
dependencies:
@@ -19243,13 +19271,13 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@typescript-eslint/utils': 7.3.1([email protected])([email protected])
eslint: 8.57.0
optionalDependencies:
'@typescript-eslint/eslint-plugin': 7.3.1(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])
transitivePeerDependencies:
- supports-color
- typescript
@@ -20503,16 +20531,16 @@ snapshots:
- babel-plugin-macros
- supports-color
dependencies:
- '@jest/core': 29.7.0
'@jest/test-result': 29.7.0
'@jest/types': 29.6.3
chalk: 4.1.2
- create-jest: 29.7.0
exit: 0.1.2
import-local: 3.1.0
- jest-config: 29.7.0(@types/[email protected])
jest-util: 29.7.0
jest-validate: 29.7.0
yargs: 17.7.2
@@ -20521,18 +20549,17 @@ snapshots:
- babel-plugin-macros
- supports-color
- ts-node
- optional: true
dependencies:
'@jest/test-result': 29.7.0
'@jest/types': 29.6.3
chalk: 4.1.2
+ create-jest: 29.7.0(@types/[email protected])([email protected])
exit: 0.1.2
import-local: 3.1.0
jest-util: 29.7.0
jest-validate: 29.7.0
yargs: 17.7.2
@@ -20541,6 +20568,7 @@ snapshots:
- babel-plugin-macros
- supports-color
- ts-node
+ optional: true
dependencies:
@@ -20573,37 +20601,6 @@ snapshots:
- babel-plugin-macros
- supports-color
- dependencies:
- '@babel/core': 7.24.3
- '@jest/test-sequencer': 29.7.0
- '@jest/types': 29.6.3
- babel-jest: 29.7.0(@babel/[email protected])
- chalk: 4.1.2
- ci-info: 3.9.0
- deepmerge: 4.3.1
- glob: 7.2.3
- graceful-fs: 4.2.11
- jest-circus: 29.7.0([email protected])
- jest-environment-node: 29.7.0
- jest-get-type: 29.6.3
- jest-regex-util: 29.6.3
- jest-resolve: 29.7.0
- jest-runner: 29.7.0
- jest-util: 29.7.0
- jest-validate: 29.7.0
- micromatch: 4.0.8
- parse-json: 5.2.0
- pretty-format: 29.7.0
- slash: 3.0.0
- strip-json-comments: 3.1.1
- optionalDependencies:
- '@types/node': 20.14.8
- transitivePeerDependencies:
- - babel-plugin-macros
- - supports-color
- optional: true
-
dependencies:
'@babel/core': 7.24.3
@@ -20860,7 +20857,7 @@ snapshots:
dependencies:
- '@types/node': 20.10.5
+ '@types/node': 20.14.8
merge-stream: 2.0.0
supports-color: 8.1.1
@@ -20871,30 +20868,30 @@ snapshots:
merge-stream: 2.0.0
supports-color: 8.1.1
dependencies:
- '@jest/core': 29.7.0
'@jest/types': 29.6.3
import-local: 3.1.0
- jest-cli: 29.7.0
transitivePeerDependencies:
- '@types/node'
- babel-plugin-macros
- supports-color
- ts-node
- optional: true
dependencies:
'@jest/types': 29.6.3
import-local: 3.1.0
+ jest-cli: 29.7.0(@types/[email protected])([email protected])
transitivePeerDependencies:
- '@types/node'
- babel-plugin-macros
- supports-color
- ts-node
+ optional: true
@@ -21807,7 +21804,7 @@ snapshots:
dependencies:
type-fest: 2.19.0
dependencies:
'@babel/runtime': 7.24.5
'@panva/hkdf': 1.1.1
@@ -22090,7 +22087,7 @@ snapshots:
dependencies:
'@opentelemetry/api': 1.9.0
'@opentelemetry/instrumentation': 0.46.0(@opentelemetry/[email protected])
- '@opentelemetry/semantic-conventions': 1.25.1
+ '@opentelemetry/semantic-conventions': 1.27.0
transitivePeerDependencies:
- supports-color
optional: true
@@ -24232,13 +24229,13 @@ snapshots:
d3-time: 3.1.0
d3-timer: 3.0.1
dependencies:
cac: 6.7.14
debug: 4.3.5([email protected])
pathe: 1.1.2
picocolors: 1.0.1
- vite: 5.2.13(@types/[email protected])
+ vite: 5.2.13(@types/[email protected])([email protected])
transitivePeerDependencies:
- '@types/node'
- less
@@ -24267,7 +24264,25 @@ snapshots:
- supports-color
- terser
+ dependencies:
+ cac: 6.7.14
+ debug: 4.3.5([email protected])
+ pathe: 1.1.2
+ picocolors: 1.0.1
+ vite: 5.2.13(@types/[email protected])([email protected])
+ transitivePeerDependencies:
+ - '@types/node'
+ - less
+ - lightningcss
+ - sass
+ - stylus
+ - sugarss
+ - supports-color
+ - terser
+ optional: true
+
dependencies:
esbuild: 0.20.2
postcss: 8.4.41
@@ -24275,6 +24290,7 @@ snapshots:
optionalDependencies:
'@types/node': 20.10.5
fsevents: 2.3.3
+ terser: 5.33.0
optional: true
@@ -24287,7 +24303,18 @@ snapshots:
fsevents: 2.3.3
terser: 5.33.0
+ dependencies:
+ esbuild: 0.20.2
+ postcss: 8.4.41
+ rollup: 4.13.0
+ optionalDependencies:
+ '@types/node': 20.14.8
+ fsevents: 2.3.3
+ terser: 5.33.0
+ optional: true
+
dependencies:
esbuild: 0.20.2
postcss: 8.4.38
@@ -24295,6 +24322,7 @@ snapshots:
optionalDependencies:
'@types/node': 20.10.5
fsevents: 2.3.3
+ terser: 5.33.0
optional: true
@@ -24307,7 +24335,18 @@ snapshots:
fsevents: 2.3.3
terser: 5.33.0
+ dependencies:
+ esbuild: 0.20.2
+ postcss: 8.4.38
+ rollup: 4.13.0
+ optionalDependencies:
+ '@types/node': 20.14.8
+ fsevents: 2.3.3
+ terser: 5.33.0
+ optional: true
+
dependencies:
'@vitest/expect': 1.5.3
'@vitest/runner': 1.5.3
@@ -24326,11 +24365,12 @@ snapshots:
strip-literal: 2.0.0
tinybench: 2.6.0
tinypool: 0.8.4
- vite: 5.2.11(@types/[email protected])
- vite-node: 1.5.3(@types/[email protected])
+ vite: 5.2.11(@types/[email protected])([email protected])
+ vite-node: 1.5.3(@types/[email protected])([email protected])
why-is-node-running: 2.2.2
optionalDependencies:
'@types/node': 20.10.5
+ jsdom: 20.0.3
transitivePeerDependencies:
- less
- lightningcss
@@ -24375,6 +24415,41 @@ snapshots:
- supports-color
- terser
+ dependencies:
+ '@vitest/expect': 1.5.3
+ '@vitest/runner': 1.5.3
+ '@vitest/snapshot': 1.5.3
+ '@vitest/spy': 1.5.3
+ '@vitest/utils': 1.5.3
+ acorn-walk: 8.3.2
+ chai: 4.4.1
+ debug: 4.3.4
+ execa: 8.0.1
+ local-pkg: 0.5.0
+ magic-string: 0.30.10
+ pathe: 1.1.2
+ picocolors: 1.0.0
+ std-env: 3.7.0
+ strip-literal: 2.0.0
+ tinybench: 2.6.0
+ tinypool: 0.8.4
+ vite: 5.2.11(@types/[email protected])([email protected])
+ vite-node: 1.5.3(@types/[email protected])([email protected])
+ why-is-node-running: 2.2.2
+ optionalDependencies:
+ '@types/node': 20.14.8
+ jsdom: 20.0.3
+ transitivePeerDependencies:
+ - less
+ - lightningcss
+ - sass
+ - stylus
+ - sugarss
+ - supports-color
+ - terser
+ optional: true
+
dependencies:
'@vue/compiler-dom': 3.4.27
diff --git a/web/package.json b/web/package.json
index e9b6322c19..6409347e49 100644
--- a/web/package.json
+++ b/web/package.json
@@ -48,6 +48,7 @@
"@opentelemetry/context-async-hooks": "^1.25.1",
"@opentelemetry/core": "^1.14.0",
"@opentelemetry/instrumentation": "^0.52.1",
+ "@opentelemetry/instrumentation-aws-sdk": "^0.44.0",
"@opentelemetry/instrumentation-http": "^0.52.1",
"@opentelemetry/instrumentation-ioredis": "^0.42.0",
"@opentelemetry/instrumentation-undici": "^0.4.0",
diff --git a/web/src/datadog.server.config.ts b/web/src/datadog.server.config.ts
index bf0aa3a539..43bc362f48 100644
--- a/web/src/datadog.server.config.ts
+++ b/web/src/datadog.server.config.ts
@@ -10,6 +10,7 @@ import opentelemetry from "@opentelemetry/api";
import { UndiciInstrumentation } from "@opentelemetry/instrumentation-undici";
import { logger } from "@langfuse/shared/src/server";
import { WinstonInstrumentation } from "@opentelemetry/instrumentation-winston";
+import { AwsInstrumentation } from "@opentelemetry/instrumentation-aws-sdk";
if (!process.env.VERCEL && process.env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION) {
logger.info("Initializing otel tracing");
@@ -53,6 +54,7 @@ if (!process.env.VERCEL && process.env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION) {
new IORedisInstrumentation(),
new HttpInstrumentation(),
new PrismaInstrumentation(),
+ new AwsInstrumentation(),
new WinstonInstrumentation({ disableLogSending: true }),
getNodeAutoInstrumentations(),
new UndiciInstrumentation(),
diff --git a/web/src/env.mjs b/web/src/env.mjs
index 0d6e6eab3a..095f1a859d 100644
--- a/web/src/env.mjs
+++ b/web/src/env.mjs
@@ -148,6 +148,15 @@ export const env = createEnv({
// langfuse caching
LANGFUSE_CACHE_API_KEY_ENABLED: z.enum(["true", "false"]).default("false"),
LANGFUSE_CACHE_API_KEY_TTL_SECONDS: z.coerce.number().default(120),
+ LANGFUSE_S3_EVENT_UPLOAD_ENABLED: z
+ .enum(["true", "false"])
+ .default("false"),
+ LANGFUSE_S3_EVENT_UPLOAD_BUCKET: z.string().optional(),
+ LANGFUSE_S3_EVENT_UPLOAD_PREFIX: z.string().default(""),
+ LANGFUSE_S3_EVENT_UPLOAD_REGION: z.string().optional(),
+ LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT: z.string().optional(),
+ LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID: z.string().optional(),
+ LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY: z.string().optional(),
LANGFUSE_ASYNC_INGESTION_PROCESSING: z
.enum(["true", "false"])
.default("false"),
@@ -291,6 +300,21 @@ export const env = createEnv({
S3_SECRET_ACCESS_KEY: process.env.S3_SECRET_ACCESS_KEY,
S3_BUCKET_NAME: process.env.S3_BUCKET_NAME,
S3_REGION: process.env.S3_REGION,
+ // S3 event upload
+ LANGFUSE_S3_EVENT_UPLOAD_ENABLED:
+ process.env.LANGFUSE_S3_EVENT_UPLOAD_ENABLED,
+ LANGFUSE_S3_EVENT_UPLOAD_BUCKET:
+ process.env.LANGFUSE_S3_EVENT_UPLOAD_BUCKET,
+ LANGFUSE_S3_EVENT_UPLOAD_PREFIX:
+ process.env.LANGFUSE_S3_EVENT_UPLOAD_PREFIX,
+ LANGFUSE_S3_EVENT_UPLOAD_REGION:
+ process.env.LANGFUSE_S3_EVENT_UPLOAD_REGION,
+ LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT:
+ process.env.LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT,
+ LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID:
+ process.env.LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID,
+ LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY:
+ process.env.LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY,
// Database exports
DB_EXPORT_PAGE_SIZE: process.env.DB_EXPORT_PAGE_SIZE,
// Worker
@@ -311,8 +335,10 @@ export const env = createEnv({
LANGFUSE_UI_DOCUMENTATION_HREF: process.env.LANGFUSE_UI_DOCUMENTATION_HREF,
LANGFUSE_UI_SUPPORT_HREF: process.env.LANGFUSE_UI_SUPPORT_HREF,
LANGFUSE_UI_FEEDBACK_HREF: process.env.LANGFUSE_UI_FEEDBACK_HREF,
- LANGFUSE_UI_LOGO_LIGHT_MODE_HREF: process.env.LANGFUSE_UI_LOGO_LIGHT_MODE_HREF,
- LANGFUSE_UI_LOGO_DARK_MODE_HREF: process.env.LANGFUSE_UI_LOGO_DARK_MODE_HREF,
+ LANGFUSE_UI_LOGO_LIGHT_MODE_HREF:
+ process.env.LANGFUSE_UI_LOGO_LIGHT_MODE_HREF,
+ LANGFUSE_UI_LOGO_DARK_MODE_HREF:
+ process.env.LANGFUSE_UI_LOGO_DARK_MODE_HREF,
// EE License
LANGFUSE_EE_LICENSE_KEY: process.env.LANGFUSE_EE_LICENSE_KEY,
ADMIN_API_KEY: process.env.ADMIN_API_KEY,
@@ -342,8 +368,10 @@ export const env = createEnv({
LANGFUSE_INIT_ORG_NAME: process.env.LANGFUSE_INIT_ORG_NAME,
LANGFUSE_INIT_PROJECT_ID: process.env.LANGFUSE_INIT_PROJECT_ID,
LANGFUSE_INIT_PROJECT_NAME: process.env.LANGFUSE_INIT_PROJECT_NAME,
- LANGFUSE_INIT_PROJECT_PUBLIC_KEY: process.env.LANGFUSE_INIT_PROJECT_PUBLIC_KEY,
- LANGFUSE_INIT_PROJECT_SECRET_KEY: process.env.LANGFUSE_INIT_PROJECT_SECRET_KEY,
+ LANGFUSE_INIT_PROJECT_PUBLIC_KEY:
+ process.env.LANGFUSE_INIT_PROJECT_PUBLIC_KEY,
+ LANGFUSE_INIT_PROJECT_SECRET_KEY:
+ process.env.LANGFUSE_INIT_PROJECT_SECRET_KEY,
LANGFUSE_INIT_USER_EMAIL: process.env.LANGFUSE_INIT_USER_EMAIL,
LANGFUSE_INIT_USER_NAME: process.env.LANGFUSE_INIT_USER_NAME,
LANGFUSE_INIT_USER_PASSWORD: process.env.LANGFUSE_INIT_USER_PASSWORD,
diff --git a/web/src/pages/api/public/ingestion.ts b/web/src/pages/api/public/ingestion.ts
index d5ee643ff6..e8e2e62c2d 100644
--- a/web/src/pages/api/public/ingestion.ts
+++ b/web/src/pages/api/public/ingestion.ts
@@ -15,6 +15,8 @@ import {
getCurrentSpan,
LegacyIngestionQueue,
addTraceContext,
+ S3StorageService,
+ instrumentAsync,
} from "@langfuse/shared/src/server";
import {
SdkLogProcessor,
@@ -23,7 +25,6 @@ import {
ScoreProcessor,
TraceProcessor,
} from "@langfuse/shared/src/server";
-import { isNotNullOrUndefined } from "@/src/utils/types";
import { telemetry } from "@/src/features/telemetry";
import { jsonSchema } from "@langfuse/shared";
import { isPrismaException } from "@/src/utils/exceptions";
@@ -67,7 +68,9 @@ export default async function handler(
redis,
).verifyAuthHeaderAndReturnScope(req.headers.authorization);
- if (!authCheck.validKey) throw new UnauthorizedError(authCheck.error);
+ if (!authCheck.validKey) {
+ throw new UnauthorizedError(authCheck.error);
+ }
const rateLimitCheck = await new RateLimitService(redis).rateLimitRequest(
authCheck.scope,
@@ -123,8 +126,8 @@ export default async function handler(
const validationErrors: { id: string; error: unknown }[] = [];
- const batch: (z.infer<typeof ingestionEvent> | undefined)[] =
- parsedSchema.data.batch.map((event) => {
+ const batch: z.infer<typeof ingestionEvent>[] = parsedSchema.data.batch
+ .flatMap((event) => {
const parsed = instrumentSync(
{ name: "ingestion-zod-parse-individual-event" },
(span) => {
@@ -145,17 +148,58 @@ export default async function handler(
: "unknown",
error: new InvalidRequestError(parsed.error.message),
});
- return undefined;
- } else {
- return parsed.data;
+ return [];
}
+ return [parsed.data];
+ })
+ .flatMap((event) => {
+ if (event.type === eventTypes.SDK_LOG) {
+ // Log SDK_LOG events, but remove them from further processing
+ logger.info("SDK Log Event", { event });
+ return [];
+ }
+ return [event];
});
- const filteredBatch: z.infer<typeof ingestionEvent>[] =
- batch.filter(isNotNullOrUndefined);
await telemetry();
- const sortedBatch = sortBatch(filteredBatch);
+ const sortedBatch = sortBatch(batch);
+
+ if (env.LANGFUSE_S3_EVENT_UPLOAD_ENABLED === "true") {
+ await instrumentAsync({ name: "s3-upload-events" }, async () => {
+ if (env.LANGFUSE_S3_EVENT_UPLOAD_BUCKET === undefined) {
+ logger.warn(
+ "S3 event upload activated, but no bucket configured. Skipping upload.",
+ );
+ } else {
+ const s3Client = new S3StorageService({
+ accessKeyId: env.LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID,
+ secretAccessKey: env.LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY,
+ bucketName: env.LANGFUSE_S3_EVENT_UPLOAD_BUCKET,
+ endpoint: env.LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT,
+ region: env.LANGFUSE_S3_EVENT_UPLOAD_REGION,
+ });
+ const results = await Promise.allSettled(
+ sortedBatch.map(async (event) => {
+ const eventName = event.type.split("-").shift();
+ return event.type !== eventTypes.SDK_LOG
+ ? s3Client.uploadJson(
+ `${env.LANGFUSE_S3_EVENT_UPLOAD_PREFIX}${authCheck.scope.projectId}/${eventName}/${event.body.id}/${event.id}.json`,
+ event,
+ )
+ : Promise.resolve();
+ }),
+ );
+ results.forEach((result) => {
+ if (result.status === "rejected") {
+ logger.error("Failed to upload event to S3", {
+ error: result.reason,
+ });
+ }
+ });
+ }
+ });
+ }
if (env.LANGFUSE_ASYNC_INGESTION_PROCESSING === "true" && redis) {
// this function MUST NOT return but send the HTTP response directly
@@ -303,7 +347,6 @@ const accessCheckPerEvent = (
/**
* Sorts a batch of ingestion events. Orders by: updating events last, sorted by timestamp asc.
*/
-
const sortBatch = (batch: Array<z.infer<typeof ingestionEvent>>) => {
const updateEvents: (typeof eventTypes)[keyof typeof eventTypes][] = [
eventTypes.GENERATION_UPDATE,
diff --git a/worker/package.json b/worker/package.json
index ed87c8da68..4e9687e3d1 100644
--- a/worker/package.json
+++ b/worker/package.json
@@ -26,6 +26,7 @@
"@opentelemetry/auto-instrumentations-node": "^0.44.0",
"@opentelemetry/context-async-hooks": "^1.25.1",
"@opentelemetry/instrumentation": "^0.52.1",
+ "@opentelemetry/instrumentation-aws-sdk": "^0.44.0",
"@opentelemetry/instrumentation-express": "^0.41.1",
"@opentelemetry/instrumentation-http": "^0.52.1",
"@opentelemetry/instrumentation-ioredis": "^0.42.0",
diff --git a/worker/src/instrumentation.ts b/worker/src/instrumentation.ts
index c251a93f70..c4bcfb229c 100644
--- a/worker/src/instrumentation.ts
+++ b/worker/src/instrumentation.ts
@@ -9,6 +9,7 @@ import { AsyncHooksContextManager } from "@opentelemetry/context-async-hooks";
import opentelemetry from "@opentelemetry/api";
import { UndiciInstrumentation } from "@opentelemetry/instrumentation-undici";
import { WinstonInstrumentation } from "@opentelemetry/instrumentation-winston";
+import { AwsInstrumentation } from "@opentelemetry/instrumentation-aws-sdk";
// import { BullMQInstrumentation } from "@appsignal/opentelemetry-instrumentation-bullmq";
const contextManager = new AsyncHooksContextManager().enable();
@@ -27,6 +28,7 @@ registerInstrumentations({
new HttpInstrumentation(),
new ExpressInstrumentation(),
new PrismaInstrumentation(),
+ new AwsInstrumentation(),
new WinstonInstrumentation({ disableLogSending: true }),
getNodeAutoInstrumentations(),
new UndiciInstrumentation(),