@@ -6,10 +6,11 @@ import type {
6
6
SpanLink ,
7
7
TraceContextType ,
8
8
} from 'sentry/components/events/interfaces/spans/types' ;
9
+ import ExternalLink from 'sentry/components/links/externalLink' ;
9
10
import Link from 'sentry/components/links/link' ;
10
11
import { normalizeDateTimeParams } from 'sentry/components/organizations/pageFilters/parse' ;
11
12
import { IconChevron } from 'sentry/icons' ;
12
- import { t } from 'sentry/locale' ;
13
+ import { t , tct } from 'sentry/locale' ;
13
14
import { space } from 'sentry/styles/space' ;
14
15
import { useLocation } from 'sentry/utils/useLocation' ;
15
16
import useOrganization from 'sentry/utils/useOrganization' ;
@@ -104,39 +105,75 @@ export function TraceLinkNavigationButton({
104
105
105
106
if ( previousTraceLink && isLinkedTraceAvailable ) {
106
107
return (
107
- < TraceLink
108
- color = "gray500"
109
- to = { getTraceDetailsUrl ( {
110
- traceSlug : previousTraceLink . trace_id ,
111
- spanId : previousTraceLink . span_id ,
112
- dateSelection,
113
- timestamp : linkedTraceTimestamp ,
114
- location,
115
- organization,
116
- } ) }
108
+ < StyledTooltip
109
+ position = "right"
110
+ delay = { 400 }
111
+ isHoverable
112
+ title = { tct (
113
+ `This links to the previous trace within the same session. To learn more, [link:read the docs].` ,
114
+ {
115
+ link : (
116
+ < ExternalLink
117
+ href = {
118
+ 'https://docs.sentry.io/concepts/key-terms/tracing/trace-view/#previous-and-next-traces'
119
+ }
120
+ />
121
+ ) ,
122
+ }
123
+ ) }
117
124
>
118
- < IconChevron direction = "left" />
119
- < TraceLinkText > { t ( 'Go to Previous Trace' ) } </ TraceLinkText >
120
- </ TraceLink >
125
+ < TraceLink
126
+ color = "gray500"
127
+ to = { getTraceDetailsUrl ( {
128
+ traceSlug : previousTraceLink . trace_id ,
129
+ spanId : previousTraceLink . span_id ,
130
+ dateSelection,
131
+ timestamp : linkedTraceTimestamp ,
132
+ location,
133
+ organization,
134
+ } ) }
135
+ >
136
+ < IconChevron direction = "left" />
137
+ < TraceLinkText > { t ( 'Go to Previous Trace' ) } </ TraceLinkText >
138
+ </ TraceLink >
139
+ </ StyledTooltip >
121
140
) ;
122
141
}
123
142
124
143
if ( nextTraceData ?. trace_id && nextTraceData . span_id && isLinkedTraceAvailable ) {
125
144
return (
126
- < TraceLink
127
- color = "gray500"
128
- to = { getTraceDetailsUrl ( {
129
- traceSlug : nextTraceData . trace_id ,
130
- spanId : nextTraceData . span_id ,
131
- dateSelection,
132
- timestamp : linkedTraceTimestamp ,
133
- location,
134
- organization,
135
- } ) }
145
+ < StyledTooltip
146
+ position = "left"
147
+ delay = { 400 }
148
+ isHoverable
149
+ title = { tct (
150
+ `This links to the next trace within the same session. To learn more, [link:read the docs].` ,
151
+ {
152
+ link : (
153
+ < ExternalLink
154
+ href = {
155
+ 'https://docs.sentry.io/concepts/key-terms/tracing/trace-view/#previous-and-next-traces'
156
+ }
157
+ />
158
+ ) ,
159
+ }
160
+ ) }
136
161
>
137
- < TraceLinkText > { t ( 'Go to Next Trace' ) } </ TraceLinkText >
138
- < IconChevron direction = "right" />
139
- </ TraceLink >
162
+ < TraceLink
163
+ color = "gray500"
164
+ to = { getTraceDetailsUrl ( {
165
+ traceSlug : nextTraceData . trace_id ,
166
+ spanId : nextTraceData . span_id ,
167
+ dateSelection,
168
+ timestamp : linkedTraceTimestamp ,
169
+ location,
170
+ organization,
171
+ } ) }
172
+ >
173
+ < TraceLinkText > { t ( 'Go to Next Trace' ) } </ TraceLinkText >
174
+ < IconChevron direction = "right" />
175
+ </ TraceLink >
176
+ </ StyledTooltip >
140
177
) ;
141
178
}
142
179
@@ -165,10 +202,14 @@ const StyledTooltip = styled(Tooltip)`
165
202
166
203
const TraceLink = styled ( Link ) `
167
204
font-weight: ${ p => p . theme . fontWeightNormal } ;
168
- color: ${ p => p . theme . subText } ;
169
205
padding: ${ space ( 0.25 ) } ${ space ( 0.5 ) } ;
170
206
display: flex;
171
207
align-items: center;
208
+
209
+ color: ${ p => p . theme . subText } ;
210
+ :hover {
211
+ color: ${ p => p . theme . subText } ;
212
+ }
172
213
` ;
173
214
174
215
const TraceLinkText = styled ( 'span' ) `
0 commit comments