Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikB2014 committed Dec 12, 2024
1 parent 5f0f474 commit d942833
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {renderHeadCell} from 'sentry/views/insights/common/components/tableCells
import {QueryParameterNames} from 'sentry/views/insights/common/views/queryParameters';
import {DataTitles} from 'sentry/views/insights/common/views/spans/types';
import {DomainCell} from 'sentry/views/insights/http/components/tables/domainCell';
import {HTTP_MODULE_URL_FIELD} from 'sentry/views/insights/http/views/httpLandingPage';
import {ModuleName, type SpanMetricsResponse} from 'sentry/views/insights/types';

type Row = Pick<
Expand All @@ -37,7 +38,7 @@ type Row = Pick<

type Column = GridColumnHeader<
| 'span.domain'
| 'url'
| 'span.description'
| 'project'
| 'spm()'
| 'http_response_rate(3)'
Expand Down Expand Up @@ -85,7 +86,7 @@ export function DomainsTable({response, showRoutes, sort}: Props) {
...(showRoutes

Check failure on line 86 in static/app/views/insights/http/components/tables/domainsTable.tsx

View workflow job for this annotation

GitHub Actions / self-hosted

Type '{ key: string; name: string; width: number; }' is not assignable to type 'Column'.
? [
{
key: 'url',
key: HTTP_MODULE_URL_FIELD,
name: t('URL'),
width: COL_WIDTH_UNDEFINED,
},
Expand Down Expand Up @@ -199,12 +200,12 @@ function renderBodyCell(
);
}

if (column.key === 'url') {
if (column.key === HTTP_MODULE_URL_FIELD) {
return (
<DomainCell
projectId={row['project.id']?.toString()}
domain={row['span.domain']}
url={row.url}
url={row[HTTP_MODULE_URL_FIELD]}
/>
);
}
Expand Down
11 changes: 7 additions & 4 deletions static/app/views/insights/http/views/httpDomainSummaryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ import {
MODULE_DOC_LINK,
NULL_DOMAIN_DESCRIPTION,
} from 'sentry/views/insights/http/settings';
import {USE_EAP_HTTP_MODULE} from 'sentry/views/insights/http/views/httpLandingPage';
import {
HTTP_MODULE_URL_FIELD,
USE_EAP_HTTP_MODULE,
} from 'sentry/views/insights/http/views/httpLandingPage';
import {BackendHeader} from 'sentry/views/insights/pages/backend/backendPageHeader';
import {BACKEND_LANDING_SUB_PATH} from 'sentry/views/insights/pages/backend/settings';
import {FrontendHeader} from 'sentry/views/insights/pages/frontend/frontendPageHeader';
Expand Down Expand Up @@ -94,7 +97,7 @@ export function HTTPDomainSummaryPage() {
const filters: SpanMetricsQueryFilters = {
...BASE_FILTERS,
...(url
? {url}
? {[HTTP_MODULE_URL_FIELD]: url}
: {'span.domain': domain === '' ? EMPTY_OPTION_VALUE : escapeFilterValue(domain)}),
...(subregions.length > 0
? {
Expand Down Expand Up @@ -216,7 +219,7 @@ export function HTTPDomainSummaryPage() {
headerTitle: (
<Fragment>
{project && <ProjectAvatar project={project} size={36} />}
{domain || NULL_DOMAIN_DESCRIPTION}
{domain || url || NULL_DOMAIN_DESCRIPTION}
<DomainStatusLink domain={domain} />
</Fragment>
),
Expand All @@ -237,7 +240,7 @@ export function HTTPDomainSummaryPage() {
<ModuleBodyUpsellHook moduleName={ModuleName.HTTP}>
<Layout.Body>
<Layout.Main fullWidth>
{domain === '' && (
{domain === '' && !url && (
<Alert type="info">
{tct(
'"Unknown Domain" entries can be caused by instrumentation errors. Please refer to our [link] for more information.',
Expand Down
3 changes: 2 additions & 1 deletion static/app/views/insights/http/views/httpLandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import {useDomainViewFilters} from 'sentry/views/insights/pages/useFilters';
import {ModuleName, SpanMetricsField} from 'sentry/views/insights/types';

export const USE_EAP_HTTP_MODULE = true;
export const HTTP_MODULE_URL_FIELD = 'span.description';

export function HTTPLandingPage() {
const organization = useOrganization();
Expand Down Expand Up @@ -178,7 +179,7 @@ export function HTTPLandingPage() {
fields: [
'project',
'project.id',
...(shouldShowRoutes ? ['url'] : ['span.domain']),
...(shouldShowRoutes ? [HTTP_MODULE_URL_FIELD] : ['span.domain']),

Check failure on line 182 in static/app/views/insights/http/views/httpLandingPage.tsx

View workflow job for this annotation

GitHub Actions / self-hosted

Type 'string' is not assignable to type '"http.response_transfer_size" | "http.response_content_length" | "http.decoded_response_content_length" | "span.domain" | "span.duration" | "span.self_time" | "project.id" | ... 113 more ... | `time_spent_percentage(${string})`'.
'spm()',
'avg(span.self_time)',
'sum(span.self_time)',
Expand Down

0 comments on commit d942833

Please sign in to comment.