Skip to content

Commit

Permalink
Exclude AM3 org, also include segment span in the count
Browse files Browse the repository at this point in the history
  • Loading branch information
k-fish committed Aug 1, 2024
1 parent b39b07f commit 503314b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/sentry/ingest/consumer/processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,12 @@ def collect_span_metrics(
project: Project,
data: MutableMapping[str, Any],
):
if not features.has("organizations:dynamic-sampling", project.organization):
amount = len(data.get("spans", []))
if not features.has(
"organizations:dynamic-sampling", project.organization
) and not features.has("organizations:am3_tier", project.organization):
amount = (
len(data.get("spans", [])) + 1
) # Segment spans also get added to the total span count.
metrics.incr(
"event.save_event.unsampled.spans.count",
amount=amount,
Expand Down

0 comments on commit 503314b

Please sign in to comment.