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

Revert "ref(project-cache): Revert project cache split and metric meta removal (#4198)" #4199

Merged
merged 3 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ jobs:
- run: make test-integration
env:
PYTEST_N: 6
RELAY_VERSION_CHAIN: "20.6.0,latest"
RELAY_VERSION_CHAIN: "23.12.0,latest"

sentry-relay-integration-tests:
name: Sentry-Relay Integration Tests
Expand Down
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

**Breaking Changes**:

- Removes support for metric meta envelope items. ([#4152](https://github.com/getsentry/relay/pull/4152))
- Removes support for the project cache endpoint version 2 and before. ([#4147](https://github.com/getsentry/relay/pull/4147))

**Bug Fixes**

- Allow profile chunks without release. ([#4155](https://github.com/getsentry/relay/pull/4155))
Expand All @@ -21,7 +26,7 @@

## 24.10.0

**Breaking Changes:**
**Breaking Changes**:

- Only allow processing enabled in managed mode. ([#4087](https://github.com/getsentry/relay/pull/4087))

Expand All @@ -31,7 +36,7 @@
- Use the duration reported by the profiler instead of the transaction. ([#4058](https://github.com/getsentry/relay/pull/4058))
- Incorrect pattern matches involving adjacent any and wildcard matchers. ([#4072](https://github.com/getsentry/relay/pull/4072))

**Features:**
**Features**:

- Add a config option to add default tags to all Relay Sentry events. ([#3944](https://github.com/getsentry/relay/pull/3944))
- Automatically derive `client.address` and `user.geo` for standalone spans. ([#4047](https://github.com/getsentry/relay/pull/4047))
Expand All @@ -43,7 +48,7 @@
- Add support for creating User from LoginId in Unreal Crash Context. ([#4093](https://github.com/getsentry/relay/pull/4093))
- Add multi-write Redis client. ([#4064](https://github.com/getsentry/relay/pull/4064))

**Internal:**
**Internal**:

- Remove unused `cogs.enabled` configuration option. ([#4060](https://github.com/getsentry/relay/pull/4060))
- Add the dynamic sampling rate to standalone spans as a measurement so that it can be stored, queried, and used for extrapolation. ([#4063](https://github.com/getsentry/relay/pull/4063))
Expand Down
89 changes: 87 additions & 2 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ relay-test = { path = "relay-test" }
relay-protocol-derive = { path = "relay-protocol-derive" }
relay-event-derive = { path = "relay-event-derive" }

ahash = "0.8.11"
android_trace_log = { version = "0.3.0", features = ["serde"] }
anyhow = "1.0.66"
axum = "0.7.5"
Expand Down Expand Up @@ -120,6 +121,7 @@ num-traits = "0.2.18"
num_cpus = "1.13.0"
once_cell = "1.13.1"
opentelemetry-proto = { version = "0.7.0", default-features = false }
papaya = "0.1.4"
parking_lot = "0.12.1"
path-slash = "0.2.1"
pest = "2.1.3"
Expand Down
4 changes: 0 additions & 4 deletions relay-cogs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@ pub enum AppFeature {
/// This app feature is for continuous profiling.
Profiles,

/// Metric metadata.
MetricMeta,

/// Metrics in the transactions namespace.
MetricsTransactions,
/// Metrics in the spans namespace.
Expand Down Expand Up @@ -168,7 +165,6 @@ impl AppFeature {
Self::ClientReports => "client_reports",
Self::CheckIns => "check_ins",
Self::Replays => "replays",
Self::MetricMeta => "metric_meta",
Self::MetricsTransactions => "metrics_transactions",
Self::MetricsSpans => "metrics_spans",
Self::MetricsProfiles => "metrics_profiles",
Expand Down
52 changes: 9 additions & 43 deletions relay-config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,17 +559,9 @@ impl Default for Metrics {
}

/// Controls processing of Sentry metrics and metric metadata.
#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Debug, Default)]
#[serde(default)]
struct SentryMetrics {
/// Code locations expiry in seconds.
///
/// Defaults to 15 days.
pub meta_locations_expiry: u64,
/// Maximum amount of code locations to store per metric.
///
/// Defaults to 5.
pub meta_locations_max: usize,
/// Whether metric stats are collected and emitted.
///
/// Metric stats are always collected and emitted when processing
Expand All @@ -583,16 +575,6 @@ struct SentryMetrics {
pub metric_stats_enabled: bool,
}

impl Default for SentryMetrics {
fn default() -> Self {
Self {
meta_locations_expiry: 15 * 24 * 60 * 60,
meta_locations_max: 5,
metric_stats_enabled: false,
}
}
}

/// Controls various limits
#[derive(Serialize, Deserialize, Debug)]
#[serde(default)]
Expand Down Expand Up @@ -633,8 +615,6 @@ struct Limits {
max_statsd_size: ByteSize,
/// The maximum payload size for metric buckets.
max_metric_buckets_size: ByteSize,
/// The maximum payload size for metric metadata.
max_metric_meta_size: ByteSize,
/// The maximum payload size for a compressed replay.
max_replay_compressed_size: ByteSize,
/// The maximum payload size for an uncompressed replay.
Expand Down Expand Up @@ -686,7 +666,6 @@ impl Default for Limits {
max_span_size: ByteSize::mebibytes(1),
max_statsd_size: ByteSize::mebibytes(1),
max_metric_buckets_size: ByteSize::mebibytes(1),
max_metric_meta_size: ByteSize::mebibytes(1),
max_replay_compressed_size: ByteSize::mebibytes(10),
max_replay_uncompressed_size: ByteSize::mebibytes(100),
max_replay_message_size: ByteSize::mebibytes(15),
Expand Down Expand Up @@ -1038,7 +1017,9 @@ struct Cache {
/// The cache timeout for project configurations in seconds.
project_expiry: u32,
/// Continue using project state this many seconds after cache expiry while a new state is
/// being fetched. This is added on top of `project_expiry` and `miss_expiry`. Default is 0.
/// being fetched. This is added on top of `project_expiry`.
///
/// Default is 2 minutes.
project_grace_period: u32,
/// The cache timeout for downstream relay info (public keys) in seconds.
relay_expiry: u32,
Expand Down Expand Up @@ -1074,17 +1055,17 @@ impl Default for Cache {
fn default() -> Self {
Cache {
project_request_full_config: false,
project_expiry: 300, // 5 minutes
project_grace_period: 0,
relay_expiry: 3600, // 1 hour
envelope_expiry: 600, // 10 minutes
project_expiry: 300, // 5 minutes
project_grace_period: 120, // 2 minutes
relay_expiry: 3600, // 1 hour
envelope_expiry: 600, // 10 minutes
envelope_buffer_size: 1000,
miss_expiry: 60, // 1 minute
batch_interval: 100, // 100ms
downstream_relays_batch_interval: 100, // 100ms
batch_size: 500,
file_interval: 10, // 10 seconds
eviction_interval: 60, // 60 seconds
eviction_interval: 15, // 15 seconds
global_config_fetch_interval: 10, // 10 seconds
}
}
Expand Down Expand Up @@ -2071,16 +2052,6 @@ impl Config {
self.values.metrics.sample_rate
}

/// Returns the maximum amount of code locations per metric.
pub fn metrics_meta_locations_max(&self) -> usize {
self.values.sentry_metrics.meta_locations_max
}

/// Returns the expiry for code locations.
pub fn metrics_meta_locations_expiry(&self) -> Duration {
Duration::from_secs(self.values.sentry_metrics.meta_locations_expiry)
}

/// Returns the interval for periodic metrics emitted from Relay.
///
/// `None` if periodic metrics are disabled.
Expand Down Expand Up @@ -2296,11 +2267,6 @@ impl Config {
self.values.limits.max_metric_buckets_size.as_bytes()
}

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

/// Whether metric stats are collected and emitted.
///
/// Metric stats are always collected and emitted when processing
Expand Down
Loading
Loading