Alshival.Ai Docs
Portal ↗Wiki ↗

DEVELOPER DOCUMENTATION

OpenTelemetry / OTLP

Both destinations accept OTLP over HTTP, using JSON or protobuf:

POST /v1/workspaces/{workspace_id}/resources/{resource_id}/otlp/v1/logs
Authorization: Bearer TOKEN
Content-Type: application/json OR application/x-protobuf

This is a logs endpoint, not a traces or metrics endpoint. The desktop listener does not provide OTLP gRPC. Do not configure exporters to send gRPC to port 8765.

Minimal OTLP JSON

curl --fail-with-body -X POST \
  "$ALSHIVAL_BASE_URL/v1/workspaces/$ALSHIVAL_WORKSPACE_ID/resources/$ALSHIVAL_RESOURCE_ID/otlp/v1/logs" \
  -H "Authorization: Bearer $ALSHIVAL_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"resourceLogs":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"worker"}}]},"scopeLogs":[{"logRecords":[{"severityNumber":9,"severityText":"INFO","body":{"stringValue":"Worker started"}}]}]}]}'

Successful JSON OTLP ingestion returns {}; protobuf uses its OTLP response representation. Confirm visibility with the resource viewer or JSON query endpoint.

OpenTelemetry Collector

Use an otlphttp exporter with the full logs-specific URL so the exporter does not construct a different resource path. Set ALSHIVAL_OTLP_LOGS_URL to the complete endpoint and inject the token through your deployment's secret manager.

receivers:
  otlp:
    protocols:
      http:
        endpoint: 127.0.0.1:4318
processors:
  batch: {}
exporters:
  otlphttp/alshival:
    logs_endpoint: ${env:ALSHIVAL_OTLP_LOGS_URL}
    headers:
      Authorization: Bearer ${env:ALSHIVAL_TOKEN}
    compression: gzip
service:
  pipelines:
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/alshival]

Adjust batch sizing to stay within ingestion limits. Container localhost refers to the container, not your desktop: run the collector where it can reach the listener or use an explicitly configured tunnel. Never expose the local listener publicly just to make a container example work.

For language exporters, configure the logs-specific endpoint and HTTP protocol using the exporter documentation for your installed version. OpenTelemetry Collector configuration describes pipelines; OTLP exporter configuration explains endpoint selection.