Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/traceloop-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"fetch-retry": "^6.0.0",
"nunjucks": "^3.2.4",
"papaparse": "^5.5.3",
"posthog-node": "^5.5.1",
"supports-color": "^10.0.0",
"tslib": "^2.8.1",
"uuid": "^11.1.0"
Expand Down
3 changes: 0 additions & 3 deletions packages/traceloop-sdk/src/lib/prompts/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TraceloopError } from "../errors";
import { Prompt, PromptVersion } from "../interfaces";
import { Telemetry } from "../telemetry/telemetry";
import { getPromptByKey } from "./registry";
import { renderMessages } from "./template";
export { waitForInitialization } from "./registry";
Expand Down Expand Up @@ -40,8 +39,6 @@ const managedPromptTracingAttributes = (
};

export const getPrompt = (key: string, variables: Record<string, string>) => {
Telemetry.getInstance().capture("prompt:rendered");

const prompt = getPromptByKey(key);
const promptVersion = getEffectiveVersion(prompt);

Expand Down
86 changes: 0 additions & 86 deletions packages/traceloop-sdk/src/lib/telemetry/telemetry.ts

This file was deleted.

7 changes: 3 additions & 4 deletions packages/traceloop-sdk/src/lib/tracing/decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
TraceloopSpanKindValues,
} from "@traceloop/ai-semantic-conventions";
import { shouldSendTraces } from ".";
import { Telemetry } from "../telemetry/telemetry";

export type DecoratorConfig = {
name: string;
Expand Down Expand Up @@ -134,7 +133,7 @@ function withEntity<
);
}
} catch (error) {
Telemetry.getInstance().logException(error);
console.debug("Error setting input attributes", error);
}
}

Expand All @@ -149,7 +148,7 @@ function withEntity<
);
}
} catch (error) {
Telemetry.getInstance().logException(error);
console.debug("Error setting output attributes", error);
} finally {
span.end();
}
Expand All @@ -165,7 +164,7 @@ function withEntity<
);
}
} catch (error) {
Telemetry.getInstance().logException(error);
console.debug("Error setting output attributes", error);
} finally {
span.end();
}
Expand Down
9 changes: 6 additions & 3 deletions packages/traceloop-sdk/src/lib/tracing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Resource } from "@opentelemetry/resources";
import { ATTR_SERVICE_NAME } from "@opentelemetry/semantic-conventions";
import { Instrumentation } from "@opentelemetry/instrumentation";
import { InitializeOptions } from "../interfaces";
import { Telemetry } from "../telemetry/telemetry";
import { _configuration } from "../configuration";
import { CONTEXT_KEY_ALLOW_TRACE_CONTENT } from "@traceloop/ai-semantic-conventions";
import { AnthropicInstrumentation } from "@traceloop/instrumentation-anthropic";
Expand Down Expand Up @@ -51,7 +50,9 @@ let mcpInstrumentation: McpInstrumentation | undefined;
const instrumentations: Instrumentation[] = [];

export const initInstrumentations = (apiKey?: string, baseUrl?: string) => {
const exceptionLogger = (e: Error) => Telemetry.getInstance().logException(e);
const exceptionLogger = (e: Error) => {
console.debug("[Traceloop] Instrumentation exception:", e.message);
};
const enrichTokens =
(process.env.TRACELOOP_ENRICH_TOKENS || "true").toLowerCase() === "true";

Expand Down Expand Up @@ -133,7 +134,9 @@ export const manuallyInitInstrumentations = (
apiKey?: string,
baseUrl?: string,
) => {
const exceptionLogger = (e: Error) => Telemetry.getInstance().logException(e);
const exceptionLogger = (e: Error) => {
console.debug("[Traceloop] Instrumentation exception:", e.message);
};
const enrichTokens =
(process.env.TRACELOOP_ENRICH_TOKENS || "true").toLowerCase() === "true";

Expand Down
13 changes: 2 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.