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] StackExchangeRedis- update network semantic convention #2303

Open
Kielek opened this issue Nov 6, 2024 · 1 comment
Open
Labels
comp:instrumentation.stackexchangeredis Things related to OpenTelemetry.Instrumentation.StackExchangeRedis 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, peer.service. 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 (command.EndPoint != null)
{
if (command.EndPoint is IPEndPoint ipEndPoint)
{
activity.SetTag(SemanticConventions.AttributeNetPeerIp, ipEndPoint.Address.ToString());
activity.SetTag(SemanticConventions.AttributeNetPeerPort, ipEndPoint.Port);
}
else if (command.EndPoint is DnsEndPoint dnsEndPoint)
{
activity.SetTag(SemanticConventions.AttributeNetPeerName, dnsEndPoint.Host);
activity.SetTag(SemanticConventions.AttributeNetPeerPort, dnsEndPoint.Port);
}
else
{
activity.SetTag(SemanticConventions.AttributePeerService, command.EndPoint.ToString());
}

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.stackexchangeredis Things related to OpenTelemetry.Instrumentation.StackExchangeRedis label Nov 6, 2024
Copy link
Contributor

github-actions bot commented Nov 6, 2024

Tagging component owner(s).

@matt-hensley

@Kielek Kielek added the contribfest These small and isolated issues are suitable for Kubecon Contribfest label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:instrumentation.stackexchangeredis Things related to OpenTelemetry.Instrumentation.StackExchangeRedis 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