Skip to content
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

Add basic telemetry #451

Merged
merged 1 commit into from
Jun 14, 2024
Merged

Add basic telemetry #451

merged 1 commit into from
Jun 14, 2024

Conversation

NolanTrem
Copy link
Collaborator

@NolanTrem NolanTrem commented Jun 14, 2024

🚀 This description was created by Ellipsis for commit 9d50d41

Summary:

Added telemetry support using Posthog to track feature usage and errors, with integration into various endpoints and documentation on how to disable it.

Key points:

  • Added telemetry support using Posthog in r2r/telemetry/posthog.py.
  • Introduced BaseTelemetryEvent and specific event classes in r2r/telemetry/events.py.
  • Created telemetry_event decorator in r2r/telemetry/telemetry_decorator.py to log feature usage and errors.
  • Updated r2r/main/r2r_app.py to include telemetry for various endpoints (e.g., update_prompt_app, ingest_documents_app, search_app).
  • Added documentation for telemetry in docs/pages/deep-dive/telemetry.mdx.
  • Updated pyproject.toml to include posthog dependency.

Generated with ❤️ by ellipsis.dev

Copy link

vercel bot commented Jun 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
r2r-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 14, 2024 1:23am

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 9d50d41 in 33 seconds

More details
  • Looked at 415 lines of code in 8 files
  • Skipped 1 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. r2r/telemetry/telemetry_decorator.py:10
  • Draft comment:
    Ensure that the telemetry_event decorator is correctly capturing both feature usage and errors. This is crucial for maintaining accurate telemetry data.
  • Reason this comment was not posted:
    Confidence changes required: 33%
    The telemetry decorator is designed to capture both feature usage and errors. It uses the FeatureUsageEvent and ErrorEvent classes from the telemetry events module. The decorator is applied to various methods in the r2r_app.py file to log these events. The decorator checks if the function is asynchronous and wraps it accordingly, ensuring that telemetry is captured both in synchronous and asynchronous environments. This is a critical part of the telemetry implementation as it ensures that feature usage and errors are logged correctly across different parts of the application.

Workflow ID: wflow_oiImQB5NWac5Sk3J


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@NolanTrem NolanTrem merged commit 9528e21 into main Jun 14, 2024
3 checks passed
@NolanTrem NolanTrem deleted the Nolan/Telemetry branch June 14, 2024 15:33
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.

None yet

1 participant