File tree Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 1
1
import type { ReactNode } from 'react' ;
2
2
import styled from '@emotion/styled' ;
3
+ import orderBy from 'lodash/orderBy' ;
3
4
4
5
import Collapsible from 'sentry/components/collapsible' ;
5
6
import { Button } from 'sentry/components/core/button' ;
@@ -14,7 +15,7 @@ interface Props {
14
15
}
15
16
16
17
export default function TagsSection ( { tags} : Props ) {
17
- const entries = Object . entries ( tags ) ;
18
+ const orderedEntries = orderBy ( Object . entries ( tags ) , [ 'key' ] , [ 'asc' ] ) ;
18
19
19
20
return (
20
21
< KeyValueTable noMargin >
@@ -31,7 +32,7 @@ export default function TagsSection({tags}: Props) {
31
32
</ StyledButton >
32
33
) }
33
34
>
34
- { entries . map ( ( [ key , value ] ) => (
35
+ { orderedEntries . map ( ( [ key , value ] ) => (
35
36
< KeyValueTableRow
36
37
key = { key }
37
38
keyName = { key }
Original file line number Diff line number Diff line change @@ -50,12 +50,6 @@ export default function hydrateFeedbackTags(
50
50
...( context . device ?. name ? { 'device.name' : context . device ?. name } : { } ) ,
51
51
...( context . os ?. name ? { 'os.name' : context . os ?. name } : { } ) ,
52
52
...( context . os ?. version ? { 'os.version' : context . os ?. version } : { } ) ,
53
- ...( eventTags . some ( e => e . key === 'environment' )
54
- ? { environment : eventTags . find ( e => e . key === 'environment' ) ?. value }
55
- : { } ) ,
56
- ...( eventTags . some ( e => e . key === 'transaction' )
57
- ? { transaction : eventTags . find ( e => e . key === 'transaction' ) ?. value }
58
- : { } ) ,
59
53
...( eventData . platform
60
54
? { platform : issueData ?. project ?. platform ?? eventData . platform }
61
55
: { } ) ,
@@ -64,6 +58,14 @@ export default function hydrateFeedbackTags(
64
58
...( eventData ?. contexts ?. feedback ?. replay_id
65
59
? { replay_id : eventData ?. contexts ?. feedback ?. replay_id }
66
60
: { } ) ,
61
+ ...( eventData . user ?. geo ?. city ? { 'geo.city' : eventData . user ?. geo ?. city } : { } ) ,
62
+ ...( eventData . user ?. geo ?. country_code
63
+ ? { 'geo.country_code' : eventData . user ?. geo ?. country_code }
64
+ : { } ) ,
65
+ ...( eventData . user ?. geo ?. region ? { 'geo.region' : eventData . user ?. geo ?. region } : { } ) ,
66
+ ...( eventData . user ?. geo ?. subdivision
67
+ ? { 'geo.subdivision' : eventData . user ?. geo ?. subdivision }
68
+ : { } ) ,
67
69
} ;
68
70
69
71
// Sort the tags by key
Original file line number Diff line number Diff line change @@ -677,6 +677,12 @@ export type EventTag = {key: string; value: string};
677
677
type EventUser = {
678
678
data ?: string | null ;
679
679
email ?: string ;
680
+ geo ?: {
681
+ city ?: string ;
682
+ country_code ?: string ;
683
+ region ?: string ;
684
+ subdivision ?: string ;
685
+ } ;
680
686
id ?: string ;
681
687
ip_address ?: string ;
682
688
name ?: string | null ;
You can’t perform that action at this time.
0 commit comments