Skip to content

Experimental network.interface.name is not annotated with semconv_experimental #2550

@lmolkova

Description

@lmolkova

Experimental attribute network.interface.name

///
/// - `"lo"`
/// - `"eth0"`
pub const NETWORK_INTERFACE_NAME: &str = "network.interface.name";

does not have #[cfg(feature = "semconv_experimental")]

It happens because of open-telemetry/semantic-conventions#1777 - this attribute slipped into 1.29.0 semconv without stability set. It's fixed on semconv side and we added checks that would prevent it in the future.

So it should be fixed with the new version of semantic conventions (1.30.0 is coming out in the next few days).

In any case, it'd be best to update this jinja template

{% if attr is experimental %}
#[cfg(feature = "semconv_experimental")]
{% endif %}

to

        {% if attr is not stable %}
#[cfg(feature = "semconv_experimental")]
        {% endif %}

to make sure we add semconv_experimental to everything that's not stable.
(the same pattern is used in metrics, resources, and trace templates)

It seems that semconv artifact is not stable, so it should be ok to do a breaking change.
This attribute is very new and very unlikely to be used by anyone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions