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

Request logging #36

Closed
davenquinn opened this issue Jul 25, 2024 · 3 comments
Closed

Request logging #36

davenquinn opened this issue Jul 25, 2024 · 3 comments

Comments

@davenquinn
Copy link
Member

davenquinn commented Jul 25, 2024

One of the oldest issues in this repository pertains to the need to show metrics about tile usage #4 . We've actually been capturing statistics about tile usage since the inception of the tileserver v1. Basically,

It would be fairly straightforward to capture similar statistics from the v2 tileserver, with a few caveats:

  • We will need to handle a slightly wider array of distinguishing information such as which route a tile was served from
  • It would be handy to log which maps were served, but this can be inferred later if necessary
  • We have moved to HTTP caching (varnish) over in-memory storage (Redis) for simplicity. However, this means that cached requests cannot be logged using the same approach as db-served requests. This will result in our logs ignoring repeated requests.

Perhaps there's an easy way to adapt varnish logging into this system? Alternatively, we can consider whether to move back to Redis to allow more unified cache handling, at the cost of some additional application complexity.

@davenquinn
Copy link
Member Author

This is a key part of ensuring that we have a good analytics setup in Macrostrat v2, UW-Macrostrat/macrostrat#67.

@davenquinn
Copy link
Member Author

Some information on Varnish logging: https://varnish-cache.org/tips/varnishlog/index.html

@davenquinn
Copy link
Member Author

Per @CannonLock it sounds like we will be handling tileserver logs at the cluster level via Traefik, and parsing inserting into our tileserver logs database.

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

No branches or pull requests

1 participant