Skip to content

Commit

Permalink
fix(core): remove "No observability" warning when Langfuse is explici…
Browse files Browse the repository at this point in the history
…tly disabled (#409)
  • Loading branch information
danielsantiago authored Sep 30, 2024
1 parent 9481d69 commit 79959d5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions langfuse-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -908,9 +908,7 @@ export abstract class LangfuseWebStateless extends LangfuseCoreStateless {
const { flushAt, flushInterval, publicKey, enabled, ...rest } = params;
let isObservabilityEnabled = enabled === false ? false : true;

if (!isObservabilityEnabled) {
console.warn("Langfuse is disabled. No observability data will be sent to Langfuse.");
} else if (!publicKey) {
if (isObservabilityEnabled && !publicKey) {
isObservabilityEnabled = false;
console.warn(
"Langfuse public key not passed to constructor and not set as 'LANGFUSE_PUBLIC_KEY' environment variable. No observability data will be sent to Langfuse."
Expand Down

0 comments on commit 79959d5

Please sign in to comment.