Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
fix: reenable hyperdx
Gergo Moriczbd84290b9e9d
diff --git a/apps/api/src/controllers/auth.ts b/apps/api/src/controllers/auth.tsindex fe3a5e1be..56a5ec617 100644--- a/apps/api/src/controllers/auth.ts+++ b/apps/api/src/controllers/auth.ts@@ -4,23 +4,23 @@ import { AuthResponse, NotificationType, RateLimiterMode } from "../../src/typesimport { supabase_service } from "../../src/services/supabase";import { withAuth } from "../../src/lib/withAuth";import { RateLimiterRedis } from "rate-limiter-flexible";-// import { setTraceAttributes } from '@hyperdx/node-opentelemetry';+import { setTraceAttributes } from '@hyperdx/node-opentelemetry';import { sendNotification } from "../services/notification/email_notification";export async function authenticateUser(req, res, mode?: RateLimiterMode): Promise<AuthResponse> {return withAuth(supaAuthenticateUser)(req, res, mode);}-// function setTrace(team_id: string, api_key: string) {-// try {-// setTraceAttributes({-// team_id,-// api_key-// });-// } catch (error) {-// console.error('Error setting trace attributes:', error);-// }--// }+function setTrace(team_id: string, api_key: string) {+ try {+ setTraceAttributes({+ team_id,+ api_key+ });+ } catch (error) {+ console.error('Error setting trace attributes:', error);+ }++}export async function supaAuthenticateUser(req,res,@@ -99,7 +99,7 @@ export async function supaAuthenticateUser(const plan = getPlanByPriceId(data[0].price_id);// HyperDX Logging- // setTrace(team_id, normalizedApi);+ setTrace(team_id, normalizedApi);subscriptionData = {team_id: team_id,plan: plandiff --git a/apps/api/src/index.ts b/apps/api/src/index.tsindex 3091870ac..ba494d833 100644--- a/apps/api/src/index.ts+++ b/apps/api/src/index.ts@@ -5,7 +5,7 @@ import "dotenv/config";import { getWebScraperQueue } from "./services/queue-service";import { redisClient } from "./services/rate-limiter";import { v0Router } from "./routes/v0";-// import { initSDK } from "@hyperdx/node-opentelemetry";+import { initSDK } from "@hyperdx/node-opentelemetry";import cluster from "cluster";import os from "os";import { Job } from "bull";@@ -72,9 +72,9 @@ if (cluster.isMaster) {redisClient.connect();// HyperDX OpenTelemetry- // if (process.env.ENV === "production") {- // initSDK({ consoleCapture: true, additionalInstrumentations: [] });- // }+ if (process.env.ENV === "production") {+ initSDK({ consoleCapture: true, additionalInstrumentations: [] });+ }function startServer(port = DEFAULT_PORT) {const server = app.listen(Number(port), HOST, () => {