Collector And curl Examples
LiveThese examples are tested through product runner, fixture, endpoint, and query tests.
Guide
Tested OpenTelemetry Collector and curl examples for LogDB logs/traces ingest, retained-record query, tenant headers, and local development policy boundaries.
Current availability
Private Beta. Public beta is scheduled for .
These examples are tested through product runner, fixture, endpoint, and query tests.
Product SME, docs QA, security, and operations reviewers still need to accept exact local policy and live collector wording.
| Workflow | Status | Validation | Source |
|---|---|---|---|
| Collector HTTP and gRPC smoke configuration | tested | cargo test --bin logdb-collector-smoke | docs/examples/logdb/otel-collector-examples/snippets/otelcol-logdb-smoke.yaml |
| Opt-in collector smoke runner | tested runner; live smoke opt-in | cargo test --bin logdb-collector-smoke | docs/examples/logdb/otel-collector-examples/snippets/run-collector-smoke.sh |
| curl OTLP JSON log ingest | tested route behavior | OtlpHttpEndpointTests | docs/examples/logdb/otel-collector-examples/snippets/curl-otlp-json-log.sh |
| curl OTLP JSON trace ingest and query | tested route behavior | OtlpHttpEndpointTests and QueryApiEndpointTests | docs/examples/logdb/otel-collector-examples/snippets/curl-otlp-json-trace-query.sh |
Collector exporters and curl commands must include x-logdb-tenant: local and authorization: Bearer local-dev-token for the local development policy.
The repository does not vendor or download otelcol. A live collector run needs an approved collector binary and a reviewer-run artifact.
These examples cover logs, traces, local retained-record query, and tenant policy only; metrics, profiles, dashboards, SIEM replacement, and production claims stay out of scope.
Local LogDB requests require both x-logdb-tenant and authorization. Missing tenant headers are rejected; use the OTLP and query reference for exact error details.
LogDB collector and curl examples
Switch between collector configuration, opt-in shell smoke, curl ingest, query, and local policy examples.
YAML
docs/examples/logdb/otel-collector-examples/snippets/otelcol-logdb-smoke.yaml
OpenTelemetry Collector receiver and exporter configuration for local LogDB HTTP and gRPC endpoints.
receivers:
otlp/http_to_http:
protocols:
http:
endpoint: ${env:LOGDB_COLLECTOR_HTTP_INPUT_ENDPOINT}
otlp/http_to_grpc:
protocols:
http:
endpoint: ${env:LOGDB_COLLECTOR_GRPC_INPUT_ENDPOINT}
exporters:
otlphttp/logdb:
endpoint: ${env:LOGDB_COLLECTOR_LOGDB_HTTP_ENDPOINT}
headers:
x-logdb-tenant: local
authorization: Bearer local-dev-token
otlp/logdb:
endpoint: ${env:LOGDB_COLLECTOR_LOGDB_GRPC_ENDPOINT}
tls:
insecure: true
headers:
x-logdb-tenant: local
authorization: Bearer local-dev-token| Behavior | Surface | Evidence | Maturity |
|---|---|---|---|
| Collector exports logs and traces over OTLP HTTP/protobuf | otlphttp exporter to /v1/logs and /v1/traces | LDB-EVID-013 and otelcol-logdb-smoke.yaml | Live route behavior; smoke process opt-in |
| Collector exports logs and traces over OTLP/gRPC | otlp exporter to optional gRPC listener | LDB-EVID-013 and logdb-collector-smoke.rs | Live when LOGDB_OTLP_GRPC_BIND_ADDRESS is configured |
| Send OTLP JSON compatibility logs | POST /v1/otlp/logs | LDB-EVID-002, LDB-EVID-007, and OtlpHttpEndpointTests | Live |
| Send OTLP JSON compatibility traces | POST /v1/otlp/traces | LDB-EVID-002, LDB-EVID-007, and OtlpHttpEndpointTests | Live |
| Query retained trace records | POST /v1/query | LDB-EVID-004 and QueryApiEndpointTests | Live |
| Reject missing tenant header | Tenant admission and query authorization | LDB-EVID-003 and QueryApiEndpointTests | Verification required for external wording |
The live collector smoke emits a unique trace ID. The curl examples use safe synthetic payloads and record IDs.
Text
Expected Output
Safe output summary for collector smoke and curl compatibility examples.
collector smoke passed
trace_id: <unique 32 hex chars>
matched_records: 4
log_bodies: collector smoke grpc log, collector smoke http log
span_names: collector smoke grpc span, collector smoke http span
{
"status": "accepted",
"signal": "log",
"accepted_records": 1,
"record_ids": ["logdb_..."]
}
{
"status": "accepted",
"signal": "trace",
"accepted_records": 1,
"record_ids": ["logdb_..."]
}
{
"status": "ok",
"tenant_id": "local",
"dataset": "checkout",
"matched_records": 1,
"results": [{ "record": { "signal": "trace" } }]
}
{
"status": "rejected",
"retryable": false,
"error": {
"kind": "missing_tenant",
"message": "x-logdb-tenant header is required"
}
}| Command | What it proves | Reviewer status |
|---|---|---|
cargo test --manifest-path LogDB/Cargo.toml --bin logdb-collector-smoke | Collector endpoint normalization, command environment, payload mutation, response parsing, and evidence evaluation. | passed 6/6 on 2026-08-16 |
cargo test --manifest-path LogDB/Cargo.toml otlp_collector | Collector-shaped OTLP log and trace fixtures encode official export request values. | passed 2/2 on 2026-08-16 |
dotnet test <LogDB automated tests solution> --filter OtlpHttpEndpointTests|QueryApiEndpointTests | OTLP JSON compatibility ingest, native OTLP HTTP/protobuf behavior, query by ID/trace ID, and missing-auth rejection. | passed 10/10 on 2026-08-16 |
LogDB examples stay scoped to logs, traces, local retained-record query, and local tenant policy. Use the compatibility matrix before strengthening S3, gRPC, metrics, profiles, BYOC, replay, support, or production claims.
Available: DOCS-024
Run the local quickstartUse the curl first-success path before adapting collector configuration.
Available: DOCS-033
Read OTLP and query referenceReview route shapes, content types, tenant headers, query filters, errors, and limits.
Available: DOCS-039
Compare OTLP and S3 scopeConfirm live, partial, unsupported, preview, future, and verification-required boundaries before adding more example claims.
Available: DOCS-063
Add example validationUse the manifest gate alongside product tests before changing status or evidence wording.