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

[Product Data] Second step in gateway usage data collection #4964

Merged
merged 3 commits into from
Oct 14, 2024

Conversation

simonwicky
Copy link
Contributor

@simonwicky simonwicky commented Oct 11, 2024

Overview

This PR is the second step towards collecting data on gateway usage.
It builds on top of #4963

What it does

Turn the data collection into an event-based one, which allows more accurate results and more flexibility for future data collection.


This change is Reviewable

common/statistics/Cargo.toml Outdated Show resolved Hide resolved
common/statistics/Cargo.toml Outdated Show resolved Hide resolved
common/statistics/src/events.rs Outdated Show resolved Hide resolved
gateway/src/node/client_handling/active_clients.rs Outdated Show resolved Hide resolved
gateway/src/node/client_handling/active_clients.rs Outdated Show resolved Hide resolved
gateway/src/node/mod.rs Outdated Show resolved Hide resolved
gateway/src/node/statistics/mod.rs Outdated Show resolved Hide resolved
gateway/src/node/statistics/mod.rs Show resolved Hide resolved
gateway/src/node/statistics/sessions.rs Outdated Show resolved Hide resolved
common/statistics/Cargo.toml Show resolved Hide resolved
Copy link

vercel bot commented Oct 14, 2024

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

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
nym-explorer ⬜️ Ignored (Inspect) Visit Preview Oct 14, 2024 8:26am
nym-next-explorer ⬜️ Ignored (Inspect) Visit Preview Oct 14, 2024 8:26am

@simonwicky
Copy link
Contributor Author

@octol
Note from that PR about that comment #4963 (comment) :
The statistics collector here is made to allow more than just the Session collection module, so it is assumed to be always running. Hence the fact that it's not fixed here (unless you have another suggestion)

@simonwicky simonwicky requested a review from octol October 14, 2024 08:38
@simonwicky simonwicky merged commit ef23cc6 into simon/product_data Oct 14, 2024
18 checks passed
@simonwicky simonwicky deleted the simon/gateway_stats_collector branch October 14, 2024 12:41
simonwicky added a commit that referenced this pull request Oct 15, 2024
* add stats model

* add stats collection

* add stats route

* propagate stuff and run stuff

* cargo stuff

* sqlx unused what?

* add sessions started stat

* session durations in miliseconds

* apply Jon's comments

* [Product Data] Second step in gateway usage data collection  (#4964)

* turn stats collection into event based

* move events into a common crate for future use elsewhere

* apply Jon's comments
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.

2 participants