openapi-ts
openapi-ts copied to clipboard
Add telemetry
We want to know how people use this library and that's currently hard because we rely on them reporting usage on GitHub.
Resources:
- https://bettercli.org/design/collecting-analytics/
- https://bettercli.org/design/debugging/
Objectives:
- [ ] measure how long it takes to generate types/client
- [ ] measure input OAS size, LOC, etc
- [ ] report on error, try to provide as much information as possible to debug without sharing sensitive data (e.g. config settings)
- [ ] log current package version and config
I would suggest not doing this for now. The size of the project doesn't really warrant it, nor has the trust been built yet in the ecosystem for telemetry data to be sent to some private server. Additionally, much, much, much larger projects are successful without telemetry. Telemetry also makes usage in a corporate environment a bit trickier, and no wants to deal with that complication for a project that hasn't really proven itself yet.
@johnpyp I should've clarified in the description, it would be an opt-out telemetry, similarly to Sentry for example
Gotcha, yeah if it's 100% opt in and the default usage is disabled, that sounds good to me.
On that note, I'd definitely recommend using standard opentelemetry semantics for the instrumentation. I know many users would love to be able to point it at their own collector endpoint so being able to configure an endpoint and key with environment variables would be great.
Do you have experience with building telemetry for CLIs? Might need a hand with this... it's not urgent, but it would certainly help with deciding which features can be safely removed and alert us about issues before people report them (if they do at all).