-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: Implement structlog batch exports logger #18334
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Base automatically changed from
refactor/abstract-insert-activty-for-batch-exports
to
master
November 2, 2023 09:38
tomasfarias
force-pushed
the
refactor/batch-exports-logging
branch
3 times, most recently
from
November 2, 2023 22:11
4608347
to
ed57cc9
Compare
Going to keep this one in draft until we merge #18380 and we can rebase on that before addressing test failures. |
tomasfarias
changed the title
feat: Implement new structlog batch exports logger
feat: Implement structlog batch exports logger
Nov 6, 2023
tomasfarias
force-pushed
the
refactor/batch-exports-logging
branch
from
November 7, 2023 13:59
0206f1b
to
2182351
Compare
tomasfarias
force-pushed
the
refactor/batch-exports-logging
branch
from
November 7, 2023 15:42
6920e68
to
7f371cd
Compare
Closed in favor of: #18458 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The existing logging implementation for batch exports is a bit clunky:
"batch_exports"
, but it would be nice to distinguish from backfills.Changes
structlog
is already a dependency from thedjango-structlog
requirement, so nothing new here, but I did bump the version, which should be supported). This allows us to set context variables (liketeam_id
anddestination
) once and for all.Overall, the logging system now looks easier to understand and, eventually, extend. The line diff may be deceptive as a lot of it is in docstrings to aid with understanding and more than half is in unit testing (which we didn't properly have much of).
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
How did you test this code?
Added unit tests.