This is a very rough outline of the things that need to be done to implement autometrics in another language:
- Research auto-instrumentation libraries for the language
- How do they work? This is mostly to serve as a potential source of inspiration (or maybe we can just use one of those libraries with a little configuration?)
- How does code generation work in the language? Are there macros, decorators, or some other method for generating code?
- Autometrics needs to be able to insert metrics-collection code at the beginning and end of any instrumented function
- Rust does this with an attribute macro
- TypeScript does this at runtime with a wrapper function
- Can this also modify the doc comments of the given function?
- Autometrics needs to be able to insert metrics-collection code at the beginning and end of any instrumented function
- In Rust, macros can add to doc comments