Skip to content

Commit

Permalink
fix: change semconv of container name (#1575)
Browse files Browse the repository at this point in the history
Co-authored-by: Tamir David <tamirdavid@Tamirs-MacBook-Pro.local>
  • Loading branch information
tamirdavid1 and Tamir David authored Oct 8, 2024
1 parent 880ef68 commit 8b16bd0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions opampserver/pkg/server/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func extractOpampAgentAttributes(agentDescription *protobufs.AgentDescription) o
switch attr.Key {
case string(semconv.TelemetrySDKLanguageKey):
result.ProgrammingLanguage = attr.Value.GetStringValue()
case string(semconv.ContainerNameKey):
case string(semconv.K8SContainerNameKey):
result.ContainerName = attr.Value.GetStringValue()
case string(semconv.K8SPodNameKey):
result.PodName = attr.Value.GetStringValue()
Expand Down Expand Up @@ -250,8 +250,8 @@ func resolveFromDirectAttributes(ctx context.Context, attrs opampAgentAttributes
}
}

serviceName := podInfoResolver.ResolveServiceName(ctx, attrs.PodName, workloadName, &di.ContainerDetails{
PodName: attrs.PodName,
serviceName := podInfoResolver.ResolveServiceName(ctx, workloadName, string(workloadKind), &di.ContainerDetails{
PodNamespace: attrs.Namespace,
})

k8sAttributes := &di.K8sResourceAttributes{
Expand Down

0 comments on commit 8b16bd0

Please sign in to comment.