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
FIx
  • Loading branch information
iambriccardo committed May 8, 2024
commit 0d1824542d1fefdb91b8e27c02b439e00c16d8ba
6 changes: 4 additions & 2 deletions tests/integration/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1579,6 +1579,8 @@ def test_span_metrics_secondary_aggregator(
processing.send_transaction(project_id, transaction)

metrics = metrics_consumer.get_metrics()
for metric in metrics:
del metric["received_at"]

# Transaction metrics are still aggregated:
assert all([m[0]["name"].startswith("spans", 2) for m in metrics])
Expand All @@ -1605,7 +1607,7 @@ def test_span_metrics_secondary_aggregator(
},
"timestamp": int(timestamp.timestamp()),
"type": "d",
"value": [123],
"value": [123.0],
},
[("namespace", b"spans")],
),
Expand All @@ -1618,7 +1620,7 @@ def test_span_metrics_secondary_aggregator(
"tags": {"span.op": "default"},
"timestamp": int(timestamp.timestamp()),
"type": "d",
"value": [3],
"value": [3.0],
},
[("namespace", b"spans")],
),
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_spans.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ def test_span_ingestion(
metrics.sort(key=lambda m: (m["name"], sorted(m["tags"].items()), m["timestamp"]))
for metric in metrics:
try:
del metric["received_at"]
metric["value"].sort()
except AttributeError:
pass
Expand Down
Loading