127.0.0.1:9464 and exports OTLP to a collector on 127.0.0.1:4317.
What Filetrace adds to your telemetry
Application telemetry tells you that a request was served. Filetrace tells you which file left the machine, by which process, to which address, and how sure that association is. The two join on the host and the process:
Metrics deliberately carry no file path or address, so their series stay bounded. When you need the path or the destination, use a log record or the API.
Prometheus alert rules
Save this asfiletrace.rules.yml and point rule_files at it. Every expression uses only the metrics and labels on the Prometheus page.
FiletraceUnattributedEgress is informational, not a fault. A server that generates responses in memory, a proxy that streams from another socket, or a database that sends query results all produce egress with no file behind it. Use it to find the processes worth investigating, not to page someone.Grafana dashboard
A compact dashboard with five panels. Each query is self-contained; paste it into a Grafana panel with the Prometheus data source that scrapes Filetrace. Outbound bytes per second, by processprocess_cpu_time_seconds_total and process_memory_usage_bytes are common names. Select the agent’s series with job="filetrace" so they do not mix with other exporters.OpenTelemetry Collector
The agent sends OTLP/gRPC without TLS to a collector on the same host. The collector adds credentials, batching and routing, and forwards each signal to the backend that fits it: metrics to Prometheus remote write, log records to Loki, and both to a SIEM.Joining Filetrace with application telemetry
Filetrace does not emit traces. It emits log records and metrics that share identifiers with the rest of your telemetry, so you can pivot from an application signal to the file that left the machine.
From a slow request to the file it sent. In your tracing UI, find the span for the request and note its host and PID. In Loki, query the transfer records for that process in the same window:
Correlating with traces through exemplars
Filetrace metrics are counters and gauges without exemplars, so a Grafana panel cannot jump straight to a trace. Two patterns work well:- Log-based pivot. Keep
file_transferlog records in Loki and add a Grafana derived field onprocess_pidthat links to your tracing UI filtered by that PID and the record’s time range. - Dashboard variable. Add a
process_executable_namevariable to the dashboard and filter both the Filetrace panels and the application panels by it. The process name is the common key.
Sizing and retention
- Metrics are cheap: a fixed set of series plus one per process, method and confidence, bounded by
[limits] metric_series(default 2048). Scrape every 15–30 seconds. - Log records are the volume.
file_transferrecords are emitted per transfer, not per byte, but a busy web server can produce thousands per minute. Batch in the collector and set a retention that matches your audit needs. - The agent’s own history is in memory and starts when the agent starts. For questions older than a restart, use the metrics and log records you exported, not
filetrace files.
Related pages
- Prometheus — enable the page, every metric and label, PromQL examples.
- OpenTelemetry — OTLP settings, log record format, delivery and retries.
- Metrics and attributes reference — every exported name.
- Use cases — scenarios that put these recipes to work.