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(metrics-extraction): Split span and transaction metric extraction #2191

Merged
merged 10 commits into from
Jun 9, 2023
6 changes: 3 additions & 3 deletions relay-server/src/actors/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ use crate::actors::project_cache::ProjectCache;
use crate::actors::upstream::{SendRequest, UpstreamRelay};
use crate::envelope::{AttachmentType, ContentType, Envelope, Item, ItemType};
use crate::extractors::RequestMeta;
use crate::metrics_extraction::performance::transactions::extract_transaction_metrics;
iker-barriocanal marked this conversation as resolved.
Show resolved Hide resolved
use crate::metrics_extraction::performance::transactions::types::ExtractMetricsError;
use crate::metrics_extraction::sessions::extract_session_metrics;
use crate::metrics_extraction::transactions::extract_transaction_metrics;
use crate::metrics_extraction::transactions::types::ExtractMetricsError;
use crate::statsd::{RelayCounters, RelayHistograms, RelayTimers};
use crate::utils::{
self, get_sampling_key, log_transaction_name_metrics, ChunkedFormDataAggregator, FormDataIter,
Expand Down Expand Up @@ -2746,7 +2746,7 @@ mod tests {

use crate::actors::test_store::TestStore;
use crate::extractors::RequestMeta;
use crate::metrics_extraction::transactions::types::{
use crate::metrics_extraction::performance::transactions::types::{
CommonTags, TransactionMeasurementTags, TransactionMetric,
};
use crate::metrics_extraction::IntoMetric;
Expand Down
2 changes: 1 addition & 1 deletion relay-server/src/metrics_extraction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use relay_common::UnixTimestamp;
use relay_metrics::Metric;

mod conditional_tagging;
pub mod performance;
pub mod sessions;
pub mod transactions;

pub trait IntoMetric {
fn into_metric(self, timestamp: UnixTimestamp) -> Metric;
Expand Down
4 changes: 4 additions & 0 deletions relay-server/src/metrics_extraction/performance/mod.rs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What the reason to create so deep module structure?
Why don't just use transactions and spans modules in the root of metrics_extractions which makes perfect sense to me, and we do not create those very long module paths.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created it to have shared functions that sessions don't need to access, but I agree it's too much complexity. Addressed in 0389e09.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mod spans;
pub mod transactions;

mod utils;
Loading