Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrevert "feat(ourlogs): Allow log ingestion behind a flag"" #4471

Merged
merged 9 commits into from
Jan 29, 2025
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Allow log ingestion behind a flag, only for internal use currently. ([#4471](https://github.com/getsentry/relay/pull/4471))

**Features**:

- Add configuration option to limit the amount of concurrent http connections. ([#4453](https://github.com/getsentry/relay/pull/4453))
Expand Down
21 changes: 19 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ relay-kafka = { path = "relay-kafka" }
relay-log = { path = "relay-log" }
relay-metrics = { path = "relay-metrics" }
relay-monitors = { path = "relay-monitors" }
relay-ourlogs = { path = "relay-ourlogs" }
relay-pattern = { path = "relay-pattern" }
relay-pii = { path = "relay-pii" }
relay-profiling = { path = "relay-profiling" }
Expand Down Expand Up @@ -150,7 +151,7 @@ reqwest = "0.12.9"
rmp-serde = "1.3.0"
sentry = "0.34.0"
sentry-core = "0.34.0"
sentry-kafka-schemas = { version = "0.1.122", default-features = false }
sentry-kafka-schemas = { version = "0.1.129", default-features = false }
sentry-release-parser = { version = "1.3.2", default-features = false }
sentry-types = "0.34.0"
semver = "1.0.23"
Expand Down
3 changes: 3 additions & 0 deletions relay-cogs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ pub enum AppFeature {
Transactions,
/// Errors.
Errors,
/// Logs.
Logs,
/// Spans.
Spans,
/// Sessions.
Expand Down Expand Up @@ -159,6 +161,7 @@ impl AppFeature {
Self::Transactions => "transactions",
Self::Errors => "errors",
Self::Spans => "spans",
Self::Logs => "our_logs",
Self::Sessions => "sessions",
Self::ClientReports => "client_reports",
Self::CheckIns => "check_ins",
Expand Down
8 changes: 8 additions & 0 deletions relay-config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,8 @@ pub struct Limits {
/// The maximum payload size for a profile
pub max_profile_size: ByteSize,
/// The maximum payload size for a span.
pub max_log_size: ByteSize,
/// The maximum payload size for a span.
pub max_span_size: ByteSize,
/// The maximum payload size for a statsd metric.
pub max_statsd_size: ByteSize,
Expand Down Expand Up @@ -683,6 +685,7 @@ impl Default for Limits {
max_api_file_upload_size: ByteSize::mebibytes(40),
max_api_chunk_upload_size: ByteSize::mebibytes(100),
max_profile_size: ByteSize::mebibytes(50),
max_log_size: ByteSize::mebibytes(1),
max_span_size: ByteSize::mebibytes(1),
max_statsd_size: ByteSize::mebibytes(1),
max_metric_buckets_size: ByteSize::mebibytes(1),
Expand Down Expand Up @@ -2213,6 +2216,11 @@ impl Config {
self.values.limits.max_check_in_size.as_bytes()
}

/// Returns the maximum payload size of a log in bytes.
pub fn max_log_size(&self) -> usize {
self.values.limits.max_log_size.as_bytes()
}

/// Returns the maximum payload size of a span in bytes.
pub fn max_span_size(&self) -> usize {
self.values.limits.max_span_size.as_bytes()
Expand Down
6 changes: 5 additions & 1 deletion relay-dynamic-config/src/feature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ pub enum Feature {
/// Serialized as `organizations:ingest-spans-in-eap`
#[serde(rename = "organizations:ingest-spans-in-eap")]
IngestSpansInEap,

/// Enable log ingestion for our log product (this is not internal logging).
///
/// Serialized as `organizations:ourlogs-ingestion`.
#[serde(rename = "organizations:ourlogs-ingestion")]
OurLogsIngestion,
/// This feature has graduated and is hard-coded for external Relays.
#[doc(hidden)]
#[serde(rename = "projects:profiling-ingest-unsampled-profiles")]
Expand Down
2 changes: 2 additions & 0 deletions relay-event-schema/src/processor/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pub enum ValueType {
Message,
Thread,
Breadcrumb,
OurLog,
Span,
ClientSdkInfo,

Expand Down Expand Up @@ -84,6 +85,7 @@ relay_common::derive_fromstr_and_display!(ValueType, UnknownValueTypeError, {
ValueType::Message => "message",
ValueType::Thread => "thread",
ValueType::Breadcrumb => "breadcrumb",
ValueType::OurLog => "ourlog",
ValueType::Span => "span",
ValueType::ClientSdkInfo => "sdk",
ValueType::Minidump => "minidump",
Expand Down
2 changes: 2 additions & 0 deletions relay-event-schema/src/processor/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ pub trait Processor: Sized {
process_method!(process_breadcrumb, crate::protocol::Breadcrumb);
process_method!(process_template_info, crate::protocol::TemplateInfo);
process_method!(process_header_name, crate::protocol::HeaderName);
process_method!(process_ourlog, crate::protocol::OurLog);
process_method!(process_span, crate::protocol::Span);
process_method!(process_trace_context, crate::protocol::TraceContext);
process_method!(process_native_image_path, crate::protocol::NativeImagePath);
process_method!(process_contexts, crate::protocol::Contexts);
process_method!(process_attribute_value, crate::protocol::AttributeValue);

fn process_other(
&mut self,
Expand Down
2 changes: 2 additions & 0 deletions relay-event-schema/src/protocol/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ mod mechanism;
mod metrics;
mod metrics_summary;
mod nel;
mod ourlog;
mod relay_info;
mod replay;
mod request;
Expand Down Expand Up @@ -54,6 +55,7 @@ pub use self::mechanism::*;
pub use self::metrics::*;
pub use self::metrics_summary::*;
pub use self::nel::*;
pub use self::ourlog::*;
pub use self::relay_info::*;
pub use self::replay::*;
pub use self::request::*;
Expand Down
Loading
Loading