Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Analysis Tools Awards #27

Open
mre opened this issue Nov 23, 2020 · 3 comments
Open

Analysis Tools Awards #27

mre opened this issue Nov 23, 2020 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@mre
Copy link
Member

mre commented Nov 23, 2020

Now that we get quite a bit of traffic on the website, we could start to provide a badge for the top N tools that we calculate from our webserver monitoring every month.

Posting the query here for future reference:

topk(20, sum(count_over_time({domain=~"(analysis-tools\\.dev|www\\.analysis-tools\\.dev)", path=~"/tool/.*"} [$__range])) by (path))
@jakubsacha
Copy link
Collaborator

Where do you invoke that query? In the cloudflare?

@mre
Copy link
Member Author

mre commented Nov 23, 2020

On https://dash.jorgelbg.me. It's not publicly accessible, but I think we can query the Loki endpoint. My idea was to write a cronjob that fetches the information once per week and renders a static JSON with the top N tools which can then be used by Gatsby during the build process. We might have an optional top-badge, field for each node that points to a pre-rendered image. This way we can also show it on Github if we wanted (e.g. on our static-analysis repo or send a PR to the top tools).

@mre
Copy link
Member Author

mre commented Dec 2, 2020

Posting my progress here so that I don't forget.

curl -G -s "http://loki.jorgelbg.me/loki/api/v1/query_range" --data-urlencode 'query=topk(20, sum(count_over_time({domain=~"(analysis-tools\\.dev|www\\.analysis-tools\\.dev)", path=~"/tool/.*"} [6d])) by (path))' --data-urlencode 'step=300' -H 'X-Scope-OrgID: xxxxx' | jq

@mre mre added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Apr 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants