Skip to content

Commit b01179b

Browse files
feat(logs): support log streaming (#2666)
Adds support for live streaming of logs by polling the API every 2 seconds (by default). Polling interval is configurable via command line argument. --------- Signed-off-by: Vjeran Grozdanic <vjeran.grozdanic@sentry.io> Co-authored-by: Daniel Szoke <daniel.szoke@sentry.io> Co-authored-by: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com>
1 parent bffbead commit b01179b

5 files changed

Lines changed: 357 additions & 10 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ data-encoding = "2.3.3"
7979
magic_string = "0.3.4"
8080
chrono-tz = "0.8.4"
8181
secrecy = "0.8.0"
82+
lru = "0.16.0"
8283

8384
[dev-dependencies]
8485
assert_cmd = "2.0.11"

src/api/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2524,7 +2524,7 @@ pub struct VcsInfo<'a> {
25242524
}
25252525

25262526
/// Log entry structure from the logs API
2527-
#[derive(Debug, Deserialize)]
2527+
#[derive(Debug, Deserialize, Clone)]
25282528
pub struct LogEntry {
25292529
#[serde(rename = "sentry.item_id")]
25302530
pub item_id: String,

0 commit comments

Comments
 (0)