LLM MeasurementGitHub
Guides

Do my LLM traces record token usage and user IDs?

fleetdiff inspect reads a local OTLP capture and reports which usage and identity fields are present, missing or zero.

Capture from your collector

Add a file exporter to your Contrib collector:

exporters:
  file/inspect:
    path: /private-capture/traces.jsonl
    format: json
    rotation:
      max_megabytes: 4
      max_backups: 1

Create the directory, writable by the collector. Add file/inspect alongside existing trace exporters. Stop and flush the capture, then copy it to ./traces.jsonl. Follow the capture recipe.

Security

See the security reference for capture settings.

Try the sample

Linux or macOS; needs curl, gh, shasum and tar. The installer checks the release before unpacking it.

curl -fsSLo fleetdiff-source.tar.gz https://github.com/llm-measurement/fleetdiff/archive/refs/tags/v0.14.1.tar.gz
tar -xzf fleetdiff-source.tar.gz
cd fleetdiff-0.14.1
sh scripts/install.sh v0.14.1 ./release
# Public synthetic sample only. Never use this key for real captures.
FLEETDIFF_PUBLIC_SAMPLE_KEY=public-synthetic-trace-sample-key-v1 \
  ./release/fleetdiff inspect --secret-env FLEETDIFF_PUBLIC_SAMPLE_KEY examples/inspect/synthetic-traces.json

What you'll see

Example output from this synthetic sample; your values will reflect your input.

The report starts with the questions this capture can answer and the fields to improve next.

Your traces can fully answer 2 of 7 questions.
Next: Record both input and output usage; resolve invalid, conflicting, or subset-violating values. Declare unavailable usage instead of filling in zeros.

Usage fields

One model attempt is missing token fields. Another has input and output recorded as zero, with no declared origin.

4 model attempts across 6 captured spans; 170 reported tokens.
Usage: 3 complete, 1 missing either field.
Origin unknown: input 4, output 4 attempts.

The zero-valued fields are present, so they are included in the three complete observations. The origin check keeps their source unknown.

User and session fields

All four model attempts have user IDs.

user: ~4 distinct; identity present on 4/4 attempts

Only two of the four attempts have session IDs.

session: ~2 distinct; identity present on 2/4 attempts

The report also lists standard attribute names and uses local aliases for individual users and sessions.

Source and reproduction: released synthetic OTLP capture and capture recipes. Verification record.

What the numbers mean

Readiness describes fields in the captured model attempts; zeros without declared usage origin remain unknown.
Measurement notes

evijay+fleetdiff@gmail.com · Questions · Ran it on your data? Tell us what it found · Security issues (private)