mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-05 00:49:57 -06:00
fix: remove unused telemetry to fix build errors (#2761)
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
import { getNodeAutoInstrumentations } from "@opentelemetry/auto-instrumentations-node";
|
||||
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
|
||||
import { Resource } from "@opentelemetry/resources";
|
||||
import { NodeSDK } from "@opentelemetry/sdk-node";
|
||||
import { SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base";
|
||||
import { SEMRESATTRS_SERVICE_NAME } from "@opentelemetry/semantic-conventions";
|
||||
|
||||
export const startInstrumentationForNode = (url: string) => {
|
||||
try {
|
||||
const exporter = new OTLPTraceExporter({
|
||||
url,
|
||||
});
|
||||
|
||||
const sdk = new NodeSDK({
|
||||
resource: new Resource({
|
||||
[SEMRESATTRS_SERVICE_NAME]: "Formbricks",
|
||||
}),
|
||||
traceExporter: exporter,
|
||||
spanProcessor: new SimpleSpanProcessor(exporter),
|
||||
instrumentations: [getNodeAutoInstrumentations()],
|
||||
});
|
||||
|
||||
sdk.start();
|
||||
} catch (err) {
|
||||
console.error(`Unable to setup Telemetry: ${err}`);
|
||||
}
|
||||
};
|
||||
@@ -1,7 +1,9 @@
|
||||
export const register = async () => {
|
||||
if (process.env.NEXT_RUNTIME === "nodejs" && process.env.OPENTELEMETRY_LISTENER_URL) {
|
||||
const { startInstrumentationForNode } = await import("./instrumentation.node");
|
||||
|
||||
startInstrumentationForNode(process.env.OPENTELEMETRY_LISTENER_URL);
|
||||
export async function register() {
|
||||
if (process.env.NEXT_RUNTIME === "nodejs") {
|
||||
await import("./sentry.server.config");
|
||||
}
|
||||
};
|
||||
|
||||
if (process.env.NEXT_RUNTIME === "edge") {
|
||||
await import("./sentry.edge.config");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,11 +28,6 @@
|
||||
"@formbricks/ui": "workspace:*",
|
||||
"@hookform/resolvers": "^3.4.2",
|
||||
"@json2csv/node": "^7.0.6",
|
||||
"@opentelemetry/auto-instrumentations-node": "^0.46.1",
|
||||
"@opentelemetry/exporter-trace-otlp-http": "^0.51.1",
|
||||
"@opentelemetry/resources": "^1.24.1",
|
||||
"@opentelemetry/sdk-node": "^0.51.1",
|
||||
"@opentelemetry/semantic-conventions": "^1.24.1",
|
||||
"@paralleldrive/cuid2": "^2.2.2",
|
||||
"@radix-ui/react-collapsible": "^1.0.3",
|
||||
"@react-email/components": "^0.0.19",
|
||||
|
||||
2935
pnpm-lock.yaml
generated
2935
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user