Skip to content

Commit 490163d

Browse files
authored
fix(flushing): rely on OTEL default flush settings (#1229)
1 parent 875d2f2 commit 490163d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

langfuse/_client/span_processor.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,15 @@ def __init__(
6363
if blocked_instrumentation_scopes is not None
6464
else []
6565
)
66-
flush_at = flush_at or int(os.environ.get(LANGFUSE_FLUSH_AT, 15))
67-
flush_interval = flush_interval or float(
68-
os.environ.get(LANGFUSE_FLUSH_INTERVAL, 0.5)
66+
67+
env_flush_at = os.environ.get(LANGFUSE_FLUSH_AT, None)
68+
flush_at = flush_at or int(env_flush_at) if env_flush_at is not None else None
69+
70+
env_flush_interval = os.environ.get(LANGFUSE_FLUSH_INTERVAL, None)
71+
flush_interval = (
72+
flush_interval or float(env_flush_interval)
73+
if env_flush_interval is not None
74+
else None
6975
)
7076

7177
basic_auth_header = "Basic " + base64.b64encode(

0 commit comments

Comments
 (0)