Maintainable code generation
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
- Domain
- build-system, tooling
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
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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/sentry-conventions
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
getsentry/sentry-conventions#732 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
getsentry/sentry-conventions#731 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
getsentry/sentry-conventions#730 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 50/100
getsentry/sentry-conventions#709 · 1 comment ·
Maintainers usually reply within 1 day
-
Span SpecificationsOpen
Difficulty 5/5 Over a week Newbie friendliness 35/100
getsentry/sentry-conventions#659 · 1 comment ·
Maintainers usually reply within 1 day
All issues in getsentry/sentry-conventions
Similar issues
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixPossibly taken @ItsDeadlyProgrammer claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
appsmithorg/appsmith#42471 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ehmpathy/rhachet-roles-bhrain#705 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Status: Triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
mermaid-js/mermaid#8546 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
braintrustdata/braintrust-sdk-javascript#2659 ·
Maintainers usually reply within 1 day