Support service level metrics aggregate when missing pod context in eBPF Access Log Receiver (#12608)
This commit is contained in:
parent
a9d6f2ab85
commit
1ff0c57073
|
|
@ -181,7 +181,7 @@ jobs:
|
|||
-Dcheckstyle.skip
|
||||
- name: Verify builds are reproducible
|
||||
run: ./mvnw -Dmaven.test.skip clean verify artifact:compare -Pall
|
||||
- uses: actions/upload-artifact@v3
|
||||
- uses: actions/upload-artifact@v4
|
||||
name: Upload distribution tar
|
||||
with:
|
||||
name: dist
|
||||
|
|
@ -202,7 +202,7 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v4
|
||||
name: Download distribution tar
|
||||
with:
|
||||
name: dist
|
||||
|
|
@ -220,7 +220,7 @@ jobs:
|
|||
docker save -o docker-images-skywalking-oap.tar skywalking/oap:latest
|
||||
docker save -o docker-images-skywalking-ui.tar skywalking/ui:latest
|
||||
- name: Upload docker images
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: docker-images-${{ matrix.java-version }}
|
||||
path: docker-images-skywalking-*.tar
|
||||
|
|
@ -694,7 +694,7 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v4
|
||||
name: Download docker images
|
||||
with:
|
||||
name: docker-images-11
|
||||
|
|
@ -733,7 +733,7 @@ jobs:
|
|||
df -h
|
||||
du -sh .
|
||||
docker images
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: ${{ failure() }}
|
||||
name: Upload Logs
|
||||
with:
|
||||
|
|
@ -766,7 +766,7 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v4
|
||||
name: Download docker images
|
||||
with:
|
||||
name: docker-images-11
|
||||
|
|
@ -794,7 +794,7 @@ jobs:
|
|||
df -h
|
||||
du -sh .
|
||||
docker images
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: ${{ failure() }}
|
||||
name: Upload Logs
|
||||
with:
|
||||
|
|
@ -817,7 +817,7 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v4
|
||||
name: Download docker images
|
||||
with:
|
||||
name: docker-images-${{ matrix.java-version }}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@
|
|||
* Nacos as config server and cluster coordinator supports configuration contextPath.
|
||||
* Update the endpoint name format to `<Method>:<Path>` in eBPF Access Log Receiver.
|
||||
* Add self-observability metrics for OpenTelemetry receiver.
|
||||
* Support service level metrics aggregate when missing pod context in eBPF Access Log Receiver.
|
||||
|
||||
#### UI
|
||||
|
||||
|
|
|
|||
|
|
@ -486,6 +486,10 @@ public class AccessLogServiceHandler extends EBPFAccessLogServiceGrpc.EBPFAccess
|
|||
}
|
||||
|
||||
protected KubernetesProcessAddress buildKubernetesAddressByIP(NodeInfo nodeInfo, IPAddress ipAddress) {
|
||||
final ObjectID service = K8sInfoRegistry.getInstance().findServiceByIP(ipAddress.getHost());
|
||||
if (service != ObjectID.EMPTY) {
|
||||
return buildRemoteAddress(nodeInfo, service, null);
|
||||
}
|
||||
final ObjectID pod = K8sInfoRegistry.getInstance().findPodByIP(ipAddress.getHost());
|
||||
if (pod == ObjectID.EMPTY) {
|
||||
// if cannot found the address, then return the unknown address
|
||||
|
|
@ -513,7 +517,7 @@ public class AccessLogServiceHandler extends EBPFAccessLogServiceGrpc.EBPFAccess
|
|||
}
|
||||
return KubernetesProcessAddress.newBuilder()
|
||||
.setServiceName(serviceName)
|
||||
.setPodName(pod.name())
|
||||
.setPodName(pod == null ? "" : pod.name())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
@ -585,7 +589,7 @@ public class AccessLogServiceHandler extends EBPFAccessLogServiceGrpc.EBPFAccess
|
|||
}
|
||||
|
||||
public K8SServiceInstance toServiceInstance() {
|
||||
if (Objects.equals(local, buildUnknownAddress())) {
|
||||
if (Objects.equals(local, buildUnknownAddress()) || StringUtil.isEmpty(local.getPodName())) {
|
||||
return null;
|
||||
}
|
||||
final K8SServiceInstance serviceInstance = new K8SServiceInstance();
|
||||
|
|
@ -619,6 +623,9 @@ public class AccessLogServiceHandler extends EBPFAccessLogServiceGrpc.EBPFAccess
|
|||
}
|
||||
|
||||
public K8SServiceInstanceRelation toServiceInstanceRelation() {
|
||||
if (StringUtil.isEmpty(local.getPodName()) || StringUtil.isEmpty(remote.getPodName())) {
|
||||
return null;
|
||||
}
|
||||
final Tuple2<KubernetesProcessAddress, KubernetesProcessAddress> tuple = convertSourceAndDestAddress();
|
||||
final K8SServiceInstanceRelation serviceInstanceRelation = new K8SServiceInstanceRelation();
|
||||
final String sourceServiceName = buildServiceNameByAddress(nodeInfo, tuple._1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue