Skip to content

Commit e4cf392

Browse files
committed
Merge branch 'master' into ref/startup
* master: build: Upgrade sentry SDK to 0.30.0 (#1883) chore(metrics): Remove satisfaction thresholds (#1881) feat(profiling): Add javascript platform (#1876) fix(replays): Enforce rate limits (#1877)
2 parents 6de0aca + 2f84e4f commit e4cf392

File tree

10 files changed

+76
-393
lines changed

10 files changed

+76
-393
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
- Protocol validation for source map image type. ([#1869](https://github.com/getsentry/relay/pull/1869))
88
- Strip quotes from client hint values. ([#1874](https://github.com/getsentry/relay/pull/1874))
99
- Add PHP support for profiling. ([#1871](https://github.com/getsentry/relay/pull/1871))
10+
- Add Javascript support for profiling. ([#1876](https://github.com/getsentry/relay/pull/1876))
11+
12+
**Bug Fixes**:
13+
14+
- Enforce rate limits for session replays. ([#1877](https://github.com/getsentry/relay/pull/1877))
1015

1116
**Internal**:
1217

Cargo.lock

+23-52
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

relay-common/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ once_cell = "1.13.1"
1717
parking_lot = "0.12.1"
1818
regex = "1.5.5"
1919
schemars = { version = "0.8.1", features = ["uuid1", "chrono"], optional = true }
20-
sentry-types = "0.20.0"
20+
sentry-types = "0.30.0"
2121
serde = { version = "1.0.114", features = ["derive"] }
2222
thiserror = "1.0.38"
2323
uuid = { version = "1.3.0", features = ["serde", "v4", "v5"] }

relay-dynamic-config/src/metrics.rs

+1-36
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Dynamic configuration for metrics extraction from sessions and transactions.
22
3-
use std::collections::{BTreeMap, BTreeSet};
3+
use std::collections::BTreeSet;
44

55
use relay_sampling::RuleCondition;
66
use serde::{Deserialize, Serialize};
@@ -64,39 +64,6 @@ impl SessionMetricsConfig {
6464
}
6565
}
6666

67-
/// The metric to which the user satisfaction threshold is applied.
68-
#[derive(Debug, Clone, Serialize, Deserialize)]
69-
#[serde(rename_all = "lowercase")]
70-
pub enum SatisfactionMetric {
71-
/// Apply to transaction duration.
72-
Duration,
73-
/// Apply to LCP.
74-
Lcp,
75-
/// Catch-all variant for forward compatibility.
76-
#[serde(other)]
77-
Unknown,
78-
}
79-
80-
/// Configuration for a single threshold.
81-
#[derive(Debug, Clone, Serialize, Deserialize)]
82-
pub struct SatisfactionThreshold {
83-
/// What metric to apply the threshold to.
84-
pub metric: SatisfactionMetric,
85-
/// Value of the threshold.
86-
pub threshold: f64,
87-
}
88-
89-
/// Configuration for applying the user satisfaction threshold.
90-
#[derive(Debug, Clone, Serialize, Deserialize)]
91-
#[serde(rename_all = "camelCase")]
92-
pub struct SatisfactionConfig {
93-
/// The project-wide threshold to apply.
94-
pub project_threshold: SatisfactionThreshold,
95-
/// Transaction-specific overrides of the project-wide threshold.
96-
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
97-
pub transaction_thresholds: BTreeMap<String, SatisfactionThreshold>,
98-
}
99-
10067
/// Configuration for extracting custom measurements from transaction payloads.
10168
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
10269
#[serde(default, rename_all = "camelCase")]
@@ -139,8 +106,6 @@ pub struct TransactionMetricsConfig {
139106
pub extract_metrics: BTreeSet<String>,
140107
/// Custom event tags that are transferred from the transaction to metrics.
141108
pub extract_custom_tags: BTreeSet<String>,
142-
/// Config for determining user satisfaction (satisfied / tolerated / frustrated)
143-
pub satisfaction_thresholds: Option<SatisfactionConfig>,
144109
/// Deprecated in favor of top-level config field. Still here to be forwarded to external relays.
145110
pub custom_measurements: CustomMeasurementConfig,
146111
/// Defines whether URL transactions should be considered low cardinality.

relay-log/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ console = { version = "0.15.5", optional = true }
1616
env_logger = { version = "0.10.0", optional = true }
1717
log = { version = "0.4.11", features = ["serde"] }
1818
relay-crash = { path = "../relay-crash", optional = true }
19-
sentry = { version = "0.29.3", features = ["debug-images", "log"], optional = true }
20-
sentry-core = { version = "0.29.3" }
19+
sentry = { version = "0.30.0", features = ["debug-images", "log"], optional = true }
20+
sentry-core = { version = "0.30.0" }
2121
serde = { version = "1.0.114", features = ["derive"], optional = true }
2222
serde_json = { version = "1.0.55", optional = true }
2323

relay-profiling/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ pub use crate::outcomes::discard_reason;
119119
enum Platform {
120120
Android,
121121
Cocoa,
122+
Javascript,
122123
Node,
123124
Php,
124125
Python,

relay-profiling/src/sample.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ impl SampleProfile {
175175
&& self.device.manufacturer.is_some()
176176
&& self.device.model.is_some()
177177
}
178-
Platform::Python | Platform::Node | Platform::Php => self.runtime.is_some(),
178+
Platform::Python | Platform::Javascript | Platform::Node | Platform::Php => {
179+
self.runtime.is_some()
180+
}
179181
_ => true,
180182
}
181183
}

relay-server/src/extractors/request_meta.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ pub struct PartialDsn {
8585
impl PartialDsn {
8686
/// Ensures a valid public key and project ID in the DSN.
8787
fn from_dsn(dsn: Dsn) -> Result<Self, ParseDsnError> {
88-
let project_id = dsn.project_id().value();
88+
let project_id = dsn
89+
.project_id()
90+
.value()
91+
.parse()
92+
.map_err(|_| ParseDsnError::NoProjectId)?;
8993

9094
let public_key = dsn
9195
.public_key()
@@ -98,7 +102,7 @@ impl PartialDsn {
98102
host: dsn.host().to_owned(),
99103
port: dsn.port(),
100104
path: dsn.path().to_owned(),
101-
project_id: Some(ProjectId::new(project_id)),
105+
project_id: Some(project_id),
102106
})
103107
}
104108

0 commit comments

Comments
 (0)