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

Update semconv scripts to support extended stability levels #823

Open
lmolkova opened this issue Jan 22, 2025 · 0 comments
Open

Update semconv scripts to support extended stability levels #823

lmolkova opened this issue Jan 22, 2025 · 0 comments

Comments

@lmolkova
Copy link

lmolkova commented Jan 22, 2025

Erlang uses exact match for stability

weaver registry generate --registry=semtmp/model --templates=templates --param output=lib/incubating/ --param stability=experimental elixir .

It works great for stable level, but we're adopting other levels (open-telemetry/semantic-conventions#1096) in semconv and starting to use development, rc.

You can either leverage new semconv_grouped_attributes helper in weaver

(e.g. here's how Java uses it)

  - pattern: SemanticAttributes.java.j2
    filter: >
      semconv_grouped_attributes({
        "exclude_root_namespace": $excluded_namespaces,
        "exclude_stability": ["experimental"] # experimental here is fine, weaver matches all non-stable things to it
      }) | map({
          root_namespace: .root_namespace,
          attributes: .attributes,
          excluded_attributes: $excluded_attributes
      })

or replace logic inside

{%- if params.stability == "experimental" and (ctx.all_attributes | length) > (ctx.attributes | length) %}
to cover other stability levels.

E.g. you might find weaver experimental and other similar helpers useful.

{% if attribute is experimental %}
...
{% if attribute is stable%}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant