Skip to content

fix(flushing): rely on OTEL default flush settings #1229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2025
Merged

Conversation

hassiebp
Copy link
Contributor

@hassiebp hassiebp commented Jun 27, 2025

Important

Modify LangfuseSpanProcessor to use OpenTelemetry's default flush settings when environment variables are not set.

  • Behavior:
    • Modify LangfuseSpanProcessor in span_processor.py to use OpenTelemetry's default flush settings when LANGFUSE_FLUSH_AT and LANGFUSE_FLUSH_INTERVAL are not set.
    • flush_at and flush_interval are set to None if environment variables are not provided, allowing OpenTelemetry defaults to apply.

This description was created by Ellipsis for eace769. You can customize this summary. It will automatically update as commits are pushed.

Greptile Summary

Disclaimer: Experimental PR review

Modifies flush settings handling in langfuse/_client/span_processor.py to better align with OpenTelemetry's default behavior, removing hardcoded fallback values.

  • Removes hardcoded defaults (15 for flush_at, 0.5 for flush_interval) in favor of OpenTelemetry's native BatchSpanProcessor defaults
  • Changes environment variable handling to pass through None values when not explicitly set
  • Improves integration with OpenTelemetry's standard behavior for span processing

@hassiebp hassiebp enabled auto-merge (squash) June 27, 2025 10:19
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

1 file reviewed, no comments
Edit PR Review Bot Settings | Greptile

@hassiebp hassiebp disabled auto-merge June 27, 2025 10:26
@hassiebp hassiebp merged commit 490163d into main Jun 27, 2025
6 of 10 checks passed
@hassiebp hassiebp deleted the hassieb/lfe-5501 branch June 27, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy