Skip to content

OTel file exporter: option to stop writing metric records (file grows ~50-70 MB/day) #5344

Description

@peterbax117

With COPILOT_OTEL_FILE_EXPORTER_PATH set, the CLI writes metric records ({"type":"metric",...}) into the same JSONL file as spans. On one machine (CLI 1.0.103, Windows) the file reached 9.3 GB over ~6 months; 6,052,252 of 6,306,070 lines (96%) are metric records. Consumers that only need spans for token and cost accounting (for example TokenTracker) still have to read past them.

OTEL_METRICS_EXPORTER=none does not stop the metric records, and I could not find a documented setting that turns them off for the file exporter.

Request: a setting that disables metric export to the file (or writes metrics to a separate path), so a spans-only file stays small.

Related: #5005 (metric streams have no service.instance.id).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configurationConfig files, instruction files, settings, and environment variables

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions