-
Notifications
You must be signed in to change notification settings - Fork 171
[chain-pr 5/10] DatadogLogs: typed-bus migration #2931
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
Changes from all commits
1bfa0e3
c17c19f
9253eac
ac8bd7a
ecb0384
86a7590
223f0e2
fc7327c
84c337a
dd5e9e2
8f8da76
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -89,6 +89,9 @@ public enum Logs { | |
| ) | ||
|
|
||
| try core.register(feature: feature) | ||
|
|
||
| // Subscribe typed-bus receivers: | ||
| core.messageBus.subscribe(receiver: feature.logMessageReceiver) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎. |
||
| } | ||
|
|
||
| /// Adds a custom attribute to all future logs sent by any logger created from the provided Core. | ||
|
|
@@ -120,6 +123,10 @@ public enum Logs { | |
| } | ||
|
|
||
| private static func sendAttributesChanged(for feature: LogsFeature, in core: DatadogCoreProtocol) { | ||
| // Keep log-attribute updates on the legacy bus until CrashReporting migrates: | ||
| // `CrashContextCoreProvider` still consumes `LogEventAttributes` as a legacy | ||
| // `FeatureMessageReceiver`, so routing this through the typed bus would drop the | ||
| // global log attributes from crash reports. | ||
| core.send( | ||
| message: .payload(LogEventAttributes( | ||
| attributes: feature.attributes.getAttributes() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.