-
-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Currently, the code generation scripts are not well structured and maintainable.
This is okay, as what we really care is the generated code at the end of the day.
However, this also makes it increasingly hard over time to generate code for new entities/concepts we might want to support in the conventions, and make sure the generated code is correct.
We should move to a more maintainable way of generating code.
The preferable solution to address this problem in my opinion is to use a templating language, specifically Jinja.
We would have a standardized way of feeding the JSON model into the templates, and templates to generate code for each platform.
An advantage of using Jinja specifically is that OTEL itself uses Jinja for their opentelemetry-semantic-conventions for all their SDKs.
This means that we would likely be able to use their templates for attributes and simply extend them to support our other concepts, significantly reducing the work needed to support all platforms and converging on a standardized solution.