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 OrderMap reference in log subsystem #1073

Merged
merged 3 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions opentelemetry-api/src/logs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ pub use logger::{Logger, LoggerProvider};
pub use noop::NoopLoggerProvider;
pub use record::{AnyValue, LogRecord, LogRecordBuilder, Severity, TraceContext};

use std::collections::hash_map::RandomState;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is needed anymore? Is the only remaining value of this PR sorting the imports correctly?

Copy link
Member Author

@lalitb lalitb May 25, 2023

Choose a reason for hiding this comment

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

Good catch. Removed the import.



/// Describe the result of operations in log SDK.
pub type LogResult<T> = Result<T, LogError>;

/// re-export OrderMap to mitigate breaking change
pub type OrderMap<K, V, S = RandomState> = crate::order_map::OrderMap<K, V, S>;

#[derive(Error, Debug)]
#[non_exhaustive]
/// Errors returned by the log SDK.
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-api/src/logs/record.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
trace::{OrderMap, SpanContext, SpanId, TraceContextExt, TraceFlags, TraceId},
Array, Key, StringValue, Value,
trace::{SpanContext, SpanId, TraceContextExt, TraceFlags, TraceId},
Array, Key, OrderMap, StringValue, Value,
};
use std::{borrow::Cow, time::SystemTime};

Expand Down