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: 20 additions & 7 deletions static/app/components/profiling/profileEventsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {t} from 'sentry/locale';
import type {Organization} from 'sentry/types/organization';
import type {Project} from 'sentry/types/project';
import {defined} from 'sentry/utils';
import {trackAnalytics} from 'sentry/utils/analytics';
import {getTimeStampFromTableDateField} from 'sentry/utils/dates';
import EventView from 'sentry/utils/discover/eventView';
import {DURATION_UNITS} from 'sentry/utils/discover/fieldRenderers';
Expand All @@ -33,8 +34,7 @@ import {
useDomainViewFilters,
} from 'sentry/views/insights/pages/useFilters';
import {getTraceDetailsUrl} from 'sentry/views/performance/traceDetails/utils';

import {ProfilingTransactionHovercard} from './profilingTransactionHovercard';
import {profilesRouteWithQuery} from 'sentry/views/performance/transactionSummary/transactionProfiles/utils';

interface ProfileEventsTableProps<F extends FieldType> {
columns: readonly F[];
Expand Down Expand Up @@ -236,13 +236,26 @@ function ProfileEventsCell<F extends FieldType>(props: ProfileEventsCellProps<F>
const project = getProjectForRow(props.baggage, props.dataRow);

if (defined(project)) {
const linkToSummary = profilesRouteWithQuery({
query: props.baggage.location.query,
orgSlug: props.baggage.organization.slug,
projectID: project.id,
transaction: props.dataRow.transaction,
});

return (
<Container>
<ProfilingTransactionHovercard
transaction={value}
project={project}
organization={props.baggage.organization}
/>
<Link
to={linkToSummary}
onClick={() =>
trackAnalytics('profiling_views.go_to_transaction', {
organization: props.baggage.organization,
source: 'profiling.landing.transaction_table',
})
}
>
{props.dataRow.transaction}
</Link>
</Container>
);
}
Expand Down
270 changes: 0 additions & 270 deletions static/app/components/profiling/profilingTransactionHovercard.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('useProfileEvents', function () {
match: [
MockApiClient.matchQuery({
dataset: 'discover',
query: 'has:profile.id (transaction:foo)',
query: '(has:profile.id OR (has:profiler.id has:thread.id)) (transaction:foo)',
}),
],
});
Expand Down
8 changes: 1 addition & 7 deletions static/app/utils/profiling/hooks/useProfileEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export interface UseProfileEventsOptions<F extends string = ProfilingFieldType>
fields: readonly F[];
referrer: string;
sort: Sort<F>;
continuousProfilingCompat?: boolean;
cursor?: string;
datetime?: PageFilters['datetime'];
enabled?: boolean;
Expand All @@ -30,7 +29,6 @@ export function useProfileEvents<F extends string>({
referrer,
query,
sort,
continuousProfilingCompat,
cursor,
enabled = true,
refetchOnMount = true,
Expand All @@ -40,11 +38,7 @@ export function useProfileEvents<F extends string>({
const organization = useOrganization();
const {selection} = usePageFilters();

if (continuousProfilingCompat) {
query = `(has:profile.id OR (has:profiler.id has:thread.id)) ${query ? `(${query})` : ''}`;
} else {
query = `has:profile.id ${query ? `(${query})` : ''}`;
}
query = `(has:profile.id OR (has:profiler.id has:thread.id)) ${query ? `(${query})` : ''}`;

const path = `/organizations/${organization.slug}/events/`;
const endpointOptions = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('useProfileEvents', function () {
match: [
MockApiClient.matchQuery({
dataset: 'discover',
query: 'has:profile.id (transaction:foo)',
query: '(has:profile.id OR (has:profiler.id has:thread.id)) (transaction:foo)',
}),
],
});
Expand Down Expand Up @@ -135,7 +135,7 @@ describe('useProfileEvents', function () {
match: [
MockApiClient.matchQuery({
dataset: 'discover',
query: 'has:profile.id (transaction:foo)',
query: '(has:profile.id OR (has:profiler.id has:thread.id)) (transaction:foo)',
}),
],
});
Expand Down Expand Up @@ -197,7 +197,7 @@ describe('useProfileEvents', function () {
match: [
MockApiClient.matchQuery({
dataset: 'discover',
query: 'has:profile.id (transaction:foo)',
query: '(has:profile.id OR (has:profiler.id has:thread.id)) (transaction:foo)',
}),
],
});
Expand Down
Loading
Loading