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

ref(project-cache): Split project cache into shared and private parts #4147

Merged
merged 16 commits into from
Oct 30, 2024
Merged
Changes from 1 commit
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
Next Next commit
ref(metric-meta): Removes all metric meta code from Relay
Dav1dde committed Oct 21, 2024
commit d5012d989d01a017fd5983c5d4da5fc92f5f72a1
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Changelog

## Unreleased

**Breaking Changes**:

- Removes support for metric meta envelope items. ([#4152](https://github.com/getsentry/relay/pull/4152))

## 24.10.0

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

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

@@ -12,7 +18,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))
@@ -23,7 +29,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))
4 changes: 0 additions & 4 deletions relay-cogs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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.
@@ -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",
38 changes: 1 addition & 37 deletions relay-config/src/config.rs
Original file line number Diff line number Diff line change
@@ -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
@@ -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)]
@@ -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.
@@ -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),
@@ -2071,16 +2050,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.
@@ -2296,11 +2265,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
63 changes: 0 additions & 63 deletions relay-config/src/redis.rs
Original file line number Diff line number Diff line change
@@ -178,8 +178,6 @@ pub enum RedisConfigs {
cardinality: Box<RedisConfig>,
/// Configuration for the `quotas` pool.
quotas: Box<RedisConfig>,
/// Configuration for the `misc` pool.
misc: Box<RedisConfig>,
},
}

@@ -221,8 +219,6 @@ pub enum RedisPoolConfigs<'a> {
cardinality: RedisConfigRef<'a>,
/// Configuration for the `quotas` pool.
quotas: RedisConfigRef<'a>,
/// Configuration for the `misc` pool.
misc: RedisConfigRef<'a>,
},
}

@@ -292,18 +288,15 @@ pub(super) fn create_redis_pools(configs: &RedisConfigs, cpu_concurrency: u32) -
project_configs,
cardinality,
quotas,
misc,
} => {
let project_configs =
create_redis_pool(project_configs, project_configs_default_connections);
let cardinality = create_redis_pool(cardinality, cpu_concurrency);
let quotas = create_redis_pool(quotas, cpu_concurrency);
let misc = create_redis_pool(misc, cpu_concurrency);
RedisPoolConfigs::Individual {
project_configs,
cardinality,
quotas,
misc,
}
}
}
@@ -378,16 +371,6 @@ quotas:
- "redis://127.0.0.2:6379"
max_connections: 17
connection_timeout: 5
misc:
configs:
- cluster_nodes:
- "redis://127.0.0.1:6379"
- "redis://127.0.0.2:6379"
max_connections: 42
connection_timeout: 5
- server: "redis://127.0.0.1:6379"
max_connections: 84
connection_timeout: 10
"#;

let configs: RedisConfigs = serde_yaml::from_str(yaml)
@@ -417,29 +400,6 @@ misc:
..Default::default()
},
}),
misc: Box::new(RedisConfig::MultiWrite {
configs: vec![
RedisConfig::Cluster {
cluster_nodes: vec![
"redis://127.0.0.1:6379".to_owned(),
"redis://127.0.0.2:6379".to_owned(),
],
options: PartialRedisConfigOptions {
max_connections: Some(42),
connection_timeout: 5,
..Default::default()
},
},
RedisConfig::Single(SingleRedisConfig::Detailed {
server: "redis://127.0.0.1:6379".to_owned(),
options: PartialRedisConfigOptions {
max_connections: Some(84),
connection_timeout: 10,
..Default::default()
},
}),
],
}),
};

assert_eq!(configs, expected);
@@ -733,17 +693,6 @@ read_timeout: 10
}),
],
}),
misc: Box::new(RedisConfig::Cluster {
cluster_nodes: vec![
"redis://127.0.0.1:6379".to_owned(),
"redis://127.0.0.2:6379".to_owned(),
],
options: PartialRedisConfigOptions {
max_connections: Some(84),
connection_timeout: 10,
..Default::default()
},
}),
};

assert_json_snapshot!(configs, @r###"
@@ -789,18 +738,6 @@ read_timeout: 10
"write_timeout": 3
}
]
},
"misc": {
"cluster_nodes": [
"redis://127.0.0.1:6379",
"redis://127.0.0.2:6379"
],
"max_connections": 84,
"connection_timeout": 10,
"max_lifetime": 300,
"idle_timeout": 60,
"read_timeout": 3,
"write_timeout": 3
}
}
"###);
4 changes: 0 additions & 4 deletions relay-metrics/src/lib.rs
Original file line number Diff line number Diff line change
@@ -70,7 +70,6 @@

pub mod aggregator;
pub mod cogs;
pub mod meta;

mod bucket;
mod finite;
@@ -80,8 +79,5 @@ mod view;

pub use bucket::*;
pub use finite::*;
#[cfg(feature = "redis")]
pub use meta::RedisMetricMetaStore;
pub use meta::{MetaAggregator, MetricMeta};
pub use protocol::*;
pub use view::*;
Loading