Skip to content

Commit

Permalink
change property namespace to service.namespace (#718)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiansheng91 authored Mar 20, 2023
1 parent f391911 commit 8bc931f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/input/skywalkingv2/application_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ func (r *registryInformationCacheImpl) registryApplicationInstances(instances []
properties[skywalkingv3.AttributeProcessID] = item.Value
case "language":
properties[skywalkingv3.AttributeTelemetrySDKLanguage] = item.Value
case "namespace":
properties[skywalkingv3.AttributeServiceNamespace] = item.Value
}
}

Expand Down
6 changes: 6 additions & 0 deletions plugins/input/skywalkingv3/management_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ func (r *ResourcePropertiesCache) filterProperties(properties map[string]string)
delete(properties, "Start Time")
delete(properties, "JVM Arguments")
delete(properties, "Jar Dependencies")

if properties["namespace"] != "" {
properties[AttributeServiceNamespace] = properties["namespace"]
delete(properties, "namespace")
}

return properties
}

Expand Down

0 comments on commit 8bc931f

Please sign in to comment.