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: feat(metrics): Add region tag #1537

Merged
merged 1 commit into from
Oct 16, 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
6 changes: 0 additions & 6 deletions crates/symbolicator-service/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ pub struct Metrics {
/// If this is set, the platform will be read from the `SYMBOLICATOR_PLATFORM`
/// environment variable.
pub platform_tag: Option<String>,
/// A tag name to report the region to, for each metric. Defaults to not sending such a tag.
///
/// If this is set, the platform will be read from the `SYMBOLICATOR_REGION` environment
/// variable.
pub region_tag: Option<String>,
/// A map containing custom tags and their values.
///
/// These tags will be appended to every metric.
Expand All @@ -118,7 +113,6 @@ impl Default for Metrics {
hostname_tag: None,
environment_tag: None,
platform_tag: None,
region_tag: None,
custom_tags: BTreeMap::new(),
}
}
Expand Down
17 changes: 0 additions & 17 deletions crates/symbolicator/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,23 +135,6 @@ pub fn execute() -> Result<()> {
}
};

if let Some(region_tag) = config.metrics.region_tag.clone() {
if tags.contains_key(&region_tag) {
tracing::warn!(
"tag {} defined both as region tag and as a custom tag",
region_tag
);
}
match std::env::var("SYMBOLICATOR_REGION") {
Ok(region) => {
tags.insert(region_tag, region.to_string());
}
Err(e) => {
tracing::error!(error = %e, "region not available");
}
}
};

if let Some(platform_tag) = config.metrics.platform_tag.clone() {
if tags.contains_key(&platform_tag) {
tracing::warn!(
Expand Down
Loading