Skip to content

fix(flushing): flush interval to millis in SpanProcessor #1244

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
Jul 7, 2025

Conversation

hassiebp
Copy link
Contributor

@hassiebp hassiebp commented Jul 7, 2025

Important

Convert flush_interval to milliseconds in LangfuseSpanProcessor and update documentation for LANGFUSE_FLUSH_INTERVAL.

  • Behavior:
    • Convert flush_interval from seconds to milliseconds in LangfuseSpanProcessor.__init__() in span_processor.py.
    • Update LANGFUSE_FLUSH_INTERVAL documentation in environment_variables.py to specify delay is in seconds.
  • Misc:
    • Adjust schedule_delay_millis calculation in LangfuseSpanProcessor.__init__() to handle None values.

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

Greptile Summary

Disclaimer: Experimental PR review

Fixed critical timing issue in SpanProcessor by correcting unit conversion from seconds to milliseconds for flush intervals, ensuring proper batch processing timing.

  • Fixed timing bug in langfuse/_client/span_processor.py where seconds were incorrectly interpreted as milliseconds in BatchSpanProcessor
  • Updated langfuse/_client/environment_variables.py documentation to clarify LANGFUSE_FLUSH_INTERVAL is in seconds
  • Added proper handling of None values for flush interval parameter

@hassiebp hassiebp enabled auto-merge (squash) July 7, 2025 15:37
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.

2 files reviewed, 1 comment
Edit PR Review Bot Settings | Greptile

@hassiebp hassiebp merged commit 259bd4b into main Jul 7, 2025
10 checks passed
@hassiebp hassiebp deleted the fix-flush-interval-millis branch July 7, 2025 15:44
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