Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate all codegen to weaver #227

Open
11 of 16 tasks
jsuereth opened this issue Jul 3, 2024 · 9 comments
Open
11 of 16 tasks

Migrate all codegen to weaver #227

jsuereth opened this issue Jul 3, 2024 · 9 comments
Labels
project An issue tracking an effort within semantic convention tooliNG SIG

Comments

@jsuereth
Copy link
Contributor

jsuereth commented Jul 3, 2024

@jsuereth jsuereth converted this from a draft issue Jul 3, 2024
@joaopgrassi
Copy link
Member

@trisch-me
Copy link
Contributor

@trentm
Copy link

trentm commented Aug 1, 2024

For Node.js/JS/TS open-telemetry/opentelemetry-js#4690 will be migrating semconv codegen to use weaver.

@brettmc
Copy link

brettmc commented Oct 17, 2024

PHP migration completed and can be checked off...

@marcalff
Copy link
Member

@open-telemetry/weaver-maintainers

Please take a look at the opentelemetry-cpp migration to weaver:

Looking for any feedback or suggestions on the weaver / jinja code in particular.

@lquerel
Copy link
Contributor

lquerel commented Oct 31, 2024

@marcalff

Looking for any feedback or suggestions on the weaver / jinja code in particular.

Very nice use of Weaver.

On your side, do you see any areas for improvement in Weaver that would make things easier for you?

@marcalff
Copy link
Member

@marcalff

Looking for any feedback or suggestions on the weaver / jinja code in particular.

Very nice use of Weaver.

On your side, do you see any areas for improvement in Weaver that would make things easier for you?

Yes, I have a few suggestions.

When a developer find a weaver.yaml file, of a jinja file, and sees it the first time,
it gets extremely challenging to know what to do about it, if a change even minor is required in the file.

If I find a C++ or java file, I know where to find doc about the C++ or java library, language syntax, etc.

If I find weaver.yaml, I can only stare at the content and be stuck.

Do not assume people will know of, or even have heard of, weaver and jinja, and even less that they will know where to find doc about it.

This is why I added systematically pointers to the DOC, in comments, in these files, for opentelemetry-cpp.

I think it will be beneficial to add that in the examples and templates.

By pointers to the doc, I mean something like this:

{#
  Copyright The OpenTelemetry Authors
  SPDX-License-Identifier: Apache-2.0
  This file is:
  - a Jinja template,
  - used to generate semantic conventions,
  - using weaver.
  For doc on the template syntax:
  https://jinja.palletsprojects.com/en/3.0.x/
  For doc on the semantic conventions:
  https://github.com/open-telemetry/semantic-conventions
  For doc on weaver:
  https://github.com/open-telemetry/weaver
#}```

@marcalff
Copy link
Member

marcalff commented Oct 31, 2024

Also, systematically adding a comment in the generated code, to indicate:

  • that it is generated code
  • where it is generated from

should be strongly suggested as a best practice, in the jinja templates.

Not all SIG are doing this, from what I could find.

@jsuereth jsuereth added the project An issue tracking an effort within semantic convention tooliNG SIG label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project An issue tracking an effort within semantic convention tooliNG SIG
Projects
Status: Migrate to weaver
Development

No branches or pull requests

7 participants