Skip to content

Commit

Permalink
chore(seer grouping): Change extra data sent with old excess frames b…
Browse files Browse the repository at this point in the history
…ehavior log (#83150)

This is a follow-up to #83082, which added a temporary log to help debug how we're still landing in the old excess-frame-check logic. Some logs have come through and a) the stacktrace is what you'd expect, so we can stop sending it, and b) the new check is giving a false negative, so now we need to see the data on which it's basing its decision (the frame counts). 

Interestingly, so far all of the events in question come from the same project. I spot-checked one event and it looked normal... We'll see what this new log data turns up.
  • Loading branch information
lobsterkatie authored and andrewshie-sentry committed Jan 22, 2025
1 parent 1836333 commit d9be513
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/sentry/grouping/ingest/seer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from sentry import ratelimits as ratelimiter
from sentry.conf.server import SEER_SIMILARITY_MODEL_VERSION
from sentry.eventstore.models import Event
from sentry.grouping.api import get_contributing_variant_and_component
from sentry.grouping.grouping_info import get_grouping_info_from_variants
from sentry.grouping.variants import BaseVariant
from sentry.models.grouphash import GroupHash
Expand Down Expand Up @@ -210,6 +211,10 @@ def _has_empty_stacktrace_string(event: Event, variants: dict[str, BaseVariant])
event, variants, ReferrerOptions.INGEST, record_metrics=False
),
}
_, contributing_component = get_contributing_variant_and_component(variants)
if contributing_component is not None and hasattr(contributing_component, "frame_counts"):
logger_extra["frame_counts"] = contributing_component.frame_counts

stacktrace_string = get_stacktrace_string_with_metrics(
get_grouping_info_from_variants(variants),
event.platform,
Expand Down
3 changes: 0 additions & 3 deletions src/sentry/seer/similarity/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
import traceback
from collections.abc import Mapping, Sequence
from enum import StrEnum
from typing import Any, TypedDict, TypeVar
Expand Down Expand Up @@ -288,8 +287,6 @@ def get_stacktrace_string_with_metrics(
)
if referrer == ReferrerOptions.INGEST:
# Temporary log to debug how we're still landing here, which we shouldn't be anymore
logger_extra = logger_extra or {}
logger_extra.update({"current_stacktrace": "".join(traceback.format_stack())})
logger.info(
"record_did_call_seer_metric.over-threshold-frames",
extra=logger_extra,
Expand Down

0 comments on commit d9be513

Please sign in to comment.