Skip to content

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

fix: remove betterstack (#2575)

Max Deichmannd9659ee33954
diff --git a/.env.prod.example b/.env.prod.example
index b335f66c55..6452670f80 100644
--- a/.env.prod.example
+++ b/.env.prod.example
@@ -142,9 +142,6 @@ LANGFUSE_CSP_ENFORCE_HTTPS="true"
# NEXT_PUBLIC_TURNSTILE_SITE_KEY=
# TURNSTILE_SECRET_KEY=
-# Betterstack
-# LANGFUSE_TEAM_BETTERSTACK_TOKEN=
-
# Demo project that users can use to try the platform
# NEXT_PUBLIC_DEMO_PROJECT_ID=
diff --git a/web/src/env.mjs b/web/src/env.mjs
index 77389a2db8..d3f4bec5c2 100644
--- a/web/src/env.mjs
+++ b/web/src/env.mjs
@@ -26,7 +26,6 @@ export const env = createEnv({
),
NEXTAUTH_COOKIE_DOMAIN: z.string().optional(),
LANGFUSE_TEAM_SLACK_WEBHOOK: z.string().url().optional(),
- LANGFUSE_TEAM_BETTERSTACK_TOKEN: z.string().optional(),
LANGFUSE_NEW_USER_SIGNUP_WEBHOOK: z.string().url().optional(),
// Add `.min(1) on ID and SECRET if you want to make sure they're not empty
LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES: z.enum(["true", "false"]).optional(),
@@ -157,8 +156,6 @@ export const env = createEnv({
LANGFUSE_DISABLE_EXPENSIVE_POSTGRES_QUERIES:
process.env.LANGFUSE_DISABLE_EXPENSIVE_POSTGRES_QUERIES,
LANGFUSE_TEAM_SLACK_WEBHOOK: process.env.LANGFUSE_TEAM_SLACK_WEBHOOK,
- LANGFUSE_TEAM_BETTERSTACK_TOKEN:
- process.env.LANGFUSE_TEAM_BETTERSTACK_TOKEN,
LANGFUSE_NEW_USER_SIGNUP_WEBHOOK:
process.env.LANGFUSE_NEW_USER_SIGNUP_WEBHOOK,
SALT: process.env.SALT,
diff --git a/web/src/features/betterstack/server/betterstack-webhook.ts b/web/src/features/betterstack/server/betterstack-webhook.ts
deleted file mode 100644
index a5c3cfe834..0000000000
--- a/web/src/features/betterstack/server/betterstack-webhook.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { env } from "@/src/env.mjs";
-
-export const sendToBetterstack = async (message: unknown) => {
- if (!env.LANGFUSE_TEAM_BETTERSTACK_TOKEN) return;
-
- const url = "https://in.logs.betterstack.com";
-
- const headers = new Headers({
- "Content-Type": "application/json",
- Authorization: `Bearer ${env.LANGFUSE_TEAM_BETTERSTACK_TOKEN}`,
- });
-
- const payload = {
- dt: new Date().toISOString(), // Gets the current date in ISO format (UTC)
- message: JSON.stringify(message, null, 2),
- };
-
- const response = await fetch(url, {
- method: "POST",
- headers: headers,
- body: JSON.stringify(payload),
- });
-
- if (!response.ok) {
- throw new Error(`HTTP error! status: ${response.status}`);
- }
-};
diff --git a/web/src/server/api/services/EventProcessor.ts b/web/src/server/api/services/EventProcessor.ts
index 110c92b43b..9094b43e28 100644
--- a/web/src/server/api/services/EventProcessor.ts
+++ b/web/src/server/api/services/EventProcessor.ts
@@ -28,7 +28,6 @@ import {
import { v4 } from "uuid";
import { type z } from "zod";
import { jsonSchema } from "@langfuse/shared";
-import { sendToBetterstack } from "@/src/features/betterstack/server/betterstack-webhook";
import { ForbiddenError } from "@langfuse/shared";
import { instrument } from "@/src/utils/instrumentation";
import Decimal from "decimal.js";
@@ -813,11 +812,7 @@ export class SdkLogProcessor implements EventProcessor {
process(apiScope: ApiAccessScope) {
try {
- void sendToBetterstack({
- type: "sdk-log",
- event: this.event,
- projectId: apiScope.projectId,
- });
+ console.log("SDK Log", this.event);
return undefined;
} catch (error) {
return undefined;