OpenObserve · Capability

openobserve — Traces

openobserve — Traces. 6 operations. Lead operation: Get current service graph topology. Self-contained Naftiko capability covering one Openobserve business surface.

Run with Naftiko OpenobserveTraces

What You Can Do

GET
Getcurrentservicegraphtopology — Get current service graph topology
/v1/api/{org-id}/traces/service-graph/topology/current
POST
Posttraces — Ingest trace data
/v1/api/{org-id}/v1/traces
GET
Getlatesttraces — Get recent trace data
/v1/api/{org-id}/{stream-name}/traces/latest
GET
Getlatestsessions — Get recent session data
/v1/api/{org-id}/{stream-name}/traces/session
GET
Getlatestusers — Get recent user data
/v1/api/{org-id}/{stream-name}/traces/user
GET
Gettracedag — Get trace DAG structure
/v1/api/{org-id}/{stream-name}/traces/{trace-id}/dag

MCP Tools

get-current-service-graph-topology

Get current service graph topology

read-only idempotent
ingest-trace-data

Ingest trace data

get-recent-trace-data

Get recent trace data

read-only idempotent
get-recent-session-data

Get recent session data

read-only idempotent
get-recent-user-data

Get recent user data

read-only idempotent
get-trace-dag-structure

Get trace DAG structure

read-only idempotent

Capability Spec

