> ## Documentation Index > Fetch the complete documentation index at: https://kb.vastdata.com/llms.txt > Use this file to discover all available pages before exploring further. # Query logs under a span > Retrieves the logs under specific span (or all logs from trace, if span_id is omitted) ## OpenAPI ````json GET /span-logs { "openapi": "3.0.3", "info": { "title": "VAST DataEngine API", "description": "Combined OpenAPI specification for Document360: Provisioning, Telemetries Query, Telemetries Collector, and shared common components.", "version": "1.4.0" }, "servers": [ { "url": "http://localhost:3000", "description": "Provisioning Service (Local development server)" }, { "url": "http://localhost:8080/query_telemetries", "description": "Telemetries Query Service (Local development server)" }, { "url": "http://localhost:8080/telemetries", "description": "Telemetries Collector Service (Local development server)" } ], "tags": [ { "name": "Provisioning Service v1.4.0", "description": "Provisioning Service API" }, { "name": "Provisioning Service v1.4.0 > dataEngine", "description": "Data Engine lifecycle" }, { "name": "Provisioning Service v1.4.0 > setup_provisioning", "description": "Deprecated provisioning setup" }, { "name": "Provisioning Service v1.4.0 > pipelines", "description": "Pipelines" }, { "name": "Provisioning Service v1.4.0 > pipelineRevisions", "description": "Pipeline revisions" }, { "name": "Provisioning Service v1.4.0 > functions", "description": "Functions" }, { "name": "Provisioning Service v1.4.0 > functionRevisions", "description": "Function revisions" }, { "name": "Provisioning Service v1.4.0 > functionRevisionsDeprecated", "description": "Deprecated function revision endpoints" }, { "name": "Provisioning Service v1.4.0 > triggers", "description": "Triggers" }, { "name": "Provisioning Service v1.4.0 > topics", "description": "Topics" }, { "name": "Provisioning Service v1.4.0 > containerRegistries", "description": "Container registries" }, { "name": "Provisioning Service v1.4.0 > kubernetesClusters", "description": "Kubernetes clusters" }, { "name": "Provisioning Service v1.4.0 > kubernetesSecrets", "description": "Kubernetes secrets" }, { "name": "Provisioning Service v1.4.0 > mtlsAuthenticationCredentials", "description": "mTLS authentication credentials" }, { "name": "Provisioning Service v1.4.0 > dashboard", "description": "Dashboard" }, { "name": "Provisioning Service v1.4.0 > reports", "description": "Saved reports" }, { "name": "Telemetries Collector Service v1.4.0", "description": "API for collecting OTEL signals (traces, logs and metrics)" }, { "name": "Telemetries Collector Service v1.4.0 > collect_telemetries", "description": "Collect OTEL signals" }, { "name": "Telemetries Query Service v1.4.0", "description": "API for querying traces, logs and metrics" }, { "name": "Telemetries Query Service v1.4.0 > query_telemetries", "description": "Query traces and logs" }, { "name": "Telemetries Query Service v1.4.0 > metrics", "description": "Query metrics" }, { "name": "Telemetries Query Service v1.4.0 > reports", "description": "Saved reports" } ], "paths": { "/span-logs": { "get": { "parameters": [ { "$ref": "#/components/parameters/TraceId" }, { "$ref": "#/components/parameters/SpanId" } ], "summary": "Query logs under a span", "description": "Retrieves the logs under specific span (or all logs from trace, if span_id is omitted)", "operationId": "query_span_logs", "tags": [ "Telemetries Query Service v1.4.0 > query_telemetries" ], "responses": { "200": { "description": "A list of log records", "content": { "application/json": { "schema": { "type": "object", "properties": { "pagination": { "$ref": "#/components/schemas/Pagination" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/LogRecordResult" } } } } } } } } } } }, "components": { "parameters": { "TraceId": { "name": "trace_id", "in": "query", "required": "false", "schema": { "type": "string", "description": "ID of the Trace assoicated with the telemetries" } }, "SpanId": { "name": "span_id", "in": "query", "required": "false", "schema": { "type": "string", "description": "ID of the Span assoicated with the telemetries" } } }, "schemas": { "Pagination": { "allOf": [ { "type": "object", "properties": { "next_cursor": { "type": "string", "description": "The cursor for the next page" }, "previous_cursor": { "type": "string", "description": "The cursor for the last page" } } } ] }, "LogRecordResult": { "allOf": [ { "$ref": "#/components/schemas/LogRecord" }, { "type": "object", "properties": { "resource": { "$ref": "#/components/schemas/TelemetryResource" } } } ] }, "LogRecord": { "type": "object", "description": "Log record from Vast Function execution", "properties": { "guid": { "type": "string", "description": "Unique identifier of the logs" }, "trace_id": { "type": "string", "description": "ID of the Trace this Log is associated with" }, "span_id": { "type": "string", "description": "ID of the Span this Log is associated with" }, "timestamp": { "type": "integer", "format": "int64", "description": "Time in epoch in micro sec for when the Log record was produced" }, "observed_timestamp": { "type": "integer", "format": "int64", "description": "Time since epoch in micro sec for when the Log record was observed by Vast Telemetries Service" }, "severity": { "type": "string", "description": "Log severity matching OTEL specification" }, "scope": { "type": "string" }, "message": { "type": "string", "description": "Content of the Log Record" } } }, "TelemetryResource": { "type": "object", "description": "Resource producing the telemetry, as in OTEL specification", "properties": { "tenant_id": { "type": "string", "description": "ID of the tenant", "example": "tenant.id", "x-otel-loc": "tenant.id" }, "pipeline_id": { "type": "string", "description": "ID of the Pipeline", "example": "vastpipeline.id", "x-otel-loc": "vastpipeline.id" }, "pipeline_name": { "type": "string", "description": "Name of the Pipeline", "x-otel-loc": "vastpipeline.name" }, "pipeline_version": { "type": "string", "description": "Version of the Pipeline", "x-otel-loc": "vastpipeline.version" }, "pipeline_revision_id": { "type": "string", "description": "ID of the Pipeline Revision", "x-otel-loc": "vastpipeline.rev_id" }, "function_revision_id": { "type": "string", "description": "ID of the Function Revision", "x-otel-loc": "vastfunction.rev_id" }, "pipeline_vrn": { "type": "string", "description": "VRN of the Pipeline" }, "function_id": { "type": "string", "description": "ID of the Function", "x-otel-loc": "vastfunction.id" }, "function_name": { "type": "string", "description": "Name of the Function", "x-otel-loc": "vastfunction.name" }, "function_deployment_name": { "type": "string", "description": "Name of the Function Deployment as in Pipeline manifest", "x-otel-loc": "vastfunction.deployment_name" }, "function_vrn": { "type": "string", "description": "VRN of the Function" }, "function_version": { "type": "string", "description": "Version of the Function", "x-otel-loc": "vastfunction.version" }, "function_host": { "type": "string", "description": "Name of the pod where the function is running", "x-otel-loc": "vastfunction.host" }, "function_deployment_vrn": { "type": "string", "description": "VRN of the Function Deployment (i.e. the function used in the pipeline manifest)" }, "sdk_version": { "type": "string", "description": "Serverless SDK installed in the user code", "x-otel-loc": "vastfunction.sdk_version" }, "runtime_version": { "type": "string", "description": "Serverless runtime invoking user code", "x-otel-loc": "vastfunction.runtime_version" }, "owner_vid": { "type": "integer", "format": "int64", "description": "The owner's vid associated with with the telemetry - the relevant pipeline owner", "x-otel-loc": "vastpipeline.owner_vid" } } } } } } ````