Appearance
OpenTelemetry Collector
If you already run an OpenTelemetry Collector, or prefer one in Kubernetes, add Logcore as an exporter. Apps send to the Collector, and the Collector sends to Logcore.
Collector → Logcore directly
yaml
# otel-collector-config.yaml
receivers:
otlp:
protocols:
grpc: { endpoint: 0.0.0.0:4317 }
http: { endpoint: 0.0.0.0:4318 }
processors:
batch: {}
resource:
attributes:
- key: deployment.environment
value: production
action: upsert
exporters:
otlphttp/logcore:
endpoint: https://logcore.lsofito.com
headers:
x-logcore-api-key: ${env:LOGCORE_API_KEY}
compression: gzip
service:
pipelines:
traces: { receivers: [otlp], processors: [resource, batch], exporters: [otlphttp/logcore] }
metrics: { receivers: [otlp], processors: [resource, batch], exporters: [otlphttp/logcore] }
logs: { receivers: [otlp], processors: [resource, batch], exporters: [otlphttp/logcore] }To export over gRPC instead:
yaml
exporters:
otlp/logcore:
endpoint: logcore.lsofito.com:4317
headers:
x-logcore-api-key: ${env:LOGCORE_API_KEY}Collector → Logcore agent
If the Collector runs on a server that has the Logcore agent with APM enabled, export to the agent. You don't need a key:
yaml
exporters:
otlphttp/logcore:
endpoint: http://127.0.0.1:4318The Collector and the agent can't both listen on 4317 and 4318. Move one of them to other ports, for example otlp_http_addr: "127.0.0.1:14318" in logcore.yaml, and point the exporter there.
Kubernetes (Helm)
yaml
# values.yaml for open-telemetry/opentelemetry-collector
mode: deployment
extraEnvs:
- name: LOGCORE_API_KEY
valueFrom:
secretKeyRef: { name: logcore, key: api-key }
config:
exporters:
otlphttp/logcore:
endpoint: https://logcore.lsofito.com
headers:
x-logcore-api-key: ${env:LOGCORE_API_KEY}
service:
pipelines:
traces: { exporters: [otlphttp/logcore] }
metrics: { exporters: [otlphttp/logcore] }
logs: { exporters: [otlphttp/logcore] }Apps in the cluster then use OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector.observability:4318 and no key.