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

fix(metrics): Restore allowlist in metrics config [INGEST-1502] #1502

Merged
merged 2 commits into from
Sep 27, 2022
Merged
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
14 changes: 13 additions & 1 deletion relay-server/src/metrics_extraction/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ struct SatisfactionConfig {
transaction_thresholds: BTreeMap<String, SatisfactionThreshold>,
}

/// Configuration for extracting custom measurements from transaction payloads.
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct CustomMeasurementConfig {
/// The maximum number of custom measurements to extract. Defaults to zero.
limit: usize,
}

/// Maximum supported version of metrics extraction from transactions.
///
/// The version is an integer scalar, incremented by one on each new version.
Expand Down Expand Up @@ -71,8 +79,10 @@ impl Default for AcceptTransactionNames {
pub struct TransactionMetricsConfig {
/// The required version to extract transaction metrics.
version: u16,
extract_metrics: BTreeSet<String>,
extract_custom_tags: BTreeSet<String>,
satisfaction_thresholds: Option<SatisfactionConfig>,
custom_measurements: CustomMeasurementConfig,
accept_transaction_names: AcceptTransactionNames,
}

Expand Down Expand Up @@ -560,7 +570,9 @@ mod tests {
use super::*;

use relay_general::protocol::User;
use relay_general::store::{BreakdownsConfig, LightNormalizationConfig, MeasurementsConfig};
use relay_general::store::BreakdownsConfig;
use relay_general::store::LightNormalizationConfig;
use relay_general::store::MeasurementsConfig;
use relay_general::types::Annotated;
use relay_metrics::DurationUnit;

Expand Down