feat: optionally export sampled traces to a GCS bucket#2
Open
zaquestion wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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).