Using Istio Service Built-in Tags In Tracing

TOC

Feature Overview

A Span Tag refers to key-value pair data attached to a Span, providing specific contextual information for each Span to help developers more easily understand and analyze the characteristics and impact of each operation.

Tags consist of a key and a value, where the key must be of string type, and the value can be a string, boolean, or number.

Tag Categories

Metadata

KeyDescriptionExample Value
errorIndicates whether the Span is an error.true
internal.span.formatThe data format of the Internal Span.zipkin
otel.status_codeThe status of the Span.ERROR
span.kindThe type of Span:
- client: Indicates that the Span is an outbound call (client operation), i.e., a client initiated a request to a service or resource.
- server: Indicates that the Span is an inbound call (server operation), i.e., a server received and processed a request from a client.
- internal: Indicates an internal operation within the application, not involving operations with a remote parent or child.
client

HTTP Request Information

KeyDescriptionExample Value
guid:x-request-id The ID of the request.e02b2515-44bb-95c1-859a-ea13718252ad
http.methodThe HTTP request method.GET
http.protocolThe protocol version used for the HTTP request.HTTP/1.1
http.status_codeThe HTTP status code.200
http.urlThe URL of the request.http://details:9080/details/0
user_agentThe User-Agent request header is a characteristic string that lets the server and peers identify the requesting user's application, operating system, vendor, and/or version.Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
request_sizeThe size of the request in bytes.0
response_flagsEnvoy response flags (see RESPONSE_FLAGS).UH, DC, FI, NC, etc.
response_sizeThe size of the response in bytes.5300
upstreamURLPathThe request path of the API.-

gRPC Request Information

KeyDescriptionExample Value
grpc.authorityThe host of the target service for the gRPC request.grpc-svc-a:9090
grpc.content_typeThe content type of the gRPC communication protocol.application/grpc
grpc.messageDescription of the request status.
Note: Only visible when a non-zero status code is returned.
DATA_LOSS
grpc.pathThe request path for the interface./helloworld.Greeter/SayHello
grpc.status_codeStatus code, ranging from 0 to 15. A code of 0 indicates a correct state; other values indicate an error.15

Service

KeyDescriptionExample Value
asm_upstream_clusterThe upstream service with canary release enabled, i.e., the service end actually accessed by the downstream service (client).details-canary.bookinfo-ns.svc.cluster.local : Indicates that after enabling canary release for the details service, the downstream service actually accesses details-canary.bookinfo-ns.svc.cluster.local.
componentThe component that provides the service.proxy
downstream_clusterThe downstream service, i.e., the client service.outbound|9080||productpage.bookinfo-ns.svc.cluster.local
istio.canonical_revisionThe version of the service.latest
istio.canonical_serviceThe name of the service.productpage
istio.mesh_idThe name of the service mesh.mesh-example
istio.namespaceThe name of the namespace where the service is located.bookinfo-ns
node_idThe ID generated by Istio according to its own rules for the current service.sidecar~10.5.1.189~bookinfo-productpage-6b5b6c6bbd-vdtsp.bookinfo-ns~bookinfo-ns.svc.cluster.local
peer.addressThe IP address or domain name identifying the remote device (peer) communicating with the local device.10.5.1.189
upstream_clusterThe upstream service, i.e., the server service.-outbound|9080||details-canary.bookinfo-ns.svc.cluster.local indicates the upstream service is details-canary.bookinfo-ns.svc.cluster.local.
- inbound|80|| indicates no upstream service.
upstream_cluster.nameThe name of the upstream service.outbound|9080||details-canary.bookinfo-ns.svc.cluster.local

Process

KeyDescriptionExample Value
cluster.nameThe name of the cluster.global
container.nameThe name of the Sidecar container.istio-proxy
host.nameThe name of the Pod.bookinfo-productpage-6b5b6c6bbd-vdtsp
ms.nameThe name of the service.productpage
ms.namespaceThe name of the namespace where the service is located.bookinfo-ns