Provide an API for usage statistics
complete
Thomas Heyenbrock
complete
Hey folks 👋 we recently shipped a new feature called Custom Attributes that allow you to define HTTP headers that will be stored in our metrics database and made available in the Stellate dashboard. This would enable you to identify individual users by defining a Custom Attribute that stores the value of the
Authorization
header. If the auth token is a JWT, you could even choose to store a specific claim from its payload. The collected data is made available in our GraphQL Metrics in the dashboard, where you can filter by Custom Attribute values and also see a list of all the stored values and their statistics.You can find the documentation here: https://stellate.co/docs/platform/custom-attributes
T
Tim Suchanek
Hey folks, we opened up our GraphQL API recently, which already covers a bunch of these use-cases! https://stellate.co/blog/announcing-our-open-graphql-api
What is still coming is the per user tracking - we will keep this feature request open until we got that done!
Hauke Kopf
As already commented on https://feedback.graphcdn.io/feature-requests/p/filter-analytics (which is quite similar), this would really contribute to the Scopes feature. Putting GraphCDN in front of a multi-tenant service, together with Scope-based caching is already great, but you really need a way to track usage (=cost) for each of the authenticated users. Adding a dedicated GraphCDN endpoint for each tenant, which are all pointing to the same multi-tenant origin service, is very cumbersome. Especially if you only do that for analytics reasons.
Ideally this would work together with claim-based JWT scopes so that even multiple users of the same tenant can be analyzed/tracked as one tenant.
Matt MacGillivray
To add to this, an API that returns the data on the analytics page would allow me to intelligently warm caches based on actual utilization.
It would also allow me to programatically deal with errors, cache misses, etc.