Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0e54e70
feat(eap): Produce spans to the items topic
phacops May 13, 2025
64e92c6
Remove Serialize trait
phacops May 14, 2025
41d57d1
Add missing attributes from Snuba and span data
phacops May 14, 2025
4b53ff0
Add sample rates
phacops May 14, 2025
bf0739b
Revert "Remove Serialize trait"
phacops May 14, 2025
0d89299
Fix build
phacops May 14, 2025
6c64a92
Produce JSON-encoded spans to ingest-spans
phacops May 14, 2025
507c3dd
Merge branch 'master' into pierre/eap-spans-to-items-topic
phacops May 14, 2025
8474bed
Remove unnecessary clone
phacops May 14, 2025
9c737e1
Add a CHANGELOG entry
phacops May 14, 2025
cb642be
Merge branch 'master' into pierre/eap-spans-to-items-topic
phacops May 15, 2025
2c7ad5b
Filter empty tags
phacops May 15, 2025
3a17960
Merge branch 'master' into pierre/eap-spans-to-items-topic
phacops Jun 12, 2025
d56649a
Fix build
phacops Jun 12, 2025
8b7d70a
Add a way to configure to which topic to produce spans
phacops Jun 12, 2025
482e982
Merge branch 'master' into pierre/eap-spans-to-items-topic
phacops Jun 13, 2025
2063ce3
Do not use unwrap but handle the error
phacops Jun 13, 2025
cf5143c
Fix build
phacops Jun 13, 2025
4ea4b30
Fix documentation.
phacops Jun 13, 2025
0247573
Fix documentation, again.
phacops Jun 13, 2025
658d117
Use top-level sample rate fields
phacops Jun 17, 2025
a88a2bb
Merge branch 'master' into pierre/eap-spans-to-items-topic
phacops Jun 18, 2025
b06dde0
Fix CHANGELOG
phacops Jun 18, 2025
cf3b446
Merge branch 'master' into pierre/eap-spans-to-items-topic
phacops Jun 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

**Internal**:

- Produce spans to the items topic. ([#4735](https://github.com/getsentry/relay/pull/4735))

## 25.6.1

**Features**:
Expand Down
33 changes: 33 additions & 0 deletions relay-config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,9 @@ pub struct Processing {
pub max_session_secs_in_past: u32,
/// Kafka producer configurations.
pub kafka_config: Vec<KafkaConfigParam>,
/// Configure what span format to produce.
#[serde(default)]
pub span_producers: SpanProducers,
/// Additional kafka producer configurations.
///
/// The `kafka_config` is the default producer configuration used for all topics. A secondary
Expand Down Expand Up @@ -1200,6 +1203,26 @@ impl Default for Processing {
attachment_chunk_size: default_chunk_size(),
projectconfig_cache_prefix: default_projectconfig_cache_prefix(),
max_rate_limit: default_max_rate_limit(),
span_producers: Default::default(),
}
}
}

/// Configuration for span producers.
#[derive(Debug, Serialize, Deserialize)]
#[serde(default)]
pub struct SpanProducers {
/// Send JSON spans to `ingest-spans`.
pub produce_json: bool,
/// Send Protobuf (TraceItem) to `snuba-items`.
pub produce_protobuf: bool,
}

impl Default for SpanProducers {
fn default() -> Self {
Self {
produce_json: true,
produce_protobuf: false,
}
}
}
Expand Down Expand Up @@ -2592,6 +2615,16 @@ impl Config {
let forward = self.values.routing.accept_unknown_items;
forward.unwrap_or_else(|| !self.processing_enabled())
}

/// Returns `true` if we should produce TraceItem spans on `snuba-items`.
pub fn produce_protobuf_spans(&self) -> bool {
self.values.processing.span_producers.produce_protobuf
}

/// Returns `true` if we should produce JSON spans on `ingest-spans`.
pub fn produce_json_spans(&self) -> bool {
self.values.processing.span_producers.produce_json
}
}

impl Default for Config {
Expand Down
2 changes: 1 addition & 1 deletion relay-kafka/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ define_topic_assignments! {
replay_recordings: (KafkaTopic::ReplayRecordings, "ingest-replay-recordings", "Recordings topic name."),
ourlogs: (KafkaTopic::OurLogs, "snuba-ourlogs", "Logs from our logs product."),
monitors: (KafkaTopic::Monitors, "ingest-monitors", "Monitor check-ins."),
spans: (KafkaTopic::Spans, "snuba-spans", "Standalone spans without a transaction."),
spans: (KafkaTopic::Spans, "ingest-spans", "Standalone spans without a transaction."),
feedback: (KafkaTopic::Feedback, "ingest-feedback-events", "Feedback events topic."),
items: (KafkaTopic::Items, "snuba-items", "Items topic."),
}
Expand Down
Loading
Loading