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

feat(capture-rs): implement replay capture in capture-rs #24461

Merged
merged 13 commits into from
Aug 21, 2024

Conversation

frankh
Copy link
Contributor

@frankh frankh commented Aug 19, 2024

Problem

capture is fragmented

django capture for recordings is flaky

lets move everything to rust

Changes

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

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

How did you test this code?

added unit tests

@frankh frankh marked this pull request as draft August 19, 2024 14:06
@frankh frankh changed the title feat: implement replay capture in capture-rs [WIP feat: implement replay capture in capture-rs [WIP] Aug 19, 2024
@posthog-bot
Copy link
Contributor

Hey @frankh! 👋
This pull request seems to contain no description. Please add useful context, rationale, and/or any other information that will help make sense of this change now and in the distant Mars-based future.

@frankh frankh changed the title feat: implement replay capture in capture-rs [WIP] feat(capture-rs): implement replay capture in capture-rs [WIP] Aug 20, 2024
@frankh frankh changed the title feat(capture-rs): implement replay capture in capture-rs [WIP] feat(capture-rs): implement replay capture in capture-rs Aug 20, 2024
@frankh frankh requested a review from oliverb123 August 20, 2024 12:40
@frankh frankh force-pushed the frank/rust-replay-capture branch from 2c72574 to e349a3c Compare August 20, 2024 12:57
Copy link
Contributor

@oliverb123 oliverb123 left a comment

Choose a reason for hiding this comment

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

This is a much smaller change than I expected tbh, all looks good to me aside from 1 question about where a metric is reported

rust/capture/src/v0_endpoint.rs Show resolved Hide resolved
@frankh frankh force-pushed the frank/rust-replay-capture branch from c12594a to f0998a9 Compare August 20, 2024 15:48
@frankh frankh force-pushed the frank/rust-replay-capture branch from f0998a9 to de856e7 Compare August 20, 2024 15:48
@frankh frankh marked this pull request as ready for review August 21, 2024 06:52
Copy link
Contributor

@oliverb123 oliverb123 left a comment

Choose a reason for hiding this comment

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

Only one note, a bit of a security/stability issue. As a general rule, you should never unwrap() in any "real" code path, only tests, without being absolutely certain the thing being unwrapped will be what you expect (and usually the thing that makes you certain of that also lets you avoid unwrap())

rust/capture/src/v0_endpoint.rs Outdated Show resolved Hide resolved
rust/capture/tests/recordings.rs Show resolved Hide resolved
@frankh frankh requested a review from oliverb123 August 21, 2024 10:13
@frankh frankh merged commit 8a6020d into master Aug 21, 2024
89 checks passed
@frankh frankh deleted the frank/rust-replay-capture branch August 21, 2024 12:14
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.

3 participants