‹ Reports
The Dispatch

OSS Watchlist: posthog/posthog


Executive Summary

Project Health Rating: Green (Good)

The PostHog project demonstrates robust health with active development, rapid issue resolution, and a balanced focus on both front-end improvements and back-end stability. The team's commitment to enhancing functionality and maintaining system integrity is evident, which supports a positive trajectory for the project.

Contributing Factors:

Recommendations for Future:

Notable Risks

Recent Activity

PR #21689

Issue #21691

On Deck

Quantified Commit Activity Over 6 Days

Developer Avatar Branches PRs Commits Files Changes
Neil Kakkar 1 5/5/0 6 61 8755
vs. last report = +3/+3/-1 +4 +57 +8684
Julian Bez 1 13/13/0 15 152 3717
vs. last report -1 +1/+7/= +6 +49 -7016
David Newell 1 17/12/0 12 67 1793
vs. last report = +15/+9/= +9 +59 -2279
Tom Owers 1 0/1/0 1 23 1294
vs. last report = -3/-4/= -4 -1 +529
Marius Andra 2 16/12/1 14 54 1242
Brett Hoerner 2 3/3/0 7 24 1043
vs. last report = -1/=/-1 +3 +11 +780
Juraj Majerik 1 5/5/0 7 26 904
vs. last report = +3/+5/= +6 +18 +713
Michael Matloka 1 5/4/0 5 59 813
vs. last report = -2/-2/-1 -1 +20 +36
Ben White 1 7/2/0 1 8 800
vs. last report = +6/+1/= -3 -10 +429
Xavier Vello 1 3/4/0 4 10 762
vs. last report = -2/+1/= +1 +8 +725
Robbie 1 3/4/0 4 23 707
vs. last report -1 -3/+1/= -2 -11 +99
Marcus Hof 2 4/4/0 7 10 493
vs. last report +1 -1/+1/= +4 +5 +391
Thomas Obermüller 1 0/0/0 1 3 445
vs. last report = -3/-3/= -2 -5 +372
ted kaemming 1 4/3/0 3 13 411
vs. last report = +1/+1/-1 +1 -5 -6
Zach Waterfield 1 1/1/0 1 2 383
vs. last report = =/+1/= = -3 +254
Tomás Farías Santana 1 6/4/1 3 15 382
vs. last report = +2/+2/= +1 +8 +23
timgl 1 1/1/0 1 14 351
vs. last report = -2/-2/= -2 -26 -111
Nikita Vorobev 1 1/1/0 2 14 344
vs. last report = -1/=/= = +4 +53
Paul D'Ambra 1 6/3/1 3 34 292
vs. last report = +2/+1/+1 = +23 +151
PostHog Bot 1 12/11/2 11 2 142
vs. last report = =/+1/+1 +1 -2 +19
Frank Hamand 1 11/11/0 12 10 103
vs. last report = +4/+4/= +5 +8 +47
Eric Duong 1 8/6/0 6 9 98
vs. last report = -2/-2/= -2 -2 -442
Raquel Smith 1 1/2/0 2 5 83
vs. last report = -1/=/= = = =
Tiina Turban 2 2/1/0 2 9 69
vs. last report +1 -5/-5/= -4 -30 -561
Bianca Yang 1 2/2/0 2 10 59
vs. last report = +1/+1/= +1 +1 +2
Steven Shults 1 2/2/0 2 2 42
vs. last report = =/+2/= -3 +1 -29
Steven Miller 1 0/1/0 1 2 10
vs. last report +1 -1/+1/= +1 +2 +10
Jacob Gillespie 1 1/1/0 1 2 8
vs. last report = =/=/= = = =
dependabot[bot] 1 6/1/0 1 1 2
vs. last report = +2/+1/= = -1 -20
github-actions 2 0/0/0 3 3 1
Marc Jeffrey (mjeffrey18) 0 1/0/0 0 0 0
Manoel Aranda Neto (marandaneto) 0 1/0/0 0 0 0
Aryan Rawlani (aryanrawlani28) 0 1/0/0 0 0 0

PRs: created by that dev and opened/merged/closed-unmerged during the period

Detailed Reports

Report On: Fetch commits



Project Overview

The PostHog development team has been actively enhancing the platform's features and addressing various issues. The project, hosted on GitHub, is an open-source analytics platform that provides product analytics, session recording, feature flagging, and A/B testing capabilities. It is designed for self-hosting, allowing users to maintain control over their data while using the platform's extensive analytics and optimization tools.

Recent Development Activities:

Team Contributions:

  • David Newell (daibhin) focused on UI improvements and error clustering features.
  • Tiina Turban (tiina303) worked on batch exports and pipeline UI enhancements.
  • Marius Andra (mariusandra) contributed to trends insights and HogQL functions.
  • Julian Bez (webjunkie) made significant updates to the CSV exporter and insights loading optimizations.
  • Tomás Farías Santana (tomasfarias) enhanced batch export functionalities.
  • Michael Matloka (Twixes) improved error handling and toolbar UX.
  • Eric Duong (EDsCODE) worked on data warehouse source settings and UI adjustments.
  • Neil Kakkar (neilkakkar) focused on experiments related to secondary metrics significance.
  • PostHog Bot (posthog-bot) updated dependencies across several files.
  • Frank Hamand (frankh) managed deployment configurations and environment variables.
  • Nikita Vorobev (nikitaevg) contributed to HogQL functions.
  • Robbie (robbie-c) improved web analytics queries and session filters.
  • Juraj Majerik (jurajmajerik) enhanced experiment views and diagnostics.
  • Tom Owers (Gilbert09) focused on syncing warehouse schemas and Stripe source connections for data warehouses.
  • Brett Hoerner (bretthoerner) optimized person state management in the plugin server.
  • Xavier Vello (xvello) improved message parsing performance in the plugin server.
  • Ted Kaemming (tkaemming) worked on optimizing Kafka producer flushes during management commands.

Branch Activity:

Active branches include:

  • allow-billing-tickets-on-free-tier
  • batch-export-delete
  • brett/lazy-persons
  • balance-frontend
  • brett/revert-depot
  • add-session-filters
  • billing-q2-auto-subscribe-new-users
  • brett/test

Conclusions:

The PostHog development team continues to demonstrate a strong commitment to enhancing the platform's functionality and user experience. The recent activities indicate a balanced focus on both front-end improvements and back-end stability, ensuring that PostHog remains a robust solution for product analytics. The ongoing efforts in optimizing data handling and improving integration capabilities are particularly noteworthy, reflecting the team's proactive approach to addressing user needs and technological advancements.

Quantified Commit Activity Over 7 Days

