Skip to content

Commit

Permalink
test(metrics): Fix transaction tag in extraction test (#44289)
Browse files Browse the repository at this point in the history
Production sentry makes relay accept transaction names with missing
`source`. Make sure the test still works with this behavior.
  • Loading branch information
jjbayer authored and wmak committed Feb 16, 2023
1 parent b26632e commit 7fadde6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/relay_integration/test_metrics_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
from sentry.testutils import RelayStoreHelper, TransactionTestCase
from sentry.testutils.helpers.datetime import before_now, iso_format
from sentry.testutils.helpers.features import Feature
from sentry.testutils.helpers.options import override_options
from sentry.utils import json


class MetricsExtractionTest(RelayStoreHelper, TransactionTestCase):
@override_options({"relay.transaction-names-client-based": 1.0})
def test_all_transaction_metrics_emitted(self):
with Feature(
{
Expand All @@ -19,6 +21,7 @@ def test_all_transaction_metrics_emitted(self):
event_data = {
"type": "transaction",
"transaction": "foo",
"transaction_info": {"source": "url"}, # 'transaction' tag not extracted
"timestamp": iso_format(before_now(seconds=1)),
"start_timestamp": iso_format(before_now(seconds=2)),
"contexts": {
Expand Down

0 comments on commit 7fadde6

Please sign in to comment.