-
Notifications
You must be signed in to change notification settings - Fork 228
feat: Add support for exporting telemetry API 'platform.*' log events #2058
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
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| address, err := listener.Start() | ||
| require.NoError(t, err) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of t.Cleanup() appeared to trigger a race condition using the race detector with zap.Logger switching to using defer appears to fix the issue.
296c7f2 to
0c0e36a
Compare
| Port int `mapstructure:"port"` | ||
| Types []string `mapstructure:"types"` | ||
| LogReport bool `mapstructure:"log_report"` | ||
| LogReport *bool `mapstructure:"log_report"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switch to pointer to allow default value to be true
Fixes issue #2054 where
platform.*telemetry API event types (except part ofplatform.report) do not get exported for logging. The implemented solution captures all logs by default, and simplifies the current implementation by reusing the core log record construction logic while reducing code duplication.I have setup a toy lambda function to export logs to Grafana Cloud with the changes in this PR, here are the updated logs:
