OpenTelemetry Logs API

The Logs API from OpenTelemetry — 1 operation(s) for logs.

Operations 1

POST /v1/logs OpenTelemetry Export log data #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/opentelemetry-logs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

opentelemetry-logs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenTelemetry Protocol (OTLP) HTTP Logs API
  description: The OpenTelemetry Protocol (OTLP) HTTP API provides endpoints for receiving telemetry data including traces, metrics, and logs. OTLP is the native protocol for OpenTelemetry and defines how telemetry data is encoded, transported, and delivered between telemetry sources, collectors, and backends.
  version: 1.0.0
  contact:
    name: OpenTelemetry
    url: https://opentelemetry.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://localhost:4318
  description: Default OTLP HTTP receiver endpoint
tags:
- name: Logs
paths:
  /v1/logs:
    post:
      operationId: exportLogs
      summary: OpenTelemetry Export log data
      description: Accepts a batch of log records encoded in OTLP format. Log records represent timestamped text or structured data entries with severity levels, associated resource metadata, and optional trace context for correlation.
      tags:
      - Logs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportLogsServiceRequest'
          application/x-protobuf:
            schema:
              type: string
              format: binary
      responses:
        '200':
          description: Successfully accepted log data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExportLogsServiceResponse'
        '400':
          description: Bad request - malformed payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
        '429':
          description: Too many requests - rate limited
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before retrying
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
components:
  schemas:
    LogRecord:
      type: object
      description: A single log record representing a timestamped event with severity, body content, and associated metadata.
      properties:
        timeUnixNano:
          type: string
          format: uint64
          description: Log timestamp in nanoseconds since Unix epoch
        observedTimeUnixNano:
          type: string
          format: uint64
          description: Time when the log was observed by the collection system
        severityNumber:
          type: integer
          description: Numeric severity value (1-24)
          minimum: 1
          maximum: 24
        severityText:
          type: string
          description: Severity text (e.g., TRACE, DEBUG, INFO, WARN, ERROR, FATAL)
        body:
          $ref: '#/components/schemas/AnyValue'
        attributes:
          type: array
          description: Additional log attributes
          items:
            $ref: '#/components/schemas/KeyValue'
        droppedAttributesCount:
          type: integer
          format: int32
        flags:
          type: integer
          format: int32
          description: Trace flags for log-trace correlation
        traceId:
          type: string
          description: Trace ID for correlating logs with traces
        spanId:
          type: string
          description: Span ID for correlating logs with spans
    ExportLogsServiceResponse:
      type: object
      description: Response message for the logs export service
      properties:
        partialSuccess:
          $ref: '#/components/schemas/ExportLogsPartialSuccess'
    InstrumentationScope:
      type: object
      description: Metadata about the instrumentation library or component that produced the telemetry data.
      properties:
        name:
          type: string
          description: Instrumentation scope name
        version:
          type: string
          description: Instrumentation scope version
        attributes:
          type: array
          description: Scope attributes
          items:
            $ref: '#/components/schemas/KeyValue'
        droppedAttributesCount:
          type: integer
          format: int32
    KeyValue:
      type: object
      description: A key-value pair for attributes
      required:
      - key
      - value
      properties:
        key:
          type: string
          description: Attribute key
        value:
          $ref: '#/components/schemas/AnyValue'
    Resource:
      type: object
      description: Describes the entity producing telemetry. A resource has attributes such as service.name, service.version, host.name, and other identifying metadata.
      properties:
        attributes:
          type: array
          description: Resource attributes
          items:
            $ref: '#/components/schemas/KeyValue'
        droppedAttributesCount:
          type: integer
          format: int32
    ResourceLogs:
      type: object
      description: Collection of logs from a resource
      properties:
        resource:
          $ref: '#/components/schemas/Resource'
        scopeLogs:
          type: array
          description: Logs grouped by instrumentation scope
          items:
            $ref: '#/components/schemas/ScopeLogs'
        schemaUrl:
          type: string
          description: Schema URL for the resource
    ScopeLogs:
      type: object
      description: Logs associated with an instrumentation scope
      properties:
        scope:
          $ref: '#/components/schemas/InstrumentationScope'
        logRecords:
          type: array
          description: List of log records
          items:
            $ref: '#/components/schemas/LogRecord'
        schemaUrl:
          type: string
          description: Schema URL for the instrumentation scope
    ExportLogsServiceRequest:
      type: object
      description: Request message for the logs export service
      properties:
        resourceLogs:
          type: array
          description: Batch of resource logs
          items:
            $ref: '#/components/schemas/ResourceLogs'
    ExportLogsPartialSuccess:
      type: object
      description: Indicates partial success when some log records were rejected
      properties:
        rejectedLogRecords:
          type: integer
          format: int64
          description: Number of log records rejected
        errorMessage:
          type: string
          description: Human-readable error message
    AnyValue:
      type: object
      description: A polymorphic value container that can hold string, bool, int, double, array, or key-value list values.
      properties:
        stringValue:
          type: string
        boolValue:
          type: boolean
        intValue:
          type: string
          format: int64
        doubleValue:
          type: number
          format: double
        arrayValue:
          type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/AnyValue'
        kvlistValue:
          type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/KeyValue'
        bytesValue:
          type: string
          format: byte
    Status:
      type: object
      description: Error status response
      properties:
        code:
          type: integer
          description: HTTP status code
        message:
          type: string
          description: Human-readable error message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication for secured OTLP endpoints