Closed YaoZengzeng closed 4 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Flag | Coverage Δ | |
---|---|---|
unittests | 30.99% <ø> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: hzxuzhonghu
The full list of commands accepted by this bot can be found here.
The pull request process is described here
What type of PR is this?
/kind enhancement
use
peer_metadata
http filter to get pod metadata from istiodWhat this PR does / why we need it:
So we could get necessary fields to fill observability information
Before this modification, the metric is :
istio_requests_total{reporter="destination",source_workload="unknown",source_canonical_service="unknown",source_canonical_revision="latest",source_workload_namespace="unknown",source_principal="unknown",source_app="unknown",source_version="unknown",source_cluster="unknown",destination_workload="reviews-v1",destination_workload_namespace="default",destination_principal="unknown",destination_app="unknown",destination_version="unknown",destination_service="reviews.default.svc.cluster.local",destination_canonical_service="reviews",destination_canonical_revision="v1",destination_service_name="reviews",destination_service_namespace="default",destination_cluster="Kubernetes",request_protocol="http",response_code="200",grpc_response_status="",response_flags="-",connection_security_policy="none"} 93
After this modification:
istio_requests_total{reporter="destination",source_workload="productpage-v1",source_canonical_service="productpage",source_canonical_revision="v1",source_workload_namespace="default",source_principal="unknown",source_app="productpage",source_version="v1",source_cluster="Kubernetes",destination_workload="reviews-v1",destination_workload_namespace="default",destination_principal="unknown",destination_app="unknown",destination_version="unknown",destination_service="reviews.default.svc.cluster.local",destination_canonical_service="reviews",destination_canonical_revision="v1",destination_service_name="reviews",destination_service_namespace="default",destination_cluster="Kubernetes",request_protocol="http",response_code="200",grpc_response_status="",response_flags="-",connection_security_policy="none"} 1
And the metric from waypoint in ambient mesh:
istio_requests_total{reporter="destination",source_workload="productpage-v1",source_canonical_service="productpage",source_canonical_revision="v1",source_workload_namespace="default",source_principal="spiffe://cluster.local/ns/default/sa/bookinfo-productpage",source_app="productpage",source_version="v1",source_cluster="Kubernetes",destination_workload="reviews-v1",destination_workload_namespace="default",destination_principal="spiffe://cluster.local/ns/default/sa/bookinfo-reviews-istio-waypoint",destination_app="unknown",destination_version="unknown",destination_service="reviews.default.svc.cluster.local",destination_canonical_service="reviews",destination_canonical_revision="v1",destination_service_name="reviews",destination_service_namespace="default",destination_cluster="Kubernetes",request_protocol="http",response_code="200",grpc_response_status="",response_flags="-",connection_security_policy="mutual_tls"} 34
We have basically filled in all the fields, compared with ambient.
Which issue(s) this PR fixes: Fixes part of #320
Special notes for your reviewer:
Does this PR introduce a user-facing change?: