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

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

Open
Kielek opened this issue Nov 6, 2024 · 1 comment
Open
Labels
comp:instrumentation.elasticsearchclient Things related to OpenTelemetry.Instrumentation.ElasticsearchClient contribfest These small and isolated issues are suitable for Kubecon Contribfest enhancement New feature or request

Comments

@Kielek
Copy link
Contributor

Kielek commented Nov 6, 2024

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

@Kielek Kielek added the enhancement New feature or request label Nov 6, 2024
@github-actions github-actions bot added the comp:instrumentation.elasticsearchclient Things related to OpenTelemetry.Instrumentation.ElasticsearchClient label Nov 6, 2024
@Kielek Kielek changed the title [feature request] ElasticSearch - update netwrok sematnic convention [feature request] ElasticSearch - update netwrok semantic convention Nov 6, 2024
Copy link
Contributor

github-actions bot commented Nov 6, 2024

Tagging component owner(s).

@ejsmith

@Kielek Kielek added the contribfest These small and isolated issues are suitable for Kubecon Contribfest label Nov 6, 2024
@Kielek Kielek changed the title [feature request] ElasticSearch - update netwrok semantic convention [feature request] ElasticSearch - update network semantic convention Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:instrumentation.elasticsearchclient Things related to OpenTelemetry.Instrumentation.ElasticsearchClient contribfest These small and isolated issues are suitable for Kubecon Contribfest enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant