Reference

LogDB OTLP And Query Reference

Source-backed reference for LogDB OTLP HTTP/protobuf, OTLP JSON compatibility, optional OTLP/gRPC, custom endpoint JSON helpers, tenant admission, and POST /v1/query.

Current availability

Private Beta. Public beta is scheduled for .

LiveConfirm First

Readiness Notes

Implemented Route Surface

Live

The routes and services below are sourced from the current LogDB README, route modules, handlers, tenant admission code, and query API implementation.

Product Boundary

Confirm First

Use this reference for the implemented local route surface. Treat security, operations, and external-commitment language as Confirm First unless the related limits and compatibility pages state the supported scope.

Reference Summary

IDTypeNameMethodPath or serviceMaturitySource scope
ldb-endpoint-json-ingestapiCustom endpoint JSON ingest
Stores one JSON telemetry payload as a canonical envelope and returns its deterministic record ID.
POST/v1/endpoint/{activation_id}Livedocumented source scope, documented source scope, endpoint_handler.rs
ldb-endpoint-json-readbackapiCustom endpoint readback
Reads the latest envelope, up to 100 recent envelopes, or one envelope by deterministic record ID.
GET/v1/endpoint/{activation_id}/recent, /recent_100, /{record_id}Livedocumented source scope, documented source scope, endpoint_handler.rs
ldb-otlp-http-protobuf-logsapiNative OTLP HTTP/protobuf logs
Accepts ExportLogsServiceRequest protobuf batches through tenant admission and WAL-backed publication.
POST/v1/logsLivedocumented source scope, documented source scope, otlp_http_handler.rs
ldb-otlp-http-protobuf-tracesapiNative OTLP HTTP/protobuf traces
Accepts ExportTraceServiceRequest protobuf batches through the same commit path as logs.
POST/v1/tracesLivedocumented source scope, documented source scope, otlp_http_handler.rs
ldb-otlp-json-compatapiOTLP HTTP JSON compatibility
Accepts OpenTelemetry-shaped JSON logs and traces and returns accepted record IDs.
POST/v1/otlp/logs, /v1/otlp/tracesLivedocumented source scope, documented source scope, otlp_http.rs
ldb-otlp-grpcapiOptional OTLP/gRPC
Enables generated OpenTelemetry LogsService and TraceService export methods when the gRPC bind address is configured.
ExportLogsService, TraceServiceLivedocumented source scope, documented source scope, otlp_grpc_handler.rs
ldb-query-v1apiQuery retained records
Searches published local or configured S3 segment bundles by dataset, exact IDs, time filters, pagination, and deadline controls.
POST/v1/queryLivedocumented source scope, documented source scope, query_handler.rs
ldb-tenant-admissionauthTenant admission
Requires tenant and bearer credentials for OTLP and query routes, and checks OTLP resource tenant claims against the authenticated tenant.
mixedOTLP and query routesConfirm Firstdocumented source scope, tenant_admission.rs
ldb-ingest-query-limitslimitIngest and query limits
Documents the current 512-record OTLP batch cap, gateway backpressure defaults, tenant quota defaults, and query page caps.
n/abatch, gateway, tenant, page, and store limitsConfirm Firstdocumented source scope, documented source scope, backpressure.rs

Headers And Tenant Admission

SurfaceContent typeCredentialsTenant claim
Custom endpoint JSON helperscontent-type: application/json for POST bodiesNo tenant header is read by the endpoint helper routes.The helper writes canonical envelopes for the activation ID and local tenant path.
OTLP HTTP/protobufcontent-type: application/x-protobuf; content-encoding may be omitted, identity, or gzipx-logdb-tenant: local and authorization: Bearer local-dev-token in local development.The batch must contain exactly one claimed tenant and it must match the authenticated tenant.
OTLP HTTP JSON compatibilitycontent-type: application/jsonx-logdb-tenant: local and authorization: Bearer local-dev-token in local development.Resource attributes service.logdb.tenant_id or tenant_id must match the header.
OTLP/gRPCGenerated OpenTelemetry protobuf request messages; gzip request and response compression are enabled.x-logdb-tenant and authorization metadata use the same local-development values as HTTP.Prepared protobuf records flow through the same tenant-admission check as HTTP/protobuf.
Querycontent-type: application/jsonx-logdb-tenant: local and authorization: Bearer local-dev-token in local development.The query dataset is authorized against the authenticated tenant credential.

Custom Endpoint Routes

Custom endpoint JSON helper routes
RouteRequestResponseErrorsSource scope
POST /v1/endpoint/{activation_id}JSON payload for one activation ID.200 OK JSON with status "stored" and record_id.400 or 503 rejected JSON when the durable ingest path rejects or cannot publish the record.endpoint_handler.rs
GET /v1/endpoint/{activation_id}/recentActivation ID path segment; no body.200 OK canonical telemetry envelope for the latest record.404 No data found; 500 when segment readback fails.endpoint_handler.rs
GET /v1/endpoint/{activation_id}/recent_100Activation ID path segment; no body.200 OK array with up to 100 canonical telemetry envelopes.404 No data found; 500 when segment readback fails.endpoint_handler.rs
GET /v1/endpoint/{activation_id}/{record_id}Activation ID and deterministic record ID path segments.200 OK canonical telemetry envelope.404 No data found; 500 when segment readback fails.endpoint_handler.rs

OTLP Routes And Services

OTLP ingest routes and services
RouteRequestResponseErrorsSource scope
POST /v1/logsExportLogsServiceRequest protobuf body with application/x-protobuf and local tenant headers.200 OK application/x-protobuf ExportLogsServiceResponse with no partial_success.415 unsupported content type or encoding; 400 malformed protobuf; 401/403 tenant admission; 429 batch, quota, or gateway pressure; 503 retryable publication failure.otlp_http_handler.rs
POST /v1/tracesExportTraceServiceRequest protobuf body with application/x-protobuf and local tenant headers.200 OK application/x-protobuf ExportTraceServiceResponse with no partial_success.Same protobuf status-body behavior as POST /v1/logs.otlp_http_handler.rs
POST /v1/otlp/logsOpenTelemetry-style JSON body with resourceLogs, scopeLogs, and logRecords.202 Accepted JSON with status "accepted", signal "log", accepted_records, and record_ids.400 malformed JSON compatibility shape; 401/403 tenant admission; 429 batch, quota, or gateway pressure; 503 retryable publication failure.otlp_http_handler.rs, otlp_http.rs
POST /v1/otlp/tracesOpenTelemetry-style JSON body with resourceSpans, scopeSpans, and spans.202 Accepted JSON with status "accepted", signal "trace", accepted_records, and record_ids.Same JSON rejected-body behavior as POST /v1/otlp/logs.otlp_http_handler.rs, otlp_http.rs
LogsService.Export and TraceService.ExportOTLP/gRPC ExportLogsServiceRequest or ExportTraceServiceRequest; listener starts only when LOGDB_OTLP_GRPC_BIND_ADDRESS is set.Generated ExportLogsServiceResponse or ExportTraceServiceResponse; gzip compression is accepted and sent by the service builders.invalid_argument, unauthenticated, permission_denied, resource_exhausted, unavailable, or internal gRPC status codes.otlp_grpc_handler.rs

Query Route

Query route
RouteRequestResponseErrorsSource scope
POST /v1/queryJSON body with required dataset plus optional filter, page, and deadline_ms.200 OK JSON with status, api_version, tenant_id, dataset, results, page, scanned_bundles, matched_records, and used_indexes.400 request/filter/page errors; 401 authentication; 403 dataset_not_authorized; 408 deadline_exceeded; 500 segment scan, exact-index, record-read, or DataFusion failures.http-query-api.md, query_handler.rs, query/api.rs

Query request parameters

The route accepts one JSON body. Omitting the optional filter or page object uses its empty default; sending JSON null for either object is malformed. Optional leaf fields accept JSON null as omission unless noted otherwise.

LogDB query request parameters
FieldLocationTypeRequirementDefault or omissionAccepted values and constraints
datasetJSON bodystringRequired; JSON null and non-string values are malformedNo default. Omission reaches authorization as an empty value and is rejected.Trimmed value must be non-empty and authorized for the authenticated tenant.
filterJSON bodyobjectOptional; JSON null is malformedEmpty filter object; only tenant and dataset constrain the scanRecognized fields are listed below. All supplied filters combine with AND.
filter.record_idJSON bodystringOptional; JSON null is treated as omittedNo record-ID filterTrimmed value must be non-empty and matches exactly. A used index is reported as "record_id".
filter.trace_idJSON bodystringOptional; JSON null is treated as omittedNo trace-ID filterTrimmed value must be non-empty and matches exactly. A used index is reported as "identity.trace_id".
filter.source_timeJSON bodyobjectOptional; JSON null is treated as omittedNo source-time filterInclude start or end. Bounds compare with the stored source_timestamp string; records without a source timestamp do not match a supplied source-time filter.
filter.source_time.startJSON bodystringOptional; JSON null is treated as omittedNo lower source-time boundNon-empty after trimming and inclusive. Use the same serialized form as stored source timestamps; OTLP examples use decimal Unix nanoseconds. Must be less than or equal to end when both are present.
filter.source_time.endJSON bodystringOptional; JSON null is treated as omittedNo upper source-time boundNon-empty after trimming and inclusive. Use the same serialized form as stored source timestamps; OTLP examples use decimal Unix nanoseconds. Must be greater than or equal to start when both are present.
filter.ingested_timeJSON bodyobjectOptional; JSON null is treated as omittedNo ingest-time filterInclude start or end. Bounds compare with the canonical ingested_at string; use consistently normalized RFC 3339 values, preferably UTC.
filter.ingested_time.startJSON bodystringOptional; JSON null is treated as omittedNo lower ingest-time boundNon-empty after trimming and inclusive. Must be less than or equal to end when both are present.
filter.ingested_time.endJSON bodystringOptional; JSON null is treated as omittedNo upper ingest-time boundNon-empty after trimming and inclusive. Must be greater than or equal to start when both are present.
pageJSON bodyobjectOptional; JSON null is malformedEmpty page object: limit 100 and offset 0Recognized fields are limit and cursor.
page.limitJSON bodypositive integerOptional; JSON null is treated as omitted100 recordsFrom 1 through 500 records.
page.cursorJSON bodystringOptional; JSON null is treated as omittedOffset 0; an empty or whitespace-only string also selects 0A nonnegative decimal integer offset, normally the previous response's next_cursor. An offset beyond the current match count returns an empty final page.
deadline_msJSON bodyunsigned integer millisecondsOptional; JSON null is treated as omittedNo service deadline0 returns 408 deadline_exceeded immediately. A positive value is checked before, between, and after query phases; no separate maximum is defined below the unsigned 64-bit JSON model.

Query response and behavior contract

LogDB query response and behavior contract
OperationAccessSuccess responseCompletion and side effectsFiltering and orderingPagination and consistencyRetry and idempotency
POST /v1/queryapplication/json plus x-logdb-tenant and a Bearer credential authorized to query the requested dataset. Local development uses tenant local and token local-dev-token.200 OK, application/json. The body contains status, api_version, tenant_id, dataset, results, page, scanned_bundles, matched_records, and used_indexes. Each result contains the complete canonical record and its bundle_id.A 200 response means the bounded read completed against the currently configured local or S3 query store. Query is read-only: it does not commit a cursor, reserve a snapshot, or change retained records. matched_records is counted before pagination; scanned_bundles reflects candidates after exact-index filtering.All supplied filters combine with AND. Exact record and trace IDs use sidecar candidates when present. Time bounds are inclusive string comparisons. Results are deduplicated by record_id and ordered by ingested_at and then record_id.The default limit is 100 and the maximum is 500. Send page.next_cursor as the next request's page.cursor until next_cursor is null. The cursor is an offset into a freshly evaluated match set, not a snapshot; concurrent ingest can shift records between requests.The read is non-mutating and can be retried, but a retry can observe newer retained data. deadline_exceeded reports retryable:true; narrow the filters or use an appropriate positive deadline. Request, authorization, and internal read errors report retryable:false and require correction or investigation before retrying. Omitting deadline_ms applies no service deadline.

Query error contract

LogDB query error contract
StatusError kindsTriggerRetryableRecovery
400 Bad Requestmalformed_query, invalid_request, invalid_filter, invalid_time_bounds, invalid_limit, invalid_cursorWrong JSON types or non-nullable objects, missing or blank dataset, blank filter text, reversed bounds, a limit outside 1–500, or a cursor that is not a nonnegative integer string.falseCorrect the request body before retrying.
401 Unauthorizedmissing_tenant, missing_credentials, unknown_tenant, invalid_credentialsThe tenant header or bearer credential is missing, or the local admission policy cannot authenticate it.falseSupply credentials for the intended environment. Local development uses x-logdb-tenant: local and authorization: Bearer local-dev-token.
403 Forbiddendataset_not_authorizedThe authenticated credential cannot execute a query for the requested dataset.falseUse an authorized dataset or a credential with the required dataset-scoped query permission.
408 Request Timeoutdeadline_exceededdeadline_ms is 0 or the positive deadline expires at a query phase check.trueNarrow the filters or retry the read with an appropriate positive deadline. A retry can observe newer data.
500 Internal Server Errorsegment_scan, record_id_index, identity_index, segment_read, datafusion_scanThe configured store, manifest scan, exact index lookup, segment read, or DataFusion row scan failed.falseInspect the local segment root or S3 query-read configuration, file or object permissions, and service logs before retrying.

JSON Compatibility Example

curl -X POST http://127.0.0.1:4318/v1/otlp/logs   -H 'content-type: application/json'   -H 'x-logdb-tenant: local'   -H 'authorization: Bearer local-dev-token'   -d '{
    "resourceLogs": [{
      "resource": {
        "attributes": [
          {"key": "tenant_id", "value": {"stringValue": "local"}},
          {"key": "service.name", "value": {"stringValue": "checkout"}}
        ]
      },
      "scopeLogs": [{
        "logRecords": [{
          "timeUnixNano": "1783947600000000000",
          "body": {"stringValue": "payment accepted"}
        }]
      }]
    }]
  }'
{
  "status": "accepted",
  "signal": "log",
  "accepted_records": 1,
  "record_ids": ["logdb_..."]
}

Query Example

curl -X POST http://127.0.0.1:4318/v1/query   -H 'content-type: application/json'   -H 'x-logdb-tenant: local'   -H 'authorization: Bearer local-dev-token'   -d '{
    "dataset": "checkout",
    "filter": {
      "record_id": "logdb_..."
    },
    "page": {
      "limit": 10
    }
  }'
{
  "status": "ok",
  "api_version": "v1",
  "tenant_id": "local",
  "dataset": "checkout",
  "results": [{
    "record": {
      "schema_version": 1,
      "record_id": "logdb_...",
      "tenant_id": "local",
      "dataset": "checkout",
      "source": "v1.otlp_http",
      "signal": "log",
      "source_timestamp": "1783947600000000000",
      "ingested_at": "2026-07-13T15:00:00+00:00",
      "raw_payload": {}
    },
    "segment": {
      "bundle_id": "live_otlp-http_..."
    }
  }],
  "page": {
    "limit": 10,
    "cursor": null,
    "next_cursor": null
  },
  "scanned_bundles": 1,
  "matched_records": 1,
  "used_indexes": ["record_id"]
}

Limits

LimitValueApplies to
OTLP batch size512 recordsHTTP/protobuf logs, HTTP/protobuf traces, JSON compatibility logs and traces, and gRPC exports.
OTLP gateway in-flight requests64 by defaultShared HTTP and gRPC ingest backpressure.
OTLP gateway in-flight records8192 by defaultShared HTTP and gRPC ingest backpressure.
OTLP gateway in-flight bytes33554432 by defaultShared HTTP and gRPC ingest backpressure.
Tenant admission window10000 records, 16 MiB, 16 concurrent requests per 60 seconds by defaultLocal development tenant policy and policy-derived ingest checks.
Query page sizeDefault 100, maximum 500POST /v1/query.
Endpoint recent readback100 recordsGET /v1/endpoint/{activation_id}/recent_100.
Query store selectionLocal segment store by default; S3 query-read is separately configuredPOST /v1/query read path only. It does not make ingest publish to S3.

Errors

StatusSurfaceMeaningRecovery
400JSON compatibility and queryMalformed OTLP JSON, empty batches, invalid query bodies, empty datasets, or route-specific validation failed.Fix the request shape, dataset, filter, or body fields.
401OTLP and queryTenant header, bearer token, tenant policy, or credential validation failed.For local development, send x-logdb-tenant: local and authorization: Bearer local-dev-token.
403OTLP and queryThe authenticated tenant does not match OTLP tenant claims or is not authorized for the dataset.Align service.logdb.tenant_id or tenant_id resource attributes with the header and dataset policy.
408Querydeadline_ms expired before query execution completed.Use a nonzero deadline or narrow the query filters.
415HTTP/protobufcontent-type is not application/x-protobuf or content-encoding is not identity or gzip.Post generated OTLP protobuf bytes with the expected content headers.
429OTLP ingestBatch size, tenant quota, or shared gateway in-flight capacity is exhausted.Reduce batch size or request concurrency and honor Retry-After when present.
500QuerySegment scan, exact index lookup, or segment record read failed.Check segment publication root, local file permissions, S3 query-read configuration, and service logs.
503OTLP ingestRetryable durable publication failure after admission.Inspect WAL and segment publication health before retrying.

Native HTTP/protobuf errors use application/x-protobuf bodies encoded as google.rpc.Status. JSON compatibility and query errors use JSON bodies with status: rejected, retryable, and error.kind.

Boundaries

S3 Query Read

POST /v1/query can be configured to read segment bundles from S3, but ingest still writes locally unless separately documented and reviewed.

Signal Scope

This page covers logs, traces, endpoint JSON helpers, and retained segment search. Metrics, profiles, dashboarding, SIEM replacement, and public replay routes remain outside this reference.

Safe Next Steps

  • Available now

    Run OTLP ingest and query quickstart

    Exercise JSON compatibility ingest, exact record ID query, trace pagination, tenant headers, and cleanup.

  • Available now

    Review LogDB limits

    Use the limits and compatibility guidance before strengthening ingest, query, S3, replay, BYOC, support, or GA claims.

  • Available

    Review configuration and BYOC reference

    Separate local bind/data settings, WAL durability settings, S3 query-read settings, gRPC bind configuration, and AWS BYOC values.

  • Available

    Compare OTLP and S3 query scope

    Distinguish live ingest, optional gRPC, local query, S3 query reads, metrics/profile exclusions, and future publication work.