OTLP
Use connectors.otlp when you want Blyp to forward logs to one or more OTLP-compatible backends.
Common targets include:
- Grafana Cloud
- Datadog
- Honeycomb
- a self-hosted OpenTelemetry Collector
Config
OTLP connectors are configured as a named array:
export default {
connectors: {
otlp: [
{
name: "grafana",
enabled: true,
mode: "auto",
endpoint: process.env.OTLP_HTTP_ENDPOINT,
auth: process.env.OTLP_AUTH_HEADER,
serviceName: "api",
},
{
name: "honeycomb",
enabled: true,
mode: "manual",
endpoint: process.env.HONEYCOMB_OTLP_ENDPOINT,
headers: {
"x-honeycomb-team": process.env.HONEYCOMB_API_KEY ?? "",
},
},
],
},
};Config fields
name: required identifier for the OTLP targetenabled: enables the targetmode:autoormanualendpoint: absolute OTLP HTTP logs endpointheaders: optional custom headersauth: convenience value for theAuthorizationheaderserviceName: defaults toblyp-app
Automatic server forwarding
When a target is both enabled and ready and mode: "auto", Blyp forwards normal server logs to that target automatically.
Blyp forwards each log as an OTLP
LogRecord, mapping the log message to the body, the Blyp level toseverityText, and structured fields to OTLP attributes.
Manual APIs
Manual OTLP APIs always target a named connector:
import {
createOtlpLogger,
createStructuredOtlpLogger,
} from "@blyp/core/otlp";
createOtlpLogger({
name: "grafana",
}).info("manual otlp log");
const structured = createStructuredOtlpLogger(
"checkout",
{ orderId: "ord_123" },
{ name: "grafana" }
);
structured.info("manual start");
structured.emit({ status: 200 });Browser and Expo forwarding
const browserLogger = createClientLogger({
endpoint: "/inngest",
connector: { type: "otlp", name: "grafana" },
});const expoLogger = createExpoLogger({
endpoint: "https://api.example.com/inngest",
connector: { type: "otlp", name: "grafana" },
});Browser and Expo still post to Blyp first. Blyp forwards to the named OTLP target only when that server connector is configured and ready.