open-telemetry / weaver

OTel Weaver lets you easily develop, validate, document, and deploy semantic conventions
Apache License 2.0
56 stars 21 forks source link

Migrate all codegen to weaver #227

Open jsuereth opened 4 months ago

jsuereth commented 4 months ago
joaopgrassi commented 4 months ago

For reference, .NET semconv "package" is here: https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.SemanticConventions

trisch-me commented 4 months ago

for the golang - https://github.com/open-telemetry/opentelemetry-go-build-tools/tree/main/semconvgen

trentm commented 3 months ago

For Node.js/JS/TS https://github.com/open-telemetry/opentelemetry-js/pull/4690 will be migrating semconv codegen to use weaver.

brettmc commented 1 month ago

PHP migration completed and can be checked off...

marcalff commented 3 weeks ago

@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 commented 3 weeks ago

@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 commented 3 weeks ago

@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 commented 3 weeks ago

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

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

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

lquerel commented 3 weeks ago

Created these 2 GH issues: