@@ -32,8 +32,13 @@ func Test_ok(t *testing.T) {
32
32
{
33
33
Level : sentrysdk .LevelInfo ,
34
34
Message : http .StatusText (http .StatusInternalServerError ),
35
- Extra : map [string ]interface {}{
36
- "problem.status" : http .StatusInternalServerError ,
35
+ Extra : map [string ]interface {}{},
36
+ Contexts : map [string ]interface {
37
+ }{
38
+ "problemDetails" : & problemContext {
39
+ Type : "about:blank" ,
40
+ Status : http .StatusInternalServerError ,
41
+ },
37
42
},
38
43
},
39
44
},
@@ -46,9 +51,14 @@ func Test_ok(t *testing.T) {
46
51
{
47
52
Level : sentrysdk .LevelInfo ,
48
53
Message : "some details" ,
49
- Extra : map [string ]interface {}{
50
- "problem.status" : http .StatusInternalServerError ,
51
- "problem.detail" : "some details" ,
54
+ Extra : map [string ]interface {}{},
55
+ Contexts : map [string ]interface {
56
+ }{
57
+ "problemDetails" : & problemContext {
58
+ Type : "about:blank" ,
59
+ Status : http .StatusInternalServerError ,
60
+ Detail : "some details" ,
61
+ },
52
62
},
53
63
},
54
64
},
@@ -61,9 +71,14 @@ func Test_ok(t *testing.T) {
61
71
{
62
72
Level : sentrysdk .LevelInfo ,
63
73
Message : http .StatusText (http .StatusInternalServerError ),
64
- Extra : map [string ]interface {}{
65
- "problem.status" : http .StatusInternalServerError ,
66
- "problem.instance" : "http://instance.example/" ,
74
+ Extra : map [string ]interface {}{},
75
+ Contexts : map [string ]interface {
76
+ }{
77
+ "problemDetails" : & problemContext {
78
+ Type : "about:blank" ,
79
+ Status : http .StatusInternalServerError ,
80
+ Instance : "http://instance.example/" ,
81
+ },
67
82
},
68
83
},
69
84
},
@@ -82,8 +97,13 @@ func Test_ok(t *testing.T) {
82
97
{
83
98
Level : sentrysdk .LevelInfo ,
84
99
Message : http .StatusText (http .StatusBadRequest ),
85
- Extra : map [string ]interface {}{
86
- "problem.status" : http .StatusBadRequest ,
100
+ Extra : map [string ]interface {}{},
101
+ Contexts : map [string ]interface {
102
+ }{
103
+ "problemDetails" : & problemContext {
104
+ Type : "about:blank" ,
105
+ Status : http .StatusBadRequest ,
106
+ },
87
107
},
88
108
},
89
109
},
@@ -165,10 +185,13 @@ func withSentryHub() httputil.Middleware {
165
185
var sentryEventCmpOptions = cmp.Options {
166
186
cmpopts .IgnoreFields (
167
187
sentry.Event {},
168
- "Contexts" , " EventID" , "Platform" , "Release" , "Sdk" , "ServerName" , "Tags" , "Timestamp" ,
188
+ "EventID" , "Platform" , "Release" , "Sdk" , "ServerName" , "Tags" , "Timestamp" ,
169
189
),
170
190
cmpopts .IgnoreFields (
171
191
sentry.Request {},
172
192
"Env" ,
173
193
),
194
+ cmpopts .IgnoreMapEntries (func (key string , value interface {}) bool {
195
+ return key != "problemDetails"
196
+ }),
174
197
}
0 commit comments