Skip to content

[feature request] ElasticSearch - update network semantic convention #2302

Open
@Kielek

Description

@Kielek

Component

OpenTelemetry.Instrumentation.ElasticsearchClient

Is your feature request related to a problem?

Network semantic convention uses deprecated attributes.
Its need to be updated to the latest one.

What is the expected behavior?

Instrumentation is using new semantic convention for network attributes. It is related to net.peer.ip, net.peer.port, and net.peer.name. All of them should be replaced by network.peer.port and network.peer.address.

For the reference see https://github.com/open-telemetry/semantic-conventions/blob/v1.28.0/docs/database/database-spans.md

Code:

if (uriHostNameType is UriHostNameType.IPv4 or UriHostNameType.IPv6)
{
activity.SetTag(SemanticConventions.AttributeNetPeerIp, uri.Host);
}
else
{
activity.SetTag(SemanticConventions.AttributeNetPeerName, uri.Host);
}
if (uri.Port > 0)
{
activity.SetTag(SemanticConventions.AttributeNetPeerPort, uri.Port);
}

Which alternative solutions or features have you considered?

N/A

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp:instrumentation.elasticsearchclientThings related to OpenTelemetry.Instrumentation.ElasticsearchClientcontribfestThese small and isolated issues are suitable for Kubecon ContribfestenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions