Zipkin 정책 구성 참조
Zipkin 정책 구성 참조 (Zipkin Policy Configuration Reference)
이 문서는 Kong에서 Zipkin 분산 추적 정책을 구성할 때 참고하는 설정 스키마 문서예요. local_service_name이나 tags_header 같은 기본 속성과 함께, 요청에서 추적 컨텍스트를 추출하고 지우고 주입하는 propagation 옵션이 어떻게 정의되어 있는지 보여줘요. b3, jaeger, w3c 같은 다양한 헤더 형식을 어떻게 처리할지 정하고 싶을 때 이 참조를 확인하면 돼요
출처: 문서
본문
{
"properties": {
"config": {
"type": "object",
"properties": {
"local_service_name": {
"type": "string",
"description": "The name of the service as displayed in Zipkin.",
"default": "kong"
},
"tags_header": {
"type": "string",
"description": "The Zipkin policy will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property.",
"default": "Zipkin-Tags"
},
"propagation": {
"type": "object",
"properties": {
"extract": {
"type": "array",
"items": {
"type": "string",
"enum": [
"aws",
"b3",
"datadog",
"gcp",
"instana",
"jaeger",
"ot",
"w3c"
]
},
"description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID."
},
"clear": {
"type": "array",
"items": {
"type": "string"
},
"description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared."
},
"inject": {
"type": "array",
"items": {
"type": "string",
"enum": [
"aws",
"b3",
"b3-single",
"datadog",
"gcp",
"instana",
"jaeger",
"ot",
"preserve",
"w3c"
]
},
"description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests."
},
"default_format": {
"type": "string",
"enum": [
"aws",
"b3",
"b3-single",
"datadog",
"gcp",
"instana",
"jaeger",
"ot",
"w3c"
],
"description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.",
"default": "b3"
}
},
"default": {
"default_format": "b3"
}
},
"http_endpoint": {
"type": "string",
"description": "A string representing a URL, such as https://example.com/path/to/resource?q=search."
},
"include_credential": {
"type": "boolean",
"description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server.",
"default": true
},
"traceid_byte_count": {
"type": "integer",
"enum": [
8,
16
],
"description": "The length in bytes of each request's Trace ID.",
"default": 16
},
"header_type": {
"type": "string",
"enum": [
"aws",
"b3",
"b3-single",
"datadog",
"gcp",
"ignore",
"instana",
"jaeger",
"ot",
"preserve",
"w3c"
],
"description": "All HTTP requests going through the policy are tagged with a tracing HTTP request. This property codifies what kind of tracing header the policy expects on incoming requests",
"default": "preserve"
},
"connect_timeout": {
"type": "integer",
"maximum": 2147483646,
"minimum": 0,
"description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.",
"default": 2000
},
"send_timeout": {
"type": "integer",
"maximum": 2147483646,
"minimum": 0,
"description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.",
"default": 5000
},
"default_service_name": {
"type": "string",
"description": "Set a default service name to override `unknown-service-name` in the Zipkin spans."
},
"default_header_type": {
"type": "string",
"enum": [
"aws",
"b3",
"b3-single",
"datadog",
"gcp",
"instana",
"jaeger",
"ot",
"w3c"
],
"description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers and when `config.header_type` is set to `\"preserve\"`. When `header_type` is set to any other value, `default_header_type` is ignored.",
"default": "b3"
},
"static_tags": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"value"
]
},
"description": "The tags specified on this property will be added to the generated request traces."
},
"read_timeout": {
"type": "integer",
"maximum": 2147483646,
"minimum": 0,
"description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.",
"default": 5000
},
"sample_ratio": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. ",
"default": 0.001
},
"http_span_name": {
"type": "string",
"enum": [
"method",
"method_path"
],
"description": "Specify whether to include the HTTP path in the span name.",
"default": "method"
},
"http_response_header_for_traceid": {
"type": "string"
},
"phase_duration_flavor": {
"type": "string",
"enum": [
"annotations",
"tags"
],
"description": "Specify whether to include the duration of each phase as an annotation or a tag.",
"default": "annotations"
},
"queue": {
"type": "object",
"properties": {
"max_batch_size": {
"type": "integer",
"maximum": 1000000,
"minimum": 1,
"description": "Maximum number of entries that can be processed at a time.",
"default": 1
},
"max_coalescing_delay": {
"type": "number",
"maximum": 3600,
"minimum": 0,
"description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.",
"default": 1
},
"max_entries": {
"type": "integer",
"maximum": 1000000,
"minimum": 1,
"description": "Maximum number of entries that can be waiting on the queue.",
"default": 10000
},
"max_bytes": {
"type": "integer",
"description": "Maximum number of bytes that can be waiting on a queue, requires string content."
},
"max_retry_time": {
"type": "number",
"description": "Time in seconds before the queue gives up calling a failed handler for a batch.",
"default": 60
},
"initial_retry_delay": {
"type": "number",
"maximum": 1000000,
"minimum": 0.001,
"description": "Time in seconds before the initial retry is made for a failing batch.",
"default": 0.01
},
"max_retry_delay": {
"type": "number",
"maximum": 1000000,
"minimum": 0.001,
"description": "Maximum time in seconds between retries, caps exponential backoff.",
"default": 60
},
"concurrency_limit": {
"type": "integer",
"enum": [
-1,
1
],
"description": "The number of of queue delivery timers. -1 indicates unlimited.",
"default": 1
}
}
}
}
}
}
}
더 알아보기 (Learn more)
이 문서에는 원문에서 추출한 별도의 관련 문서 링크가 없어요.