-
Notifications
You must be signed in to change notification settings - Fork 893
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
Allow cloning of ReadWriteLogRecord #4090
Conversation
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
So IMHO we should merge this, specially after we got @cijothomas's review. A note on why this is added would help? i.e. regarding helping implementing #4062 if applicable. |
In the PR description or the specification itself? |
In the Spec ;) |
@carlosalberto PTAL c898c54 |
Follows open-telemetry#4062 ## Why 1. There is a need to make a deep copy of a `ReadWriteRecord` in order to implement an experimental isolating processor outside of the SDK (as it is experimental, we prefer to land it to contrib repository first). 2. Allow fine-grained control for the users to make a deep copy only when necessary. This allows users to have more control on the processing e.g. pass a clone to asynchronous processor to avoid race conditions or make performance improvements.
Follows #4062
Why
ReadWriteRecord
in order to implement an experimental isolating processor outside of the SDK (as it is experimental, we prefer to land it to contrib repository first).Pre-work
slog
(standard library in Go) also offers cloning records: https://pkg.go.dev/log/slog#Record.Clone