Skip to content

APM with OpenTelemetry ​

Logcore APM is built entirely on OpenTelemetry (OTel). You add the standard OpenTelemetry SDK or auto-instrumentation agent to your application, and it exports traces, metrics and logs to Logcore over OTLP. There is no Logcore-specific tracing library to install.

 your app + OpenTelemetry ──OTLP──▶ Logcore
                                     ├─ spans   → APM → Services, Traces (flame graph)
                                     ├─ metrics → APM → OTel metrics
                                     └─ logs    → Logs (linked to their trace)

Choose how to send data ​

Through the Logcore agent (recommended on servers)Directly to Logcore
Setup on the hostEnable apm: in logcore.yamlnothing
App endpointhttp://localhost:4318 (HTTP) or http://localhost:4317 (gRPC)https://logcore.lsofito.com or https://logcore.lsofito.com:4317
API key in the appnot needed: the agent adds its ownrequired in the x-logcore-api-key header
Added automaticallyhost.name, and deployment.environment from the agent's env: tag
Best forVMs and bare-metal servers running the agentcontainers, Kubernetes, serverless, laptops
GuideSend through the agentSend directly

Both routes end up in the same place, and you can mix them.

Three steps ​

  1. Pick a route from the table above and set it up.
  2. Instrument your app with OpenTelemetry. Most languages offer zero-code auto-instrumentation. See Language setup.
  3. Set three environment variables in your app: the service name, the endpoint, and (direct mode only) the key.
sh
OTEL_SERVICE_NAME=checkout
OTEL_RESOURCE_ATTRIBUTES=deployment.environment=production
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318     # agent mode

Within a minute your service appears under APM → Services.

Instrument app page

The dashboard page Instrument app shows your endpoints, lets you pick an API key, and generates these settings for each language.

What Logcore uses from OpenTelemetry ​

OpenTelemetry fieldUsed for
service.nameService name in APM, and the service of OTel logs
deployment.environmentThe env facet on traces, and the env: tag on logs
host.nameLinks data to an infrastructure host
span kind server / consumerCounted as requests (along with root spans of background jobs)
span status ERROR, or HTTP 5xx on server spansCounted as errors
span nameThe operation (for example GET /orders/:id)
http.response.status_code (or http.status_code)The HTTP status facet and 5xx error detection
trace_id on log recordsThe View trace link in Logs

Data retention ​

Spans and OTel metrics are kept for 7 days by default. OTel logs follow the normal log retention. Your Logcore administrator can change both.