openobserve-traces.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: openobserve — Traces
  description: 'openobserve — Traces. 6 operations. Lead operation: Get current service graph topology. Self-contained Naftiko
    capability covering one Openobserve business surface.'
  tags:
  - Openobserve
  - Traces
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    OPENOBSERVE_API_KEY: OPENOBSERVE_API_KEY
capability:
  consumes:
  - type: http
    namespace: openobserve-traces
    baseUri: ''
    description: openobserve — Traces business capability. Self-contained, no shared references.
    resources:
    - name: api-org_id-traces-service_graph-topology-current
      path: /api/{org_id}/traces/service_graph/topology/current
      operations:
      - name: getcurrentservicegraphtopology
        method: GET
        description: Get current service graph topology
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: org_id
          in: path
          type: string
          description: Organization name
          required: true
        - name: stream_name
          in: query
          type: string
          description: Optional stream name to filter service graph topology
    - name: api-org_id-v1-traces
      path: /api/{org_id}/v1/traces
      operations:
      - name: posttraces
        method: POST
        description: Ingest trace data
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: org_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-org_id-stream_name-traces-latest
      path: /api/{org_id}/{stream_name}/traces/latest
      operations:
      - name: getlatesttraces
        method: GET
        description: Get recent trace data
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: org_id
          in: path
          type: string
          description: Organization name
          required: true
        - name: stream_name
          in: path
          type: string
          description: Stream name
          required: true
        - name: filter
          in: query
          type: string
          description: 'filter, eg: a=b AND c=d'
        - name: from
          in: query
          type: integer
          description: from
          required: true
        - name: size
          in: query
          type: integer
          description: size
          required: true
        - name: start_time
          in: query
          type: integer
          description: start time
          required: true
        - name: end_time
          in: query
          type: integer
          description: end time
          required: true
        - name: timeout
          in: query
          type: integer
          description: timeout, seconds
        - name: sort_by
          in: query
          type: string
          description: 'sort by field: start_time, duration (default: start_time)'
        - name: sort_order
          in: query
          type: string
          description: 'sort order: asc, desc (default: desc)'
    - name: api-org_id-stream_name-traces-session
      path: /api/{org_id}/{stream_name}/traces/session
      operations:
      - name: getlatestsessions
        method: GET
        description: Get recent session data
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: org_id
          in: path
          type: string
          description: Organization name
          required: true
        - name: stream_name
          in: path
          type: string
          description: Stream name
          required: true
        - name: filter
          in: query
          type: string
          description: 'filter, eg: a=b AND c=d'
        - name: from
          in: query
          type: integer
          description: from
          required: true
        - name: size
          in: query
          type: integer
          description: size
          required: true
        - name: start_time
          in: query
          type: integer
          description: start time
          required: true
        - name: end_time
          in: query
          type: integer
          description: end time
          required: true
        - name: timeout
          in: query
          type: integer
          description: timeout, seconds
    - name: api-org_id-stream_name-traces-user
      path: /api/{org_id}/{stream_name}/traces/user
      operations:
      - name: getlatestusers
        method: GET
        description: Get recent user data
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: org_id
          in: path
          type: string
          description: Organization name
          required: true
        - name: stream_name
          in: path
          type: string
          description: Stream name
          required: true
        - name: filter
          in: query
          type: string
          description: 'filter, eg: a=b AND c=d'
        - name: from
          in: query
          type: integer
          description: from
          required: true
        - name: size
          in: query
          type: integer
          description: size
          required: true
        - name: start_time
          in: query
          type: integer
          description: start time
          required: true
        - name: end_time
          in: query
          type: integer
          description: end time
          required: true
        - name: timeout
          in: query
          type: integer
          description: timeout, seconds
    - name: api-org_id-stream_name-traces-trace_id-dag
      path: /api/{org_id}/{stream_name}/traces/{trace_id}/dag
      operations:
      - name: gettracedag
        method: GET
        description: Get trace DAG structure
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: org_id
          in: path
          type: string
          description: Organization name
          required: true
        - name: stream_name
          in: path
          type: string
          description: Stream name
          required: true
        - name: trace_id
          in: path
          type: string
          description: Trace ID
          required: true
        - name: start_time
          in: query
          type: integer
          description: start time in microseconds
          required: true
        - name: end_time
          in: query
          type: integer
          description: end time in microseconds
          required: true
        - name: timeout
          in: query
          type: integer
          description: timeout, seconds
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.OPENOBSERVE_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: openobserve-traces-rest
    port: 8080
    description: REST adapter for openobserve — Traces. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/api/{org-id}/traces/service-graph/topology/current
      name: api-org-id-traces-service-graph-topology-current
      description: REST surface for api-org_id-traces-service_graph-topology-current.
      operations:
      - method: GET
        name: getcurrentservicegraphtopology
        description: Get current service graph topology
        call: openobserve-traces.getcurrentservicegraphtopology
        with:
          org_id: rest.org_id
          stream_name: rest.stream_name
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/{org-id}/v1/traces
      name: api-org-id-v1-traces
      description: REST surface for api-org_id-v1-traces.
      operations:
      - method: POST
        name: posttraces
        description: Ingest trace data
        call: openobserve-traces.posttraces
        with:
          org_id: rest.org_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/{org-id}/{stream-name}/traces/latest
      name: api-org-id-stream-name-traces-latest
      description: REST surface for api-org_id-stream_name-traces-latest.
      operations:
      - method: GET
        name: getlatesttraces
        description: Get recent trace data
        call: openobserve-traces.getlatesttraces
        with:
          org_id: rest.org_id
          stream_name: rest.stream_name
          filter: rest.filter
          from: rest.from
          size: rest.size
          start_time: rest.start_time
          end_time: rest.end_time
          timeout: rest.timeout
          sort_by: rest.sort_by
          sort_order: rest.sort_order
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/{org-id}/{stream-name}/traces/session
      name: api-org-id-stream-name-traces-session
      description: REST surface for api-org_id-stream_name-traces-session.
      operations:
      - method: GET
        name: getlatestsessions
        description: Get recent session data
        call: openobserve-traces.getlatestsessions
        with:
          org_id: rest.org_id
          stream_name: rest.stream_name
          filter: rest.filter
          from: rest.from
          size: rest.size
          start_time: rest.start_time
          end_time: rest.end_time
          timeout: rest.timeout
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/{org-id}/{stream-name}/traces/user
      name: api-org-id-stream-name-traces-user
      description: REST surface for api-org_id-stream_name-traces-user.
      operations:
      - method: GET
        name: getlatestusers
        description: Get recent user data
        call: openobserve-traces.getlatestusers
        with:
          org_id: rest.org_id
          stream_name: rest.stream_name
          filter: rest.filter
          from: rest.from
          size: rest.size
          start_time: rest.start_time
          end_time: rest.end_time
          timeout: rest.timeout
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/{org-id}/{stream-name}/traces/{trace-id}/dag
      name: api-org-id-stream-name-traces-trace-id-dag
      description: REST surface for api-org_id-stream_name-traces-trace_id-dag.
      operations:
      - method: GET
        name: gettracedag
        description: Get trace DAG structure
        call: openobserve-traces.gettracedag
        with:
          org_id: rest.org_id
          stream_name: rest.stream_name
          trace_id: rest.trace_id
          start_time: rest.start_time
          end_time: rest.end_time
          timeout: rest.timeout
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: openobserve-traces-mcp
    port: 9090
    transport: http
    description: MCP adapter for openobserve — Traces. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: get-current-service-graph-topology
      description: Get current service graph topology
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: openobserve-traces.getcurrentservicegraphtopology
      with:
        org_id: tools.org_id
        stream_name: tools.stream_name
      outputParameters:
      - type: object
        mapping: $.
    - name: ingest-trace-data
      description: Ingest trace data
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: openobserve-traces.posttraces
      with:
        org_id: tools.org_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-recent-trace-data
      description: Get recent trace data
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: openobserve-traces.getlatesttraces
      with:
        org_id: tools.org_id
        stream_name: tools.stream_name
        filter: tools.filter
        from: tools.from
        size: tools.size
        start_time: tools.start_time
        end_time: tools.end_time
        timeout: tools.timeout
        sort_by: tools.sort_by
        sort_order: tools.sort_order
      outputParameters:
      - type: object
        mapping: $.
    - name: get-recent-session-data
      description: Get recent session data
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: openobserve-traces.getlatestsessions
      with:
        org_id: tools.org_id
        stream_name: tools.stream_name
        filter: tools.filter
        from: tools.from
        size: tools.size
        start_time: tools.start_time
        end_time: tools.end_time
        timeout: tools.timeout
      outputParameters:
      - type: object
        mapping: $.
    - name: get-recent-user-data
      description: Get recent user data
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: openobserve-traces.getlatestusers
      with:
        org_id: tools.org_id
        stream_name: tools.stream_name
        filter: tools.filter
        from: tools.from
        size: tools.size
        start_time: tools.start_time
        end_time: tools.end_time
        timeout: tools.timeout
      outputParameters:
      - type: object
        mapping: $.
    - name: get-trace-dag-structure
      description: Get trace DAG structure
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: openobserve-traces.gettracedag
      with:
        org_id: tools.org_id
        stream_name: tools.stream_name
        trace_id: tools.trace_id
        start_time: tools.start_time
        end_time: tools.end_time
        timeout: tools.timeout
      outputParameters:
      - type: object
        mapping: $.