跳转到主要内容
监控与采集相关接口/日志
POSTLogging起始版本 1.0同步需要认证

创建已过滤尾部内容会话

创建实时追踪会话复合多条件过滤。

调试可用性

在线调试

使用当前认证信息和示例参数提交 Mock 请求。

请求参数

请求体字段

  • tenantIdString必填

    租户ID。

    示例: tenant-xyz

  • userUuidString必填

    用户UUID。

    示例: user-001-abc

  • filterObject必填

    资源。

    • includeKeywordsList

      包含关键字。

      示例: item1,item2

    • excludeKeywordsList

      排除关键字。

      示例: item1,item2

    • regexString

      正则。

      示例: error.*timeout

    • logLevelMinString

      日志等级最小。

      示例: warn

    • serviceFilterString

      服务过滤。

      示例: payment-service

  • serviceString必填

    服务。

    示例: order-service

响应状态

200 OK

该 API 成功时返回以下响应结构。

  • sessionIdString

    会话ID。

    示例: fsession-001

  • tenantIdString

    租户ID。

    示例: tenant-xyz

  • userUuidString

    用户UUID。

    示例: user-001-abc

  • filterObject

    资源。

    • includeKeywordsList

      包含关键字。

      示例: item1,item2

    • excludeKeywordsList

      排除关键字。

      示例: item1,item2

    • regexString

      正则。

      示例: error.*timeout

    • logLevelMinString

      日志等级最小。

      示例: warn

    • serviceFilterString

      服务过滤。

      示例: payment-service

  • createdAtString

    创建时间。

    示例: 2026-01-15T08:00:00Z

  • updatedAtString

    更新时间。

    示例: 2026-01-15T08:00:00Z

  • activeBoolean

    已过滤会话当前激活。

    示例: true

  • cursorPosString

    游标位置。

    示例: cursor-0000099

  • expiresAtString

    过期时间。

    示例: 2026-01-15T08:00:00Z

请求地址

POST/api/v1/logs/tail/filtered-sessions

/api/v1/logs/tail/filtered-sessions

操作 ID

CreateFilteredTailSession

永久链接

请求示例

curl -X POST '{host}/api/v1/logs/tail/filtered-sessions' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"tenantId":"tenant-xyz","userUuid":"user-001-abc","filter":{"includeKeywords":"item1,item2","excludeKeywords":"item1,item2","regex":"error.*timeout","logLevelMin":"warn","serviceFilter":"payment-service"},"service":"order-service"}'

响应示例

200
{
  "sessionId": "fsession-001",
  "tenantId": "tenant-xyz",
  "userUuid": "user-001-abc",
  "filter": {},
  "createdAt": "example",
  "updatedAt": "example",
  "active": true,
  "cursorPos": "cursor-0000099"
}

变更历史

此 API 暂无变更历史记录。

查看全部变更历史