Highlight (highlight.io) Metrics API

OpenTelemetry metric ingestion (beta)

OpenAPI Specification

highlight-io-metrics-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Highlight OTLP Logs Metrics API
  description: 'Native OpenTelemetry Protocol (OTLP) HTTP/JSON ingestion endpoint for structured logs. Accepts standard `ExportLogsServiceRequest` payloads. Logs are stored in ClickHouse for sub-second full-text search and pattern detection in the Highlight dashboard.

    '
  version: '1.0'
  contact:
    name: Highlight Support
    url: https://www.highlight.io/community
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://otel.highlight.io
  description: Highlight hosted OTLP collector
- url: http://localhost:4318
  description: Self-hosted OTLP collector (Hobby / Enterprise)
tags:
- name: Metrics
  description: OpenTelemetry metric ingestion (beta)
paths:
  /v1/metrics:
    post:
      summary: Export Metrics Service
      description: 'Submit a batch of OpenTelemetry metric data points. Resource attribute `highlight.project_id` is required.

        '
      operationId: exportMetrics
      tags:
      - Metrics
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportMetricsServiceRequest'
          application/x-protobuf:
            schema:
              type: string
              format: binary
      responses:
        '200':
          description: Metrics accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExportMetricsServiceResponse'
        '400':
          description: Malformed payload or missing `highlight.project_id`.
        '429':
          description: Rate limited.
components:
  schemas:
    ExportMetricsServiceResponse:
      type: object
      properties:
        partialSuccess:
          type: object
          properties:
            rejectedDataPoints:
              type: string
            errorMessage:
              type: string
    HistogramDataPoint:
      type: object
      properties:
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/KeyValue'
        startTimeUnixNano:
          type: string
        timeUnixNano:
          type: string
        count:
          type: string
        sum:
          type: number
        bucketCounts:
          type: array
          items:
            type: string
        explicitBounds:
          type: array
          items:
            type: number
    Resource:
      type: object
      properties:
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/KeyValue'
    NumberDataPoint:
      type: object
      properties:
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/KeyValue'
        startTimeUnixNano:
          type: string
        timeUnixNano:
          type: string
        asDouble:
          type: number
        asInt:
          type: string
    ResourceMetrics:
      type: object
      properties:
        resource:
          $ref: '#/components/schemas/Resource'
        scopeMetrics:
          type: array
          items:
            $ref: '#/components/schemas/ScopeMetrics'
    ExportMetricsServiceRequest:
      type: object
      required:
      - resourceMetrics
      properties:
        resourceMetrics:
          type: array
          items:
            $ref: '#/components/schemas/ResourceMetrics'
    KeyValue:
      type: object
      required:
      - key
      - value
      properties:
        key:
          type: string
        value:
          $ref: '#/components/schemas/AnyValue'
    ScopeMetrics:
      type: object
      properties:
        scope:
          $ref: '#/components/schemas/InstrumentationScope'
        metrics:
          type: array
          items:
            $ref: '#/components/schemas/Metric'
    InstrumentationScope:
      type: object
      properties:
        name:
          type: string
        version:
          type: string
    AnyValue:
      type: object
      properties:
        stringValue:
          type: string
        boolValue:
          type: boolean
        intValue:
          type: string
        doubleValue:
          type: number
    Metric:
      type: object
      required:
      - name
      properties:
        name:
          type: string
        description:
          type: string
        unit:
          type: string
        gauge:
          type: object
          properties:
            dataPoints:
              type: array
              items:
                $ref: '#/components/schemas/NumberDataPoint'
        sum:
          type: object
          properties:
            dataPoints:
              type: array
              items:
                $ref: '#/components/schemas/NumberDataPoint'
            aggregationTemporality:
              type: integer
            isMonotonic:
              type: boolean
        histogram:
          type: object
          properties:
            dataPoints:
              type: array
              items:
                $ref: '#/components/schemas/HistogramDataPoint'
            aggregationTemporality:
              type: integer