-
Notifications
You must be signed in to change notification settings - Fork 58
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
Support clarifying shared attributes in other files #41
Comments
For an example see this generated file that uses |
@weyert Can you provide a link to your template? If you just do something like |
No, you used it exactly as designed. This is why |
@Oberon00 Interesting I didn't know that. The template file can be found here: https://github.com/open-telemetry/opentelemetry-js/blob/9b889efff306715adb6136b9e84539da3d20be0a/scripts/semconv/templates/SemanticAttributes.ts.j2 |
This is the property you probably need to filter on: https://github.com/open-telemetry/build-tools/blob/v0.3.1/semantic-conventions/src/opentelemetry/semconv/model/semantic_attribute.py#L82-L84. Using https://jinja.palletsprojects.com/en/2.11.x/templates/#selectattr should work. |
Actually by using |
Thank you, I will give this a try and report back |
Looks ike I was able to make it work with:
|
…3047) * Update semantic convention constants generator script, template and spec reference The template was updated to reflect the changes introduced in otel/semconvgen v0.3.0 and v0.3.1. The script was updated to pin the version of the otel/semconvgen image, otherwise incompatible updates would break it. Fixes #3042. * ./generate.sh * Update template according to open-telemetry/build-tools#41 * ./generate.sh The template was updated to use the correct base definitions, so the Javadoc for some attributes changed (the ones for `rpc.*`, for example). This also changed the ordering but it is still reproducible.
Currently, the way to refer to another attribute while clarifying its usage in a downstream semantic convention file, for example how aws-sdk does here
https://github.com/open-telemetry/opentelemetry-specification/blob/412fb5774cefc32ff9b7f47ef80e9e7d245e1e2e/semantic_conventions/trace/instrumentation/aws-sdk.yml#L13
The code generator seems to not correctly use the base definition. Perhaps this was too hacky of a way to do this approach but I think we need a way to refer to convventions from other files, and without breaking generation.
Also see:
open-telemetry/opentelemetry-specification#1607
/cc @weyert
The text was updated successfully, but these errors were encountered: