Star us on GitHub
Star
Menu

File

Set up log ingestion using an OpenTelemetry collector with the filelog receiver.
1
Define your OpenTelemetry configuration.

Setup the following OpenTelemetry collector. Check out our example here.

receivers: filelog: include: [/watch.log] start_at: beginning exporters: otlp/highlight: endpoint: 'https://otel.highlight.io:4317' processors: attributes/highlight-project: actions: - key: highlight.project_id value: '<YOUR_PROJECT_ID>' action: insert batch: service: pipelines: logs: receivers: [filelog] processors: [attributes/highlight-project, batch] exporters: [otlp/highlight]
Copy
2
Run the collector

Run the OpenTelemetry collector to start streaming the file to highlight.

docker run -v /my/file/to/watch.log:/watch.log -v $(pwd)/config.yaml:/etc/otelcol-contrib/config.yaml otel/opentelemetry-collector-contrib
Copy
3
Verify your backend logs are being recorded.

Visit the highlight logs portal and check that backend logs are coming in.