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: track project deployments #1508

Conversation

GugaGongadze
Copy link
Contributor

Description of change

Moving tracking functionality in gateway, as opposed to doing it in deployer: #1485

How has this been tested? (if applicable)

shuttle_api_start_deployment was ingested by PostHog client.

Copy link
Member

@jonaro00 jonaro00 left a comment

Choose a reason for hiding this comment

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

lgtm

gateway/src/api/latest.rs Show resolved Hide resolved
Copy link
Contributor

@oddgrd oddgrd left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM! I just left a small nit.

Comment on lines 455 to 459
let account_name = scoped_user.user.claim.sub.clone().to_string();

tokio::spawn(async move {
let event =
async_posthog::Event::new("shuttle_api_start_deployment".to_string(), account_name);
Copy link
Contributor

Choose a reason for hiding this comment

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

Small nit:

Suggested change
let account_name = scoped_user.user.claim.sub.clone().to_string();
tokio::spawn(async move {
let event =
async_posthog::Event::new("shuttle_api_start_deployment".to_string(), account_name);
let account_name = scoped_user.user.claim.sub.clone();
tokio::spawn(async move {
let event =
async_posthog::Event::new("shuttle_api_start_deployment", &account_name);

Copy link
Member

Choose a reason for hiding this comment

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

oof, it violated rustfmt (:

@GugaGongadze GugaGongadze merged commit 82f815b into shuttle-hq:main Jan 8, 2024
35 checks passed
@GugaGongadze GugaGongadze deleted the feature/eng-2122-track-start-deployment-event-in-gateway branch January 8, 2024 09:00
oddgrd added a commit that referenced this pull request Jan 8, 2024
* feat: track project deployments

* test: test

* Update gateway/src/api/latest.rs

Co-authored-by: Oddbjørn Grødem <[email protected]>

* fix: formatting

---------

Co-authored-by: Oddbjørn Grødem <[email protected]>
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