Skip to content

RUMM-1180: Keep message for logs when it comes with error fields in OpenTracing format#535

Merged
0xnm merged 1 commit into
masterfrom
nogorodnikov/rumm-1180/keep-message-for-logs-when-it-comes-with-error-fields-in-opentracing
Mar 17, 2021
Merged

RUMM-1180: Keep message for logs when it comes with error fields in OpenTracing format#535
0xnm merged 1 commit into
masterfrom
nogorodnikov/rumm-1180/keep-message-for-logs-when-it-comes-with-error-fields-in-opentracing

Conversation

@0xnm

@0xnm 0xnm commented Mar 16, 2021

Copy link
Copy Markdown
Member

What does this PR do?

Fixes #522 . Before this change MESSAGE field was removed from the collection if it also contains error fields as part of extractError method, and then for the logs default message was used (since original was removed). But it actually makes sense to propagate it to the logs as well.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@0xnm
0xnm requested a review from a team as a code owner March 16, 2021 11:04
if (errorType != null) {
val stackField = map.remove(Fields.STACK)
val msgField = map.remove(Fields.MESSAGE)
val msgField = map[Fields.MESSAGE]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the reason it was like that is that I followed what they are doing in the APM project.

@0xnm
0xnm merged commit 2de8a68 into master Mar 17, 2021
@0xnm
0xnm deleted the nogorodnikov/rumm-1180/keep-message-for-logs-when-it-comes-with-error-fields-in-opentracing branch March 17, 2021 08:34
@xgouchet xgouchet added this to the 1.9.0 milestone May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenTracing message field gets overridden by default "Span event" message in some cases

3 participants