Skip to content

feat: optionally export sampled traces to a GCS bucket#2

Open
zaquestion wants to merge 1 commit into
khanfrom
gcs-export
Open

feat: optionally export sampled traces to a GCS bucket#2
zaquestion wants to merge 1 commit into
khanfrom
gcs-export

Conversation

@zaquestion

Copy link
Copy Markdown
Collaborator

Adds a new GCSExport config group that, when enabled, writes every span of every kept trace to a GCS bucket as gzipped JSON Lines objects under time-partitioned paths (prefix/YYYY/MM/DD/HH/host-ts-seq.jsonl.gz), in addition to normal Honeycomb delivery.

  • transmit: new GCSTransmission with a non-blocking bounded queue, size/interval-based batching, and up to 4 concurrent uploads; a slow or unavailable GCS drops spans from the export (gcs_export_dropped) and never blocks the collector send path. Auth is via Application Default Credentials; uploads use a DoesNotExist precondition so retries are idempotent.
  • collect: kept spans are teed to the exporter at all three send sites (normal send, late-arriving spans, stress-relief keeps); dry-run "would have dropped" traces and non-trace events are not exported.
  • config: GCSExport group (Enabled, Bucket, KeyPrefix, FlushInterval, MaxBatchSize, QueueSize) with metadata, env var / CLI flag for the bucket, and regenerated docs/templates.
  • main: exporter is injected as "gcsExport", with a noop when disabled.

New metrics: gcs_export_events, gcs_export_dropped, gcs_export_batches, gcs_export_errors, gcs_export_batch_bytes, gcs_export_queue_length.

Adds cloud.google.com/go/storage (grpc pinned at v1.80.0).

Adds a new GCSExport config group that, when enabled, writes every span
of every kept trace to a GCS bucket as gzipped JSON Lines objects under
time-partitioned paths (prefix/YYYY/MM/DD/HH/host-ts-seq.jsonl.gz), in
addition to normal Honeycomb delivery.

- transmit: new GCSTransmission with a non-blocking bounded queue,
  size/interval-based batching, and up to 4 concurrent uploads; a slow
  or unavailable GCS drops spans from the export (gcs_export_dropped)
  and never blocks the collector send path. Auth is via Application
  Default Credentials; uploads use a DoesNotExist precondition so
  retries are idempotent.
- collect: kept spans are teed to the exporter at all three send sites
  (normal send, late-arriving spans, stress-relief keeps); dry-run
  "would have dropped" traces and non-trace events are not exported.
- config: GCSExport group (Enabled, Bucket, KeyPrefix, FlushInterval,
  MaxBatchSize, QueueSize) with metadata, env var / CLI flag for the
  bucket, and regenerated docs/templates.
- main: exporter is injected as "gcsExport", with a noop when disabled.

New metrics: gcs_export_events, gcs_export_dropped, gcs_export_batches,
gcs_export_errors, gcs_export_batch_bytes, gcs_export_queue_length.

Adds cloud.google.com/go/storage (grpc pinned at v1.80.0).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant