Skip to content

Commit 2f7c8b6

Browse files
authored
feat(eap): Produce logs to the items topic (#4707)
1 parent 7ae63e2 commit 2f7c8b6

File tree

12 files changed

+586
-425
lines changed

12 files changed

+586
-425
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
- Remove threads with 1 non-idle sample in profiling chunks. ([#4694](https://github.com/getsentry/relay/pull/4694))
2222
- Migrate all Rust workspace crates to edition 2024. ([#4705](https://github.com/getsentry/relay/pull/4705))
23+
- Produce logs to the items topic. ([#4707](https://github.com/getsentry/relay/pull/4707))
2324

2425
## 25.4.0
2526

Cargo.lock

Lines changed: 27 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ relay-common = { path = "relay-common" }
4343
relay-config = { path = "relay-config" }
4444
relay-crash = { path = "relay-crash" }
4545
relay-dynamic-config = { path = "relay-dynamic-config" }
46+
relay-event-derive = { path = "relay-event-derive" }
4647
relay-event-normalization = { path = "relay-event-normalization" }
4748
relay-event-schema = { path = "relay-event-schema" }
4849
relay-ffi = { path = "relay-ffi" }
@@ -58,6 +59,7 @@ relay-pii = { path = "relay-pii" }
5859
relay-profiling = { path = "relay-profiling" }
5960
relay-prosperoconv = { path = "relay-prosperoconv" }
6061
relay-protocol = { path = "relay-protocol" }
62+
relay-protocol-derive = { path = "relay-protocol-derive" }
6163
relay-quotas = { path = "relay-quotas" }
6264
relay-redis = { path = "relay-redis" }
6365
relay-replays = { path = "relay-replays" }
@@ -66,23 +68,21 @@ relay-server = { path = "relay-server" }
6668
relay-spans = { path = "relay-spans" }
6769
relay-statsd = { path = "relay-statsd" }
6870
relay-system = { path = "relay-system" }
71+
relay-test = { path = "relay-test" }
6972
relay-threading = { path = "relay-threading" }
7073
relay-ua = { path = "relay-ua" }
71-
relay-test = { path = "relay-test" }
72-
relay-protocol-derive = { path = "relay-protocol-derive" }
73-
relay-event-derive = { path = "relay-event-derive" }
7474

7575
ahash = "0.8.11"
7676
android_trace_log = { version = "0.3.0", features = ["serde"] }
7777
# This version is pinned because upgrading it enables backtrace by default without the possibility to disable it
7878
# which will increase processing time for transactions massively.
7979
# Keep it pinned until it's possible to disable backtrace.
8080
anyhow = "=1.0.69"
81+
arc-swap = "1.7.1"
82+
async-trait = "0.1.83"
8183
axum = "0.8.1"
8284
axum-extra = "0.10.0"
8385
axum-server = "0.7.1"
84-
arc-swap = "1.7.1"
85-
async-trait = "0.1.83"
8686
backoff = "0.4.0"
8787
bindgen = "0.71.1"
8888
brotli = "6.0.0"
@@ -91,8 +91,8 @@ bytes = "1.10.1"
9191
bzip2 = "0.4.4"
9292
cadence = "1.5.0"
9393
chrono = { version = "0.4.38", default-features = false, features = [
94-
"std",
95-
"serde",
94+
"std",
95+
"serde",
9696
] }
9797
clap = { version = "4.4.18" }
9898
clap_complete = "4.1.6"
@@ -110,19 +110,19 @@ dynfmt = "0.1.5"
110110
ed25519-dalek = "2.1.1"
111111
enumset = "1.0.13"
112112
flate2 = "1.0.35"
113+
flume = { version = "0.11.1", default-features = false }
113114
fnv = "1.0.7"
114115
futures = { version = "0.3", default-features = false, features = ["std"] }
115-
flume = { version = "0.11.1", default-features = false }
116116
globset = "0.4.15"
117117
hash32 = "0.3.1"
118118
hashbrown = "0.14.5"
119119
hex = "0.4.3"
120120
hmac = "0.12.1"
121121
hostname = "0.4.0"
122-
human-size = "0.4.3"
123122
http = "1.1.0"
124-
hyper-util = { version = "0.1.10", features = ["tokio"] }
123+
human-size = "0.4.3"
125124
hyper = "1.5.1"
125+
hyper-util = { version = "0.1.10", features = ["tokio"] }
126126
indexmap = "2.2.6"
127127
insta = { version = "1.31.0", features = ["json", "redactions", "ron"] }
128128
ipnetwork = "0.20.0"
@@ -132,8 +132,8 @@ libc = "0.2.167"
132132
liblzma = "0.3.5"
133133
lru = "0.12.5"
134134
maxminddb = "0.24.0"
135-
memchr = "2.7.4"
136135
md5 = "0.7.0"
136+
memchr = "2.7.4"
137137
mime = "0.3.17"
138138
minidump = "0.22.2"
139139
multer = "3.1.0"
@@ -151,6 +151,7 @@ pretty-hex = "0.4.1"
151151
priority-queue = "2.0.3"
152152
proc-macro2 = "1.0.92"
153153
prost = "0.13.3"
154+
prost-types = "0.13.3"
154155
psl = "2.1.65"
155156
quote = "1.0.37"
156157
rand = "0.8.5"
@@ -162,12 +163,13 @@ regex = "1.11.1"
162163
regex-lite = "0.1.6"
163164
reqwest = "0.12.9"
164165
rmp-serde = "1.3.0"
166+
semver = "1.0.23"
165167
sentry = "0.36.0"
166168
sentry-core = "0.36.0"
167-
sentry-kafka-schemas = { version = "0.1.129", default-features = false }
169+
sentry-kafka-schemas = { version = "1.3.2", default-features = false }
168170
sentry-release-parser = { version = "1.3.2", default-features = false }
169171
sentry-types = "0.36.0"
170-
semver = "1.0.23"
172+
sentry_protos = "0.2.0"
171173
serde = { version = "1.0.215", features = ["derive", "rc"] }
172174
serde-transcode = "1.1.1"
173175
serde_bytes = "0.11"
@@ -205,6 +207,6 @@ unescaper = "0.1.5"
205207
unicase = "2.8.0"
206208
url = "2.5.4"
207209
utf16string = "0.2.0"
208-
uuid = { version = "1.11.0", features = ["serde", "v4"] }
210+
uuid = { version = "1.11.0", features = ["serde", "v4", "v7"] }
209211
walkdir = "2.5.0"
210212
zstd = { version = "0.13.2", features = ["experimental"] }

relay-kafka/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ rmp-serde = { workspace = true, optional = true }
2121
serde = { workspace = true }
2222
serde_json = { workspace = true, optional = true }
2323
thiserror = { workspace = true }
24-
sentry-kafka-schemas = { workspace = true, default_features = false, optional = true }
24+
sentry-kafka-schemas = { workspace = true, default-features = false, optional = true }
2525

2626
[dev-dependencies]
2727
serde_yaml = { workspace = true }
28-
sentry-kafka-schemas = { workspace = true }
28+
sentry-kafka-schemas = { workspace = true, default-features = false }
2929

3030
[features]
3131
default = []

relay-kafka/src/config.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,16 @@ pub enum KafkaTopic {
5151
Spans,
5252
/// Feedback events topic.
5353
Feedback,
54+
/// Items topic
55+
Items,
5456
}
5557

5658
impl KafkaTopic {
5759
/// Returns iterator over the variants of [`KafkaTopic`].
5860
/// It will have to be adjusted if the new variants are added.
5961
pub fn iter() -> std::slice::Iter<'static, Self> {
6062
use KafkaTopic::*;
61-
static TOPICS: [KafkaTopic; 14] = [
63+
static TOPICS: [KafkaTopic; 15] = [
6264
Events,
6365
Attachments,
6466
Transactions,
@@ -73,6 +75,7 @@ impl KafkaTopic {
7375
OurLogs,
7476
Spans,
7577
Feedback,
78+
Items,
7679
];
7780
TOPICS.iter()
7881
}
@@ -138,6 +141,7 @@ define_topic_assignments! {
138141
monitors: (KafkaTopic::Monitors, "ingest-monitors", "Monitor check-ins."),
139142
spans: (KafkaTopic::Spans, "snuba-spans", "Standalone spans without a transaction."),
140143
feedback: (KafkaTopic::Feedback, "ingest-feedback-events", "Feedback events topic."),
144+
items: (KafkaTopic::Items, "snuba-items", "Items topic."),
141145
}
142146

143147
/// Configuration for a "logical" topic/datasink that Relay should forward data into.

relay-kafka/src/producer/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ pub enum ClientError {
6464
/// Failed to validate the topic.
6565
#[error("failed to validate the topic with name {0}: {1:?}")]
6666
TopicError(String, rdkafka_sys::rd_kafka_resp_err_t),
67+
68+
/// Failed to encode the protobuf into the buffer
69+
/// because the buffer is too small.
70+
#[error("failed to encode protobuf because the buffer is too small")]
71+
ProtobufEncodingFailed,
6772
}
6873

6974
/// Describes the type which can be sent using kafka producer provided by this crate.

0 commit comments

Comments
 (0)