Skip to content

chore: more usage report logging#30262

Merged
zlwaterfield merged 2 commits intomasterfrom
zach/usage-report-improvements-2
Mar 21, 2025
Merged

chore: more usage report logging#30262
zlwaterfield merged 2 commits intomasterfrom
zach/usage-report-improvements-2

Conversation

@zlwaterfield
Copy link
Contributor

Changes

Few more clean up changes to the usage report logging

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

It doesn't have an impact.

How did you test this code?

N/A

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.

PR Summary

This PR improves the logging infrastructure for PostHog's usage reporting system, focusing on better error tracking and cleaner log output.

  • Switches from structlog to Python's standard logging library for more consistent logging across the codebase
  • Adds period start/end timestamps to usage report events for better debugging and tracking
  • Removes redundant billing service logging statements and timing debug logs that weren't providing value
  • Improves error logging by including detailed error information directly in exception messages
  • Consolidates logging configuration with logger.setLevel(logging.INFO) for better control over log verbosity

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@zlwaterfield zlwaterfield enabled auto-merge (squash) March 21, 2025 17:58
@zlwaterfield zlwaterfield merged commit ad6ba5f into master Mar 21, 2025
91 of 92 checks passed
@zlwaterfield zlwaterfield deleted the zach/usage-report-improvements-2 branch March 21, 2025 18:18
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.

2 participants