Appearance
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 host | Enable apm: in logcore.yaml | nothing |
| App endpoint | http://localhost:4318 (HTTP) or http://localhost:4317 (gRPC) | https://logcore.lsofito.com or https://logcore.lsofito.com:4317 |
| API key in the app | not needed: the agent adds its own | required in the x-logcore-api-key header |
| Added automatically | host.name, and deployment.environment from the agent's env: tag | |
| Best for | VMs and bare-metal servers running the agent | containers, Kubernetes, serverless, laptops |
| Guide | Send through the agent | Send directly |
Both routes end up in the same place, and you can mix them.
Three steps
- Pick a route from the table above and set it up.
- Instrument your app with OpenTelemetry. Most languages offer zero-code auto-instrumentation. See Language setup.
- 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 modeWithin 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 field | Used for |
|---|---|
service.name | Service name in APM, and the service of OTel logs |
deployment.environment | The env facet on traces, and the env: tag on logs |
host.name | Links data to an infrastructure host |
span kind server / consumer | Counted as requests (along with root spans of background jobs) |
span status ERROR, or HTTP 5xx on server spans | Counted as errors |
| span name | The 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 records | The 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.