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

Log - modify export/processor to not require mutable self in shutdown and set-resource #2634

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

cijothomas
Copy link
Member

And let the component that needs mutability rely on interior mutability. Most of it already uses interior mutability.

Metric already does not require mutable self on shutdown, this makes Logs consistent with that, and later we need to get Traces too.

DRAFT as I am still working through OTLP.

}

impl<T: LogExporter> SimpleLogProcessor<T> {
pub(crate) fn new(exporter: T) -> Self {
SimpleLogProcessor {
exporter: Mutex::new(exporter),
is_shutdown: AtomicBool::new(false),
exporter: exporter
Copy link
Member

Choose a reason for hiding this comment

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

I believe the purpose of Mutex lock was to ensure that the multiple exports are not invoked concurrently.

Copy link
Member Author

Choose a reason for hiding this comment

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

good point! We need to enforce that spec requirement.
Will see how to do it without Mutex.

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.

3 participants