Skip to content

Commit

Permalink
ref(ddm): Rename the files for metrics metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
iambriccardo committed Jan 26, 2024
1 parent cbb5661 commit 8730520
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/sentry/api/endpoints/organization_ddm.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
from sentry.api.base import region_silo_endpoint
from sentry.api.bases.organization import OrganizationEndpoint
from sentry.api.serializers import serialize
from sentry.api.serializers.models.code_locations import CodeLocationsSerializer
from sentry.api.serializers.models.correlations import CorrelationsSerializer
from sentry.api.serializers.models.metrics_code_locations import MetricCodeLocationsSerializer
from sentry.api.serializers.models.metrics_correlations import MetricCorrelationsSerializer
from sentry.api.utils import get_date_range_from_params
from sentry.exceptions import InvalidParams
from sentry.models.organization import Organization
from sentry.models.project import Project
from sentry.sentry_metrics.querying.errors import LatestReleaseNotFoundError
from sentry.sentry_metrics.querying.metadata.code_locations import (
from sentry.sentry_metrics.querying.metadata.metrics_code_locations import (
MetricCodeLocations,
get_metric_code_locations,
)
from sentry.sentry_metrics.querying.metadata.correlations import (
from sentry.sentry_metrics.querying.metadata.metrics_correlations import (
MetricCorrelations,
get_metric_correlations,
)
Expand All @@ -34,8 +34,8 @@ class MetricMetaType(Enum):


METRIC_META_TYPE_SERIALIZER = {
MetricMetaType.CODE_LOCATIONS.value: CodeLocationsSerializer(),
MetricMetaType.CORRELATIONS.value: CorrelationsSerializer(),
MetricMetaType.CODE_LOCATIONS.value: MetricCodeLocationsSerializer(),
MetricMetaType.CORRELATIONS.value: MetricCorrelationsSerializer(),
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from sentry.api.serializers import Serializer


class CodeLocationsSerializer(Serializer):
class MetricCodeLocationsSerializer(Serializer):
def __init__(self, *args, **kwargs):
Serializer.__init__(self, *args, **kwargs)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from sentry.api.serializers import Serializer


class CorrelationsSerializer(Serializer):
class MetricCorrelationsSerializer(Serializer):
def __init__(self, *args, **kwargs):
Serializer.__init__(self, *args, **kwargs)

Expand Down
4 changes: 3 additions & 1 deletion tests/sentry/api/endpoints/test_organization_ddm_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

from sentry.models.organization import Organization
from sentry.models.project import Project
from sentry.sentry_metrics.querying.metadata.code_locations import get_cache_key_for_code_location
from sentry.sentry_metrics.querying.metadata.metrics_code_locations import (
get_cache_key_for_code_location,
)
from sentry.sentry_metrics.querying.utils import get_redis_client_for_metrics_meta
from sentry.snuba.metrics import TransactionMRI
from sentry.testutils.cases import APITestCase, BaseSpansTestCase
Expand Down

0 comments on commit 8730520

Please sign in to comment.