Skip to content
Merged
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
27 changes: 27 additions & 0 deletions src/sentry/search/eap/preprod_size/attributes.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Literal

from sentry.search.eap import constants
from sentry.search.eap.columns import ResolvedAttribute, datetime_processor
from sentry.search.eap.common_columns import COMMON_COLUMNS
Expand Down Expand Up @@ -56,6 +58,11 @@
internal_name="git_head_ref",
search_type="string",
),
ResolvedAttribute(
public_alias="installable",
internal_name="has_installable_file",
search_type="boolean",
),
ResolvedAttribute(
public_alias="timestamp",
internal_name="sentry.timestamp",
Expand All @@ -65,3 +72,23 @@
),
]
}

PREPROD_SIZE_INTERNAL_TO_PUBLIC_ALIAS_MAPPINGS: dict[
Literal["string", "number", "boolean"], dict[str, str]
] = {
"string": {
definition.internal_name: definition.public_alias
for definition in PREPROD_SIZE_ATTRIBUTE_DEFINITIONS.values()
if not definition.secondary_alias and definition.search_type == "string"
},
"boolean": {
definition.internal_name: definition.public_alias
for definition in PREPROD_SIZE_ATTRIBUTE_DEFINITIONS.values()
if not definition.secondary_alias and definition.search_type == "boolean"
},
"number": {
definition.internal_name: definition.public_alias
for definition in PREPROD_SIZE_ATTRIBUTE_DEFINITIONS.values()
if not definition.secondary_alias and definition.search_type != "string"
},
}
4 changes: 4 additions & 0 deletions src/sentry/search/eap/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
OURLOG_ATTRIBUTE_DEFINITIONS,
)
from sentry.search.eap.ourlogs.definitions import OURLOG_DEFINITIONS
from sentry.search.eap.preprod_size.attributes import (
PREPROD_SIZE_INTERNAL_TO_PUBLIC_ALIAS_MAPPINGS,
)
from sentry.search.eap.profile_functions.attributes import (
PROFILE_FUNCTIONS_ATTRIBUTE_DEFINITIONS,
PROFILE_FUNCTIONS_INTERNAL_TO_PUBLIC_ALIAS_MAPPINGS,
Expand Down Expand Up @@ -69,6 +72,7 @@ def add_start_end_conditions(
SupportedTraceItemType.LOGS: LOGS_INTERNAL_TO_PUBLIC_ALIAS_MAPPINGS,
SupportedTraceItemType.TRACEMETRICS: TRACE_METRICS_INTERNAL_TO_PUBLIC_ALIAS_MAPPINGS,
SupportedTraceItemType.PROFILE_FUNCTIONS: PROFILE_FUNCTIONS_INTERNAL_TO_PUBLIC_ALIAS_MAPPINGS,
SupportedTraceItemType.PREPROD: PREPROD_SIZE_INTERNAL_TO_PUBLIC_ALIAS_MAPPINGS,
}

PUBLIC_ALIAS_TO_INTERNAL_MAPPING: dict[SupportedTraceItemType, dict[str, ResolvedAttribute]] = {
Expand Down
Loading