Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ensure needed attributes are sent from logs on the message bus #1997

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

fuzzybinary
Copy link
Member

What and why?

Certain attributes (fingerprint and error source type) are removed as part of log processing because they are moved onto official properties of errors in logs. However, when these errors are transmitted to RUM, the properties are not replaced, which they should be, so that RUM has all of the information about the error.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes

@fuzzybinary fuzzybinary requested review from a team as code owners August 16, 2024 15:57
Certain attributes (fingerprint and error source type) are removed as part of log processing because they are moved onto official properties of errors in logs.  However, when these errors are transmitted to RUM, the properties are not replaced, which they should be, so that RUM has all of the information about the error.
@fuzzybinary fuzzybinary force-pushed the jward/cp-error-attributes branch from cdc9614 to 6e84165 Compare August 16, 2024 16:02
@fuzzybinary fuzzybinary changed the title fix: Ensure need attributes are sent from logs on the message bus fix: Ensure needed attributes are sent from logs on the message bus Aug 20, 2024
Comment on lines +192 to +200
// Add back in fingerprint and error source type
var busCombinedAttributes = combinedAttributes
if let errorSourcetype = error?.sourceType {
busCombinedAttributes[CrossPlatformAttributes.errorSourceType] = errorSourcetype
}
if let errorFingerprint = errorFingerprint {
busCombinedAttributes[Logs.Attributes.errorFingerprint] = errorFingerprint
}

Copy link
Member

@maxep maxep Aug 20, 2024

Choose a reason for hiding this comment

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

/suggestion I think it would be clearer if these properties were added to ErrorMessage object, would that be possible?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a much larger refactor is the issue. 😓

Copy link
Member

@maxep maxep left a comment

Choose a reason for hiding this comment

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

Good to merge as we have RUM-5893 to refactor 👍

@fuzzybinary fuzzybinary merged commit 7a57ec7 into develop Aug 21, 2024
16 checks passed
@fuzzybinary fuzzybinary deleted the jward/cp-error-attributes branch August 21, 2024 13:09
@mariedm mariedm mentioned this pull request Sep 11, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants