Merge pull request #46 from navi-ppl/TP-5555/log-remove
NTP-10933 | include context in error
This commit is contained in:
@@ -48,6 +48,7 @@ type ExceptionValue struct {
|
||||
Breadcrumbs interface{} `json:"breadcrumbs,omitempty"`
|
||||
Extra interface{} `json:"extra,omitempty"`
|
||||
Request interface{} `json:"request,omitempty"`
|
||||
Contexts interface{} `json:"contexts,omitempty"`
|
||||
}
|
||||
|
||||
type Exception struct {
|
||||
@@ -58,6 +59,7 @@ type Payload struct {
|
||||
Breadcrumbs interface{} `json:"breadcrumbs"`
|
||||
Request interface{} `json:"request"`
|
||||
Extra interface{} `json:"extra"`
|
||||
Contexts interface{} `json:"contexts"`
|
||||
}
|
||||
|
||||
func isIgnored(value string) bool {
|
||||
@@ -127,6 +129,7 @@ func (exceptionService *ExceptionService) CatchErrors(c *gin.Context) {
|
||||
errorItem.Breadcrumbs = jsonData.Breadcrumbs
|
||||
errorItem.Extra = jsonData.Extra
|
||||
errorItem.Request = jsonData.Request
|
||||
errorItem.Contexts = jsonData.Contexts
|
||||
err := exceptionService.kafkaProducer.PublishEvent(errorItem, exceptionService.kafkaConfig.Topic, "", nil, encoder.JsonEncoderInstance)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user