123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974 |
- {
- "swagger": "2.0",
- "info": {
- "title": "api/v1/api.proto",
- "version": "version not set"
- },
- "schemes": [
- "http",
- "https"
- ],
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "paths": {
- "/x/internal/dapper/clt-status": {
- "get": {
- "summary": "CltStatus 获取 collector 信息",
- "operationId": "CltStatus",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/v1CltStatusReply"
- }
- }
- },
- "tags": [
- "DapperQuery"
- ]
- }
- },
- "/x/internal/dapper/depends-rank": {
- "get": {
- "summary": "DependsRank 查询某一个 service_name:operation_name 下所有依赖组件排名",
- "operationId": "DependsRank",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/v1DependsRankReply"
- }
- }
- },
- "parameters": [
- {
- "name": "service_name",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "start",
- "in": "query",
- "required": false,
- "type": "string",
- "format": "int64"
- },
- {
- "name": "end",
- "in": "query",
- "required": false,
- "type": "string",
- "format": "int64"
- },
- {
- "name": "rank_type",
- "description": "排序类型 max_duration 最大耗时, min_duration 最小耗时, avg_duration 平均耗时, errors 错误数.",
- "in": "query",
- "required": false,
- "type": "string"
- }
- ],
- "tags": [
- "DapperQuery"
- ]
- }
- },
- "/x/internal/dapper/depends-topology": {
- "get": {
- "summary": "DependsTopology 获取依赖拓扑图",
- "operationId": "DependsTopology",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/v1DependsTopologyReply"
- }
- }
- },
- "tags": [
- "DapperQuery"
- ]
- }
- },
- "/x/internal/dapper/list-span": {
- "get": {
- "summary": "ListSpan 列出一个 service_name 某一 operation_name 所有采样到 Span",
- "operationId": "ListSpan",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/v1ListSpanReply"
- }
- }
- },
- "parameters": [
- {
- "name": "service_name",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "operation_name",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "start",
- "in": "query",
- "required": false,
- "type": "string",
- "format": "int64"
- },
- {
- "name": "end",
- "in": "query",
- "required": false,
- "type": "string",
- "format": "int64"
- },
- {
- "name": "order",
- "description": "目前支持的 order \ntime:desc time:asc 按时间排序\nduration:desc duration:asc 按耗时排序.",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "only_error",
- "description": "只显示 error 的 span.",
- "in": "query",
- "required": false,
- "type": "boolean",
- "format": "boolean"
- },
- {
- "name": "offset",
- "in": "query",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "type": "integer",
- "format": "int32"
- }
- ],
- "tags": [
- "DapperQuery"
- ]
- }
- },
- "/x/internal/dapper/operation-names": {
- "get": {
- "summary": "ListOperationName 列出某一 service 下所有 operation_name 仅 span.kind 为 server 的 operation_name",
- "operationId": "ListOperationName",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/v1ListOperationNameReply"
- }
- }
- },
- "parameters": [
- {
- "name": "service_name",
- "in": "query",
- "required": false,
- "type": "string"
- }
- ],
- "tags": [
- "DapperQuery"
- ]
- }
- },
- "/x/internal/dapper/operation-names-rank": {
- "get": {
- "summary": "OperationNameRank 查询 OperationName 排名列表",
- "operationId": "OperationNameRank",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/v1OperationNameRankReply"
- }
- }
- },
- "parameters": [
- {
- "name": "service_name",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "start",
- "in": "query",
- "required": false,
- "type": "string",
- "format": "int64"
- },
- {
- "name": "end",
- "in": "query",
- "required": false,
- "type": "string",
- "format": "int64"
- },
- {
- "name": "rank_type",
- "description": "排序类型 max_duration 最大耗时, min_duration 最小耗时, avg_duration 平均耗时, errors 错误数.",
- "in": "query",
- "required": false,
- "type": "string"
- }
- ],
- "tags": [
- "DapperQuery"
- ]
- }
- },
- "/x/internal/dapper/ops-log": {
- "get": {
- "summary": "OpsLog 获取 通过 trace-id 获取 opslog 记录\n如果请求的 trace-id 没有被记录到, 则需要提供 service_name operation_name 和 timestamp 进行模糊查询",
- "operationId": "OpsLog",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/v1OpsLogReply"
- }
- }
- },
- "parameters": [
- {
- "name": "trace_id",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "span_id",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "trace_field",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "service_name",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "operation_name",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "start",
- "description": "开始时间.",
- "in": "query",
- "required": false,
- "type": "string",
- "format": "int64"
- },
- {
- "name": "end",
- "description": "结束时间.",
- "in": "query",
- "required": false,
- "type": "string",
- "format": "int64"
- }
- ],
- "tags": [
- "DapperQuery"
- ]
- }
- },
- "/x/internal/dapper/raw-trace": {
- "get": {
- "summary": "RawTrace 原始 Trace 数据",
- "operationId": "RawTrace",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/v1RawTraceReply"
- }
- }
- },
- "parameters": [
- {
- "name": "trace_id",
- "in": "query",
- "required": false,
- "type": "string"
- }
- ],
- "tags": [
- "DapperQuery"
- ]
- }
- },
- "/x/internal/dapper/sample-point": {
- "get": {
- "summary": "SamplePoint 获取采样点数据",
- "operationId": "SamplePoint",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/v1SamplePointReply"
- }
- }
- },
- "parameters": [
- {
- "name": "service_name",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "operation_name",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "only_error",
- "description": "only_error 在 errors 那个图可以指定为 true.",
- "in": "query",
- "required": false,
- "type": "boolean",
- "format": "boolean"
- },
- {
- "name": "interval",
- "description": "interval 使用 span-series 返回的 interval 即可.",
- "in": "query",
- "required": false,
- "type": "string",
- "format": "int64"
- },
- {
- "name": "time",
- "description": "time 使用 time-series 返回的时间即可,相同格式型如 2006-01-02T15:04:05.",
- "in": "query",
- "required": false,
- "type": "string"
- }
- ],
- "tags": [
- "DapperQuery"
- ]
- }
- },
- "/x/internal/dapper/service-depend": {
- "get": {
- "summary": "ServiceDepend 查询服务的直接依赖\nTODO: 通过最近收集的到3 个 span 实时计算的,在当前查询的服务出现不正常的时候,查询结果可能不准确",
- "operationId": "ServiceDepend",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/v1ServiceDependReply"
- }
- }
- },
- "parameters": [
- {
- "name": "service_name",
- "description": "service_name 不解释!.",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "operation_name",
- "description": "operation_name 当 operation_name 为空时查询所有 operation_name 然后 merge 结果.",
- "in": "query",
- "required": false,
- "type": "string"
- }
- ],
- "tags": [
- "DapperQuery"
- ]
- }
- },
- "/x/internal/dapper/service-names": {
- "get": {
- "summary": "ListServiceName 列出所有 service",
- "operationId": "ListServiceName",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/v1ListServiceNameReply"
- }
- }
- },
- "tags": [
- "DapperQuery"
- ]
- }
- },
- "/x/internal/dapper/span-series": {
- "get": {
- "summary": "SpanSeries 获取 span 的时间序列数据",
- "operationId": "SpanSeries",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/v1SpanSeriesReply"
- }
- }
- },
- "parameters": [
- {
- "name": "service_name",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "operation_name",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "start",
- "in": "query",
- "required": false,
- "type": "string",
- "format": "int64"
- },
- {
- "name": "end",
- "in": "query",
- "required": false,
- "type": "string",
- "format": "int64"
- },
- {
- "name": "fields",
- "description": "可选的 fields 有 max_duration, min_duration, avg_duration, errors\n其中除 errors 返回的是一段时间内的总数 其他返回的都是平均数\nfields 是个数组可以通过 fields=max_duration,min_duration,avg_duration 逗号分隔.",
- "in": "query",
- "required": false,
- "type": "string"
- }
- ],
- "tags": [
- "DapperQuery"
- ]
- }
- },
- "/x/internal/dapper/trace": {
- "get": {
- "summary": "Trace 查询一个 Trace",
- "operationId": "Trace",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/v1TraceReply"
- }
- }
- },
- "parameters": [
- {
- "name": "trace_id",
- "in": "query",
- "required": false,
- "type": "string"
- },
- {
- "name": "span_id",
- "in": "query",
- "required": false,
- "type": "string"
- }
- ],
- "tags": [
- "DapperQuery"
- ]
- }
- }
- },
- "definitions": {
- "v1Client": {
- "type": "object",
- "properties": {
- "addr": {
- "type": "string"
- },
- "err_count": {
- "type": "string",
- "format": "int64"
- },
- "rate": {
- "type": "string",
- "format": "int64"
- },
- "up_time": {
- "type": "string",
- "format": "int64"
- }
- }
- },
- "v1CltNode": {
- "type": "object",
- "properties": {
- "node": {
- "type": "string"
- },
- "queue_len": {
- "type": "string",
- "format": "int64"
- },
- "clients": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/v1Client"
- }
- }
- }
- },
- "v1CltStatusReply": {
- "type": "object",
- "properties": {
- "nodes": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/v1CltNode"
- }
- }
- }
- },
- "v1DependsRankReply": {
- "type": "object",
- "properties": {
- "rank_type": {
- "type": "string"
- },
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/v1RankItem"
- }
- }
- }
- },
- "v1DependsTopologyItem": {
- "type": "object",
- "properties": {
- "service_name": {
- "type": "string"
- },
- "depend_on": {
- "type": "string"
- }
- }
- },
- "v1DependsTopologyReply": {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/v1DependsTopologyItem"
- }
- }
- }
- },
- "v1Field": {
- "type": "object",
- "properties": {
- "key": {
- "type": "string"
- },
- "value": {
- "type": "string"
- }
- }
- },
- "v1ListOperationNameReply": {
- "type": "object",
- "properties": {
- "operation_names": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "v1ListServiceNameReply": {
- "type": "object",
- "properties": {
- "service_names": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "v1ListSpanReply": {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/v1SpanListItem"
- }
- }
- }
- },
- "v1Log": {
- "type": "object",
- "properties": {
- "timestamp": {
- "type": "string",
- "format": "int64"
- },
- "fields": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/v1Field"
- }
- }
- }
- },
- "v1OperationNameRankReply": {
- "type": "object",
- "properties": {
- "rank_type": {
- "type": "string"
- },
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/v1RankItem"
- }
- }
- }
- },
- "v1OpsLogRecord": {
- "type": "object",
- "properties": {
- "time": {
- "type": "string"
- },
- "fields": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/definitions/v1TagValue"
- }
- },
- "level": {
- "type": "string"
- },
- "message": {
- "type": "string"
- }
- }
- },
- "v1OpsLogReply": {
- "type": "object",
- "properties": {
- "records": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/v1OpsLogRecord"
- }
- }
- }
- },
- "v1RankItem": {
- "type": "object",
- "properties": {
- "service_name": {
- "type": "string"
- },
- "operation_name": {
- "type": "string"
- },
- "value": {
- "type": "number",
- "format": "double",
- "title": "当 rank type 是 max_duration, min_duration, avg_duration 时 value 是纳秒\n当 rank type 是 errors 是 value 是错误数"
- }
- }
- },
- "v1RawTraceReply": {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/v1Span"
- }
- }
- }
- },
- "v1SamplePointItem": {
- "type": "object",
- "properties": {
- "trace_id": {
- "type": "string"
- },
- "span_id": {
- "type": "string"
- },
- "duration": {
- "type": "string",
- "format": "int64"
- },
- "is_error": {
- "type": "boolean",
- "format": "boolean"
- }
- }
- },
- "v1SamplePointReply": {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/v1SamplePointItem"
- }
- }
- }
- },
- "v1SeriesItem": {
- "type": "object",
- "properties": {
- "field": {
- "type": "string",
- "title": "名称一般是请求的 field+{count|mean}"
- },
- "values": {
- "type": "array",
- "items": {
- "type": "string",
- "format": "int64"
- }
- }
- }
- },
- "v1ServiceDependItem": {
- "type": "object",
- "properties": {
- "service_name": {
- "type": "string",
- "title": "service_name 依赖服务名称, service 为 AppID 其他为组件名 mysql, redis, http 等"
- },
- "component": {
- "type": "string",
- "title": "component, 通讯组件 e.g. net/http, goRPC, gRPC"
- },
- "operation_names": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "title": "operation_names 被依赖服务的 operation_names, mysql, redis 等为空"
- }
- }
- },
- "v1ServiceDependReply": {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/v1ServiceDependItem"
- }
- }
- }
- },
- "v1Span": {
- "type": "object",
- "properties": {
- "service_name": {
- "type": "string"
- },
- "operation_name": {
- "type": "string"
- },
- "trace_id": {
- "type": "string"
- },
- "span_id": {
- "type": "string"
- },
- "parent_id": {
- "type": "string"
- },
- "start_time": {
- "type": "string",
- "format": "int64"
- },
- "duration": {
- "type": "string",
- "format": "int64"
- },
- "tags": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/definitions/v1TagValue"
- }
- },
- "logs": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/v1Log"
- }
- },
- "level": {
- "type": "integer",
- "format": "int32"
- },
- "childs": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/v1Span"
- }
- }
- }
- },
- "v1SpanListItem": {
- "type": "object",
- "properties": {
- "trace_id": {
- "type": "string"
- },
- "span_id": {
- "type": "string"
- },
- "parent_id": {
- "type": "string"
- },
- "service_name": {
- "type": "string"
- },
- "operation_name": {
- "type": "string"
- },
- "start_time": {
- "type": "string"
- },
- "duration": {
- "type": "string"
- },
- "tags": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/definitions/v1TagValue"
- }
- },
- "is_error": {
- "type": "boolean",
- "format": "boolean",
- "title": "Deprecated: use tags"
- },
- "container_ip": {
- "type": "string"
- },
- "region_zone": {
- "type": "string"
- },
- "mark": {
- "type": "string"
- }
- }
- },
- "v1SpanSeriesReply": {
- "type": "object",
- "properties": {
- "interval": {
- "type": "string",
- "format": "int64",
- "title": "返回点的间隔"
- },
- "times": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/v1SeriesItem"
- }
- }
- }
- },
- "v1TagValue": {
- "type": "object",
- "properties": {
- "string_value": {
- "type": "string"
- },
- "int64_value": {
- "type": "string",
- "format": "int64"
- },
- "bool_value": {
- "type": "boolean",
- "format": "boolean"
- },
- "float_value": {
- "type": "number",
- "format": "float"
- }
- }
- },
- "v1TraceReply": {
- "type": "object",
- "properties": {
- "service_count": {
- "type": "integer",
- "format": "int32"
- },
- "span_count": {
- "type": "integer",
- "format": "int32"
- },
- "max_level": {
- "type": "integer",
- "format": "int32"
- },
- "root": {
- "$ref": "#/definitions/v1Span"
- }
- }
- }
- }
- }
|