From 054be2d73eb65a7b5f443d0572afc261c1df8f5d Mon Sep 17 00:00:00 2001 From: Katie Byers Date: Fri, 2 Aug 2024 17:13:10 -0700 Subject: [PATCH] similar issues embeddings --- .../api/endpoints/test_group_similar_issues_embeddings.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/sentry/api/endpoints/test_group_similar_issues_embeddings.py b/tests/sentry/api/endpoints/test_group_similar_issues_embeddings.py index 3ab1ba677746cf..b133a69ccdae47 100644 --- a/tests/sentry/api/endpoints/test_group_similar_issues_embeddings.py +++ b/tests/sentry/api/endpoints/test_group_similar_issues_embeddings.py @@ -5,13 +5,13 @@ import orjson from urllib3.response import HTTPResponse +from sentry import options from sentry.api.endpoints.group_similar_issues_embeddings import ( GroupSimilarIssuesEmbeddingsEndpoint, ) from sentry.api.serializers.base import serialize from sentry.conf.server import SEER_SIMILAR_ISSUES_URL from sentry.models.group import Group -from sentry.seer.similarity.similar_issues import SIMILARITY_REQUEST_METRIC_SAMPLE_RATE from sentry.seer.similarity.types import SeerSimilarIssueData, SimilarIssuesEmbeddingsResponse from sentry.testutils.cases import APITestCase from sentry.testutils.helpers.eventprocessing import save_new_event @@ -244,7 +244,7 @@ def test_simple(self, mock_logger, mock_seer_request, mock_metrics_incr): ) mock_metrics_incr.assert_any_call( "seer.similar_issues_request", - sample_rate=SIMILARITY_REQUEST_METRIC_SAMPLE_RATE, + sample_rate=options.get("seer.similarity.metrics_sample_rate"), tags={ "response_status": 200, "outcome": "matching_group_found", @@ -356,7 +356,7 @@ def test_incomplete_return_data(self, mock_seer_request, mock_logger, mock_metri ) mock_metrics_incr.assert_any_call( "seer.similar_issues_request", - sample_rate=SIMILARITY_REQUEST_METRIC_SAMPLE_RATE, + sample_rate=options.get("seer.similarity.metrics_sample_rate"), tags={ "response_status": 200, "outcome": "error", @@ -409,7 +409,7 @@ def test_nonexistent_group( mock_metrics_incr.assert_any_call( "seer.similar_issues_request", - sample_rate=SIMILARITY_REQUEST_METRIC_SAMPLE_RATE, + sample_rate=options.get("seer.similarity.metrics_sample_rate"), tags={ "response_status": 200, "outcome": "error",