Skip to content

feat(server): add MongoDB support for hit counting stuff #2

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

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

ajhalili2006
Copy link
Member

This is a work-in-progress implementation of using MongoDB as the database backend for the hit counter.

What data will be collected?

We only count how many times people navigated to /railway/<slug> and /heroku/<slug> endpoints on the database side.

When a request hits the server, the server will log the request first before redirected to the destination, and the format of that log looks like this:

# These logs will be stored for 90 days on Sentry for debugging and performance purposes only.
# IP addresses and request IDs are not stored on our MongoDB instance.
server-log-analytics: Requested slug: example-slug | Request type: <dev.new|heroku.com/deploy> | Request ID: UUID-V4-FORMAT| IP Address: IP_ADDRESS

Still WIP, please proceed with caution.

Signed-off-by: Andrei Jiroh Eugenio Halili <[email protected]>
Andrei Jiroh Eugenio Halili added 3 commits May 16, 2021 12:59
…on MongoDB side

Still need to fix more issues, such as null logged into console, among other things.

Signed-off-by: Andrei Jiroh Eugenio Halili <[email protected]>
We'll mess up with the database writing stuff later.

Signed-off-by: Andrei Jiroh Eugenio Halili <[email protected]>
Signed-off-by: Andrei Jiroh Eugenio Halili <[email protected]>
@ajhalili2006
Copy link
Member Author

TODO: Since I enabled vigilant mode, I may rewrite these commits to include my PGP keys soon.

@RecapTimeSquad RecapTimeSquad added the enhancement New feature or request label May 23, 2021
@RecapTimeSquad
Copy link
Member

Is it ready for testing before we merge this to development branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants