Skip to content

Commit

Permalink
remove item header
Browse files Browse the repository at this point in the history
  • Loading branch information
jjbayer committed Jul 9, 2024
1 parent d921041 commit f4327e1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 33 deletions.
15 changes: 0 additions & 15 deletions relay-server/src/envelope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,6 @@ pub struct ItemHeaders {
#[serde(default, skip_serializing_if = "is_false")]
metrics_extracted: bool,

/// Whether or not a transaction has been extracted from a segment span.
#[serde(default, skip_serializing_if = "is_false")]
transaction_extracted: bool,

/// Whether or not spans and span metrics have been extracted from a transaction.
///
/// This header is set to `true` after both span extraction and span metrics extraction,
Expand Down Expand Up @@ -651,7 +647,6 @@ impl Item {
sample_rates: None,
other: BTreeMap::new(),
metrics_extracted: false,
transaction_extracted: false,
spans_extracted: false,
sampled: true,
fully_normalized: false,
Expand Down Expand Up @@ -847,16 +842,6 @@ impl Item {
self.headers.metrics_extracted = metrics_extracted;
}

/// Returns the transaction extracted flag.
pub fn transaction_extracted(&self) -> bool {
self.headers.transaction_extracted
}

/// Sets the transaction extracted flag.
pub fn set_transaction_extracted(&mut self, transaction_extracted: bool) {
self.headers.transaction_extracted = transaction_extracted;
}

/// Returns the spans extracted flag.
pub fn spans_extracted(&self) -> bool {
self.headers.spans_extracted
Expand Down
18 changes: 0 additions & 18 deletions tests/integration/test_spans.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,24 +868,6 @@ def test_span_ingestion(
]
assert [m for m in metrics if ":spans/" in m["name"]] == expected_span_metrics

transaction_duration_metrics = [
m for m in metrics if m["name"] == "d:transactions/duration@millisecond"
]

if extract_transaction:
assert {
(m["name"], m["tags"]["transaction"]) for m in transaction_duration_metrics
} == {
("d:transactions/duration@millisecond", "https://example.com/p/blah.js"),
("d:transactions/duration@millisecond", "my 1st OTel span"),
("d:transactions/duration@millisecond", "my 2nd OTel span"),
}
# Make sure we're not double-reporting:
for m in transaction_duration_metrics:
assert len(m["value"]) == 1
else:
assert len(transaction_duration_metrics) == 0

# Regardless of whether transactions are extracted, score.total is only converted to a transaction metric once:
score_total_metrics = [
m
Expand Down

0 comments on commit f4327e1

Please sign in to comment.