未验证 提交 4df62b62 编写于 作者: K kezhenxu94 提交者: GitHub

Fix TCP service instances are lack of instance properties like `pod` and...

Fix TCP service instances are lack of instance properties like `pod` and `namespace`, which causes Pod log not to work for TCP workloads (#10252)
上级 c484e3ec
......@@ -75,6 +75,7 @@
* Add `BanyanDB.StoreIDTag` to store a process's id for searching.
* [**Breaking Change**] The supported version of ShardingSphere-Proxy is upgraded from 5.1.2 to 5.3.1. Due to the changes of ShardingSphere's API, versions before 5.3.1 are not compatible.
* Add the eBPF network profiling E2E Test in the per storage.
* Fix TCP service instances are lack of instance properties like `pod` and `namespace`, which causes Pod log not to work for TCP workloads.
#### UI
......
......@@ -25,6 +25,7 @@ import io.envoyproxy.envoy.data.accesslog.v3.TCPAccessLogEntry;
import java.util.Optional;
import lombok.RequiredArgsConstructor;
import org.apache.skywalking.apm.network.common.v3.DetectPoint;
import org.apache.skywalking.apm.network.common.v3.KeyStringValuePair;
import org.apache.skywalking.apm.network.servicemesh.v3.TCPServiceMeshMetric;
import org.apache.skywalking.oap.server.receiver.envoy.als.ServiceMetaInfo;
......@@ -113,6 +114,26 @@ public class TCPLogEntry2MetricsAdapter {
.map(ServiceMetaInfo::getServiceInstanceName)
.ifPresent(builder::setDestServiceInstance);
Optional
.ofNullable(sourceService)
.map(ServiceMetaInfo::getTags)
.ifPresent(tags -> {
tags.forEach(p -> {
builder.addSourceInstanceProperties(
KeyStringValuePair.newBuilder().setKey(p.getKey()).setValue(p.getValue()));
});
});
Optional
.ofNullable(targetService)
.map(ServiceMetaInfo::getTags)
.ifPresent(tags -> {
tags.forEach(p -> {
builder.addDestInstanceProperties(
KeyStringValuePair.newBuilder().setKey(p.getKey()).setValue(p.getValue()));
});
});
return builder;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册