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

feat(metrics): Forward received_at field to Kafka #3561

Merged
merged 24 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Improve
  • Loading branch information
iambriccardo committed May 8, 2024
commit d5b88d842c9dc6be458a4b5f8144a03d6418c843
6 changes: 1 addition & 5 deletions tests/integration/asserts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
from .time import time_after, time_within, time_within_delta

__all__ = [
"time_after",
"time_within",
"time_within_delta"
]
__all__ = ["time_after", "time_within", "time_within_delta"]
18 changes: 9 additions & 9 deletions tests/integration/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def test_metrics_with_processing(mini_sentry, relay_with_processing, metrics_con
"value": 42.0,
"type": "c",
"timestamp": time_after(timestamp),
"received_at": time_after(timestamp)
"received_at": time_after(timestamp),
}

assert metrics["headers"]["c:custom/bar@second"] == [("namespace", b"custom")]
Expand All @@ -524,7 +524,7 @@ def test_metrics_with_processing(mini_sentry, relay_with_processing, metrics_con
"value": 17.0,
"type": "c",
"timestamp": time_after(timestamp),
"received_at": time_after(timestamp)
"received_at": time_after(timestamp),
}


Expand Down Expand Up @@ -564,7 +564,7 @@ def test_global_metrics_with_processing(
"value": 42.0,
"type": "c",
"timestamp": time_after(timestamp),
"received_at": time_after(timestamp)
"received_at": time_after(timestamp),
}

assert metrics["headers"]["c:custom/bar@second"] == [("namespace", b"custom")]
Expand All @@ -577,7 +577,7 @@ def test_global_metrics_with_processing(
"value": 17.0,
"type": "c",
"timestamp": time_after(timestamp),
"received_at": time_after(timestamp)
"received_at": time_after(timestamp),
}


Expand Down Expand Up @@ -617,7 +617,7 @@ def test_metrics_full(mini_sentry, relay, relay_with_processing, metrics_consume
"value": 15.0,
"type": "c",
"timestamp": time_after(timestamp),
"received_at": time_after(timestamp)
"received_at": time_after(timestamp),
}

metrics_consumer.assert_empty()
Expand Down Expand Up @@ -726,7 +726,7 @@ def test_session_metrics_processing(
"environment": "production",
"release": "sentry-test@1.0.0",
},
"received_at": time_after(now_timestamp)
"received_at": time_after(now_timestamp),
}


Expand Down Expand Up @@ -862,7 +862,7 @@ def test_transaction_metrics(
"platform": "other",
"transaction.status": "unknown",
},
"received_at": time_after(timestamp)
"received_at": time_after(timestamp),
}

assert metrics["c:spans/usage@none"]["value"] == 2
Expand Down Expand Up @@ -910,7 +910,7 @@ def test_transaction_metrics(
"name": "c:transactions/count_per_root_project@none",
"type": "c",
"value": 2.0,
"received_at": time_after(timestamp)
"received_at": time_after(timestamp),
}


Expand Down Expand Up @@ -977,7 +977,7 @@ def test_transaction_metrics_count_per_root_project(
"name": "c:transactions/count_per_root_project@none",
"type": "c",
"value": 1.0,
"received_at": time_after(timestamp)
"received_at": time_after(timestamp),
}
assert metrics_by_project[42]["c:transactions/count_per_root_project@none"] == {
"timestamp": time_after(timestamp),
Expand Down
Loading