Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Maintainable code generation

Open
#180 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
json, typescript

Research direction

Start by reviewing the existing code generation scripts and the JSON model they consume, then compare the approach with OpenTelemetry's Jinja templates. Done means the generation process is more maintainable, supports adding new entities and concepts across platforms, and continues to produce correct generated code.

Written by the indexing model from the issue text.

Description

Improvement

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.

Dominant language
TypeScript
Stars
16
Forks
7
Avg merge
2d 9h
Merged PRs (30d)
63

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getsentry/sentry-conventions

All issues in getsentry/sentry-conventions

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.