Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 0 additions & 10 deletions src/sentry/analytics/events/agent_monitoring_events.py

This file was deleted.

18 changes: 1 addition & 17 deletions src/sentry/api/endpoints/organization_events_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
from rest_framework.response import Response
from sentry_sdk import traces

from sentry import analytics, features, quotas
from sentry.analytics.events.agent_monitoring_events import AgentMonitoringQuery
from sentry import features, quotas
from sentry.api.api_publish_status import ApiPublishStatus
from sentry.api.base import cell_silo_endpoint
from sentry.api.bases import NoProjects, OrganizationEventsEndpointBase
Expand Down Expand Up @@ -563,8 +562,6 @@ def get_event_stats(
else:
span.set_attribute("query.invalid_cache_reason", "non_candidate")

self._emit_analytics_event(organization, referrer)

if top_events > 0:
raw_groupby = self.get_field_list(organization, request, param_name="groupBy")
raw_orderby = self.get_orderby(request)
Expand Down Expand Up @@ -796,16 +793,3 @@ def serialize_timeseries(
timeseries["values"] = timeseries_values

return timeseries

def _emit_analytics_event(self, organization: Organization, referrer: str) -> None:
if "agent-monitoring" not in referrer:
return
try:
analytics.record(
AgentMonitoringQuery(
organization_id=organization.id,
referrer=referrer,
)
)
except Exception as e:
sentry_sdk.capture_exception(e)
12 changes: 0 additions & 12 deletions src/sentry/snuba/referrer.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,23 +400,11 @@ class Referrer(StrEnum):
API_INSIGHTS_BROWSER_RESOURCES_PAGE_SELECTOR = "api.insights.browser.resources.page-selector"

# AI Agents
API_INSIGHTS_AGENTS_MODELS_TABLE = "api.insights.agent-monitoring.models-table"
API_INSIGHTS_AGENTS_TOOLS_TABLE = "api.insights.agent-monitoring.tools-table"
API_INSIGHTS_AGENTS_TRACE_DRAWER = "api.insights.agent-monitoring.trace-drawer"
API_INSIGHTS_AGENTS_TRACE_DRAWER_TOOL_USAGE = (
"api.insights.agent-monitoring.trace-drawer-tool-usage"
)
API_INSIGHTS_AGENTS_TRACES_TABLE = "api.insights.agent-monitoring.traces-table"
API_INSIGHTS_AGENTS_TOKEN_USAGE_WIDGET = "api.insights.agent-monitoring.token-usage-widget"
API_INSIGHTS_AGENTS_TOKEN_COST_WIDGET = "api.insights.agent-monitoring.token-cost-widget"
API_INSIGHTS_AGENTS_TOKEN_TYPES_WIDGET = "api.insights.agent-monitoring.token-types-widget"
API_INSIGHTS_AGENTS_TOOL_CALLS_WIDGET = "api.insights.agent-monitoring.tool-calls-widget"
API_INSIGHTS_AGENTS_TOOL_ERRORS_WIDGET = "api.insights.agent-monitoring.tool-errors-widget"
API_INSIGHTS_AGENTS_LLM_CALLS_WIDGET = "api.insights.agent-monitoring.llm-calls-widget"
API_INSIGHTS_AGENTS_AGENT_RUNS_WIDGET = "api.insights.agent-monitoring.agent-runs-widget"
API_INSIGHTS_AGENTS_AGENT_DURATION_WIDGET = (
"api.insights.agent-monitoring.agent-duration-widget"
)
API_INSIGHTS_AGENTS_ONBOARDING = "api.insights.agent-monitoring.onboarding"

# MCP (Model Context Protocol)
Expand Down
Loading