TP-5555 | device contexts
This commit is contained in:
@@ -14,4 +14,5 @@ type ErrorDocument struct {
|
||||
Breadcrumbs interface{} `json:"breadcrumbs"`
|
||||
Extra interface{} `json:"extra"`
|
||||
Request interface{} `json:"request"`
|
||||
Contexts interface{} `json:"contexts"`
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ type Exception struct {
|
||||
Breadcrumbs interface{} `json:"breadcrumbs,omitempty"`
|
||||
Extra interface{} `json:"extra,omitempty"`
|
||||
Request interface{} `json:"request,omitempty"`
|
||||
Contexts interface{} `json:"contexts,omitempty"`
|
||||
}
|
||||
|
||||
func NewErrorProcessor(logger *log.Logger, elasticSearchClient *dbPackage.ElasticSearchClient, sourceMapFetcherService *SourceMapService, awsConfig configs.AwsConfig) *ErrorProcessor {
|
||||
@@ -195,10 +196,11 @@ func (ep *ErrorProcessor) ProcessError(error []byte) {
|
||||
Breadcrumbs: payload.Breadcrumbs,
|
||||
Extra: payload.Extra,
|
||||
Request: payload.Request,
|
||||
Contexts: payload.Contexts,
|
||||
}
|
||||
elastic_err := ep.elasticSearchClient.IndexDocument(errorDocument)
|
||||
if elastic_err != nil {
|
||||
ep.logger.Info("error occured in elasticsearch", zap.Error(elastic_err))
|
||||
ep.logger.Info("error occured in saving document to elasticsearch", zap.Error(elastic_err))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user