micro-analytics / micro-analytics/micro-analytics-cli
wildcard search in ?all
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 732
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
So, trying to mimic some really expressive behavior that grafana uses. They allow you to track metrics with keys like: a.b.c.d.e and you can do analytics/querying based on searches of a.b.*.d.e. Note, using dots instead of slashes wouldn't change how this is implemented.
A real world scenario around this:
myapp.*.logins
where the convention used is myapp.version.logins.
That query (services.com/myapp.*.logins?all=true) allows you to get all login event metrics across all versions/deploys and can compare. A/B testing and a lot of things would be enabled by this.
I'd imagine we would just pass the raw string to the db adaptor and let them figure out how to parse/support it. For the file-db adaptor, should be a simple change of the filter to use a regex. Something along the lines of key.match(new RegExp('^' + options.pathname.replace('*','.*')))
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the ?all query handling and the file-db adaptor to find where pathname filtering is applied. Check how the adaptor receives the raw key pattern, then verify that a query such as myapp.*.logins matches keys across versions while preserving the existing exact-key behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- api, backend, database
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100