Developer Avatar Branches PRs Commits Files Changes
Neil Kakkar 1 5/5/0 6 61 8755
vs. last report = +3/+3/-1 +4 +57 +8684
Julian Bez 1 13/13/0 15 152 3717
vs. last report -1 +1/+7/= +6 +49 -7016
David Newell 1 17/12/0 12 67 1793
vs. last report = +15/+9/= +9 +59 -2279
Tom Owers 1 0/1/0 1 23 1294
vs. last report = -3/-4/= -4 -1 +529
Marius Andra 2 16/12/1 14 54 1242
Brett Hoerner 2 3/3/0 7 24 1043
vs. last report = -1/=/-1 +3 +11 +780
Juraj Majerik 1 5/5/0 7 26 904
vs. last report = +3/+5/= +6 +18 +713
Michael Matloka 1 5/4/0 5 59 813
vs. last report = -2/-2/-1 -1 +20 +36
Ben White 1 7/2/0 1 8 800
vs. last report = +6/+1/= -3 -10 +429
Xavier Vello 1 3/4/0 4 10 762
vs. last report = -2/+1/= +1 +8 +725
Robbie 1 3/4/0 4 23 707
vs. last report -1 -3/+1/= -2 -11 +99
Marcus Hof 2 4/4/0 7 10 493
vs. last report +1 -1/+1/= +4 +5 +391
Thomas Obermüller 1 0/0/0 1 3 445
vs. last report = -3/-3/= -2 -5 +372
ted kaemming 1 4/3/0 3 13 411
vs. last report = +1/+1/-1 +1 -5 -6
Zach Waterfield 1 1/1/0 1 2 383
vs. last report = =/+1/= = -3 +254
Tomás Farías Santana 1 6/4/1 3 15 382
vs. last report = +2/+2/= +1 +8 +23
timgl 1 1/1/0 1 14 351
vs. last report = -2/-2/= -2 -26 -111
Nikita Vorobev 1 1/1/0 2 14 344
vs. last report = -1/=/= = +4 +53
Paul D'Ambra 1 6/3/1 3 34 292
vs. last report = +2/+1/+1 = +23 +151
PostHog Bot 1 12/11/2 11 2 142
vs. last report = =/+1/+1 +1 -2 +19
Frank Hamand 1 11/11/0 12 10 103
vs. last report = +4/+4/= +5 +8 +47
Eric Duong 1 8/6/0 6 9 98
vs. last report = -2/-2/= -2 -2 -442
Raquel Smith 1 1/2/0 2 5 83
vs. last report = -1/=/= = = =
Tiina Turban 2 2/1/0 2 9 69
vs. last report +1 -5/-5/= -4 -30 -561
Bianca Yang 1 2/2/0 2 10 59
vs. last report = +1/+1/= +1 +1 +2
Steven Shults 1 2/2/0 2 2 42
vs. last report = =/+2/= -3 +1 -29
Steven Miller 1 0/1/0 1 2 10
vs. last report +1 -1/+1/= +1 +2 +10
Jacob Gillespie 1 1/1/0 1 2 8
vs. last report = =/=/= = = =
dependabot[bot] 1 6/1/0 1 1 2
vs. last report = +2/+1/= = -1 -20
github-actions 2 0/0/0 3 3 1
Marc Jeffrey (mjeffrey18) 0 1/0/0 0 0 0
Manoel Aranda Neto (marandaneto) 0 1/0/0 0 0 0
Aryan Rawlani (aryanrawlani28) 0 1/0/0 0 0 0

PRs: created by that dev and opened/merged/closed-unmerged during the period

Report On: Fetch issues



Recent Activity Analysis

Overview

Since the last report 6 days ago, there has been a significant amount of activity in the repository, including both the opening and closing of numerous issues. This indicates an active development cycle with ongoing discussions and updates on existing issues.

Notable New Issues

  • Issue #21692: Request to show recording timestamps in local time zones. This issue was created and closed within a day, indicating rapid handling of user feedback.
  • Issue #21691: Reports a UI error with session properties in product analytics, which affects user experience.
  • Issue #21690: Discusses a UI glitch when using "Breakdown by" in formulas, showing responsiveness to UI/UX problems.
  • Issue #21689: Proposes changes to handling person properties in events, reflecting ongoing improvements in data handling.
  • Issue #21688: Reverts a previous change due to issues, showing iterative development practices.
  • Issue #21687: Fixes related to the data warehouse interface, indicating enhancements in backend functionalities.

Recently Closed Issues

  • Issue #21686: Addresses UX issues with flags and experiments, suggesting a focus on user experience optimization.
  • Issue #21685: Discusses deletion options for batch exports in the UI, reflecting enhancements in data management features.

General Trends

  • There is a continued focus on improving user experience through UI enhancements and fixing glitches.
  • Enhancements in backend functionalities and data handling are evident, suggesting improvements in performance and usability.
  • Rapid opening and closing of some issues indicate a dynamic and responsive development environment.

Conclusion

The recent activity in the repository suggests a healthy and active development cycle focused on both expanding features and maintaining the system's integrity. The project's responsiveness to issues, both in terms of introducing enhancements and resolving bugs, indicates a strong commitment to user satisfaction and continuous improvement.

Report On: Fetch pull requests



Since the last analysis 6 days ago, there has been a significant amount of activity in the repository. Here are the key changes and notable pull requests:

Notable Open Pull Requests

  • PR #21689: This PR introduces an option to use new overrides with properties on events. It is currently in draft status and open for review.

  • PR #21688: This PR reverts a previous change that captured final SQL in Sentry errors. It is open and aims to address issues with the previous implementation.

  • PR #21687: This PR addresses some UX issues with flags, experiments, and surveys. It is open and includes fixes for various minor bugs.

Significant Closed Pull Requests

  • PR #21685: This PR introduced a delete option for batch exports in the UI. It was closed recently and merged into the master branch.

  • PR #21684: This PR aimed to make network data queryable in ClickHouse but was closed without merging. It remains in draft status, indicating potential unresolved issues or changes in project direction.

  • PR #21681: This PR fixed timezone handling for HogQL queries using filters with ISO dates. It was also closed recently and merged.

  • PR #21679: This PR updated a stub package related to Django and was closed without merging, remaining in draft status.

Summary

The recent activity indicates ongoing efforts to enhance functionality, address bugs, and improve performance across various aspects of the project. Notably, several PRs have been merged, enhancing features like batch exports and fixing timezone issues in HogQL queries. However, some PRs were closed without merging, suggesting either shifts in priorities or alternative implementations being considered.

It's important to review these changes closely, especially those that have been closed without merging, to ensure that any critical improvements or bug fixes are not overlooked. Additionally, open PRs like #21689 and #21688 require attention to finalize and integrate their proposed changes into the project effectively.

Report On: Fetch PR 21689 For Assessment



Pull Request Analysis

Overview

The pull request (PR) in question introduces changes to the handling of properties on events within the PostHog application. Specifically, it aims to deprecate an older version (v2) of person_overrides used by person_id_override_properties_on_events and replace it with a newer version (v3), referred to as person_distinct_id_overrides.

Changes

  • Renaming: The PR renames the old internal mode identifier to person_id_override_properties_on_events_deprecated.
  • Refactoring: It refactors flag evaluation to reduce boilerplate code, making the codebase cleaner and potentially easier to maintain.
  • Addition of New Mode: Introduces a new mode controlled by the feature flag persons-on-events-person-id-override-properties-on-events.

Code Quality Assessment

  1. Clarity and Maintainability:

    • The renaming of variables and modes enhances clarity, especially indicating deprecated features.
    • Refactoring for reducing boilerplate code is a good practice, making future modifications easier and less error-prone.
  2. Testing:

    • The PR mentions that tests for the new mode are yet to be added. It is crucial that this aspect is not overlooked as it ensures that the new functionality works as expected and does not introduce regressions.
  3. Compatibility:

    • The changes are noted to have no effect on self-hosted versions of PostHog, which is important for maintaining consistency across different deployment models.
  4. Documentation and Comments:

    • While the PR description briefly outlines the changes, the actual code changes could benefit from more in-line comments explaining why certain changes were made, especially around the areas where old functionalities are being deprecated in favor of new ones.
  5. Best Practices:

    • The use of feature flags for rolling out new features is a good practice, allowing safer deployments and easier rollbacks if something goes wrong.
  6. Security and Performance Implications:

    • There are no apparent security changes in this PR. However, since it deals with how properties on events are handled, ensuring that these changes do not introduce performance bottlenecks is crucial, especially given PostHog's data-intensive operations.

Recommendations

  • Add Tests: Before merging, ensure that comprehensive tests are added to cover the new functionality.
  • More In-depth Review: Given the core nature of the changes (affecting event properties handling), a more in-depth review by multiple team members would be advisable.
  • Monitor Performance: After deployment, closely monitor the application's performance to detect any unforeseen impacts caused by the changes.

Overall, the PR introduces significant changes that should be handled carefully to ensure they align well with PostHog's existing architecture and future direction. The quality of the code in terms of maintainability and clarity seems improved with the refactor, but completeness (in terms of testing) and detailed documentation/comments within the code could be enhanced further.

Report On: Fetch PR 21688 For Assessment



Pull Request Analysis

Overview

The pull request in question, numbered #21688, primarily focuses on reverting a previous change related to capturing SQL errors in Sentry for the PostHog project. This reversion is significant because it directly impacts how errors are logged and debugged in production, which can affect the stability and performance of the system.

Changes in the Pull Request

Key Modifications:

  1. Reversion of Previous Commit: The PR reverts commit 15627818f6934bab6a9d830c7059dec1a1299eaa, which itself was a reversion of changes intended to capture complete SQL queries in Sentry errors.
  2. Dependency Upgrade: The PR updates the clickhouse-driver from version 0.2.4 to 0.2.6. This change is crucial as it unblocks upgrades to Python 3.11 without introducing the issues present in clickhouse-driver==0.2.7.

Code Quality Assessment:

  • Clarity and Maintainability: The changes are straightforward and focused, making them easy to understand and maintain. The use of comments in the workflow file helps clarify the purpose of each step, which is beneficial for future maintenance.
  • Error Handling: Reintroducing detailed error logging (by capturing full SQL queries) can significantly aid in debugging, especially when dealing with complex database interactions.
  • Dependency Management: The cautious approach to upgrading dependencies (opting for a non-problematic version of clickhouse-driver) demonstrates a prudent strategy in maintaining system stability.

Files Affected:

Conclusion

Overall, the pull request appears to be well-crafted with clear intentions and prudent changes. The focus on both improving error logging and carefully managing dependencies should positively impact the project's stability and maintainability. The modifications are adequately documented and isolated, minimizing potential risks associated with the changes.

Report On: Fetch Files For Assessment



Analysis of Source Code Files

1. frontend/src/scenes/session-recordings/player/PlayerMeta.tsx

- **Purpose**: Manages the metadata display for session recordings in the PostHog application, including URL, screen resolution, and user interactions.
- **Structure**:
 - The file is structured with functional components and uses TypeScript for type safety.
 - It leverages several custom hooks (`useActions`, `useValues`) from Kea (state management library) and other utility hooks for responsive design and feature flagging.
 - Components are well-separated, and conditional rendering is used to handle different states such as loading or full-screen mode.
- **Quality**:
 - **Readability**: The code is quite readable with clear naming conventions and separation of concerns. Comments or function documentation is minimal, which could be improved for better understanding at first glance.
 - **Maintainability**: The use of modular components and hooks suggests good maintainability. However, the complex conditional rendering logic could be simplified or broken down further to enhance understandability and maintainability.
 - **Performance**: Uses lazy evaluation and conditional rendering effectively to potentially reduce unnecessary computations or re-renders.
 - **Scalability**: The component structure allows for easy extension or modification of features like adding new metadata fields or different modes.

2. ee/clickhouse/views/test/test_clickhouse_experiments.py

- **Purpose**: Contains tests for ClickHouse experiments, focusing on new exposure cohort flows.
- **Structure**:
 - Organized as a test suite using Python’s unittest framework.
 - Tests are grouped logically, testing various functionalities like experiment creation, manipulation, and result retrieval.
- **Quality**:
 - **Readability**: Test functions are named descriptively which makes them understandable. Use of fixtures and clear setup-teardown methods enhance readability.
 - **Maintainability**: High due to the use of separate test cases for different functionalities and clear separation between setup, execution, and assertions.
 - **Robustness**: Appears robust with comprehensive tests covering a wide range of scenarios including edge cases.
 - **Best Practices**: Follows good testing practices such as isolation of tests, use of mock data, and coverage of both success and failure states.

3. posthog/hogql_queries/insights/funnels/base.py

- **Purpose**: Forms the base for funnel queries in HogQL, affecting insights and analytics functionalities.
- **Structure**:
 - Defines a base class for funnel queries that can be extended for specific types of funnel analyses.
 - Uses abstract methods and properties which enforce implementation in derived classes, ensuring consistency across different funnel query handlers.
- **Quality**:
 - **Readability**: The use of abstract base classes enhances modularity and readability by providing a clear template for funnel queries.
 - **Extensibility**: Highly extensible as new types of funnel queries can inherit from this base class and implement specific behaviors as needed.
 - **Reliability**: Base structure promotes reliability by standardizing how funnel queries should be structured and executed within the system.

Summary

The code across these files demonstrates good software engineering practices such as modularity, use of abstract patterns, comprehensive testing, and effective state management. There are areas where documentation could be enhanced to improve readability further. Overall, the structure supports maintainability, extensibility, and scalability which are crucial for the ongoing development and enhancement of the PostHog platform.