-
Notifications
You must be signed in to change notification settings - Fork 888
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
Code generation fails for SEMCONV 1.19.0 #3299
Comments
I'm not sure if build-tools#133 is related to the issue, but I'm looking into build-tools fix for code generation. |
The problem is in #3188 and #3190 which reuse resource attributes in trace semconv and vice versa. Without these two, java templates work just fine. With them they show a bunch of errors. I believe Java templates work a bit better because they allow taking attributes from everywhere except resources ( I created this issue open-telemetry/build-tools#155 and should be able to work on it in a few days. |
@tsloughter, @marcalff, and everyone else affected, would you mind trying new build-tools version - 0.18.0- with the fix? (thanks for @Oberon00 and @arminru for the help!) It will be necessary to change the generation script to specify which signals to generate using Here's the sample of changes in Java repo: docker run --rm \
-v ${SCRIPT_DIR}/opentelemetry-specification/semantic_conventions:/source \
-v ${SCRIPT_DIR}/templates:/templates \
-v ${ROOT_DIR}/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/:/output \
otel/semconvgen:$GENERATOR_VERSION \
- --exclude resource/** \
+ --only span,event,attribute_group,scope \
-f /source code \
... Resources: docker run --rm \
- -v ${SCRIPT_DIR}/opentelemetry-specification/semantic_conventions/resource/:/source \
+ -v ${SCRIPT_DIR}/opentelemetry-specification/semantic_conventions:/source \
-v ${SCRIPT_DIR}/templates:/templates \
-v ${ROOT_DIR}/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/:/output \
semconvgen:$GENERATOR_VERSION \
+ --only resource \
-f /source code \
.... |
Hm, I'm getting |
Hm, it works if its the first argument. |
Yes, this is a bit of a quirk of Python's argparse: |
Thanks for the fix. It works, see C++ PR: |
Before closing this issue for opentelemetry-specification, please consider to add a CI check, to enforce that semantic conventions always build after a spec semconv change in yaml files. Credits for the idea to @lmolkova , see open-telemetry/build-tools#156 (comment) |
There is no longer a point in implementing a CI check in the specification repository, Closing this issue. |
I can reopen & move it to the semconv repo instead if you prefer |
Using the latest spec 1.19.0 release.
Using build tools 0.17.0
Code generation for semantic conventions misses items in the generated code, leading to build breaks compared to version 1.18.0.
In particular, attributes like
http.method
got moved to common attributes by:However, the code generation tool is not ready for this:
As a result, code generated with spec 1.19.0 + build tool 0.17.0 contains less constant definitions compared to 1.18.0, breaking the build because constants for
http.method
are missing:This is not only blocking for 1.19.0, but will also affect every semantic convention changes done from now on, until the build tools are fixed so that code can be generated again from yaml files.
The text was updated successfully, but these errors were encountered: