Skip to content

Commit

Permalink
Prepare for release (with bump to otel-rust v0.25) (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb authored Sep 17, 2024
1 parent 823f970 commit 281c215
Show file tree
Hide file tree
Showing 29 changed files with 259 additions and 292 deletions.
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ resolver = "2"
debug = 1

[workspace.dependencies]
opentelemetry = "0.24"
opentelemetry-appender-tracing = "0.5"
opentelemetry-http = "0.13"
opentelemetry-proto = { version = "0.7", default-features = false }
opentelemetry_sdk = { version = "0.24", default-features = false }
opentelemetry-stdout = "0.5"
opentelemetry-semantic-conventions = "0.16"
opentelemetry = "0.25"
opentelemetry-appender-tracing = "0.25"
opentelemetry-http = "0.25"
opentelemetry-proto = { version = "0.25", default-features = false }
opentelemetry_sdk = { version = "0.25", default-features = false }
opentelemetry-stdout = "0.25"
opentelemetry-semantic-conventions = "0.25"
8 changes: 6 additions & 2 deletions opentelemetry-aws/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Changelog

## vNext
## v0.13.0

### Added

- `LambdaResourceDetector` has been added to the crate to detect AWS Lambda attributes. To enable it in your code, use the feature `detector-aws-lambda`.

### v0.12.0
### Changed

- Bump opentelemetry and opentelemetry_sdk versions to 0.25.0

## v0.12.0

- Bump opentelemetry and opentelemetry_sdk versions to 0.24.0
- Update hyper to 1.4.1
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-aws/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "opentelemetry-aws"
version = "0.12.0"
version = "0.13.0"
description = "AWS exporters and propagators for OpenTelemetry"
homepage = "https://github.com/open-telemetry/opentelemetry-rust-contrib/tree/main/opentelemetry-aws"
repository = "https://github.com/open-telemetry/opentelemetry-rust-contrib/tree/main/opentelemetry-aws"
Expand Down
7 changes: 7 additions & 0 deletions opentelemetry-contrib/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## vNext

## v0.17.0

### Changed

- Bump opentelemetry and opentelemetry_sdk versions to 0.25
- Bump opentelemetry-semantic-conventions version to 0.25

## v0.16.0

### Changed
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-contrib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "opentelemetry-contrib"
version = "0.16.0"
version = "0.17.0"
description = "Rust contrib repo for OpenTelemetry"
homepage = "https://github.com/open-telemetry/opentelemetry-rust-contrib/tree/main/opentelemetry-contrib"
repository = "https://github.com/open-telemetry/opentelemetry-rust-contrib/tree/main/opentelemetry-contrib"
Expand Down
6 changes: 6 additions & 0 deletions opentelemetry-datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## vNext

## v0.13.0

### Changed

- Bump opentelemetry and opentelemetry_sdk version to 0.25

## v0.12.0

### Changed
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-datadog/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "opentelemetry-datadog"
version = "0.12.0"
version = "0.13.0"
description = "Datadog exporters and propagators for OpenTelemetry"
homepage = "https://github.com/open-telemetry/opentelemetry-rust-contrib/tree/main/opentelemetry-datadog"
repository = "https://github.com/open-telemetry/opentelemetry-rust-contrib/tree/main/opentelemetry-datadog"
Expand Down
6 changes: 6 additions & 0 deletions opentelemetry-etw-logs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## vNext

## v0.4.0

### Changed

- Bump opentelemetry and opentelemetry_sdk versions to 0.25

## v0.3.0

### Changed
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-etw-logs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "opentelemetry-etw-logs"
description = "OpenTelemetry logs exporter to ETW (Event Tracing for Windows)"
version = "0.3.0"
version = "0.4.0"
edition = "2021"
homepage = "https://github.com/open-telemetry/opentelemetry-rust-contrib/tree/main/opentelemetry-etw-logs"
repository = "https://github.com/open-telemetry/opentelemetry-rust-contrib/tree/main/opentelemetry-etw-logs"
Expand Down
42 changes: 24 additions & 18 deletions opentelemetry-etw-logs/src/logs/converters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ mod tests {

#[test]
fn test_convert_vec_of_any_value_to_string() {
let vec = vec![
let vec = [
AnyValue::Int(1),
AnyValue::Int(2),
AnyValue::Int(3),
Expand All @@ -57,17 +57,17 @@ mod tests {
let result = [].as_json_value();
assert_eq!(result, json!([]));

let array = [AnyValue::ListAny(vec![
let array = [AnyValue::ListAny(Box::new(vec![
AnyValue::Int(1),
AnyValue::Int(2),
AnyValue::Int(3),
])];
]))];
let result = array.as_json_value();
assert_eq!(result, json!([[1, 2, 3]]));

let array = [
AnyValue::ListAny(vec![AnyValue::Int(1), AnyValue::Int(2)]),
AnyValue::ListAny(vec![AnyValue::Int(3), AnyValue::Int(4)]),
AnyValue::ListAny(Box::new(vec![AnyValue::Int(1), AnyValue::Int(2)])),
AnyValue::ListAny(Box::new(vec![AnyValue::Int(3), AnyValue::Int(4)])),
];
let result = array.as_json_value();
assert_eq!(result, json!([[1, 2], [3, 4]]));
Expand Down Expand Up @@ -105,8 +105,8 @@ mod tests {
#[should_panic]
fn test_convert_bytes_panics() {
let array = [
AnyValue::Bytes(vec![97u8, 98u8, 99u8]),
AnyValue::Bytes(vec![]),
AnyValue::Bytes(Box::new(vec![97u8, 98u8, 99u8])),
AnyValue::Bytes(Box::default()),
];
let result = array.as_json_value();
assert_eq!(result, json!(["abc", ""]));
Expand Down Expand Up @@ -134,7 +134,7 @@ mod tests {
let mut map = HashMap::new();
map.insert(Key::new("d"), AnyValue::Int(4));
map.insert(Key::new("e"), AnyValue::Int(5));
map.insert(Key::new("f"), AnyValue::Map(inner_map));
map.insert(Key::new("f"), AnyValue::Map(Box::new(inner_map)));
let result = map.as_json_value();
assert_eq!(result, json!({"d":4,"e":5,"f":{"a":1,"b":2,"c":3}}));

Expand Down Expand Up @@ -183,24 +183,30 @@ mod tests {
let empty_vec = vec![];

let mut complex_map = HashMap::new();
complex_map.insert(Key::new("a"), AnyValue::Map(simple_map.clone()));
complex_map.insert(Key::new("b"), AnyValue::Map(empty_map.clone()));
complex_map.insert(Key::new("c"), AnyValue::ListAny(simple_vec.clone()));
complex_map.insert(Key::new("d"), AnyValue::ListAny(empty_vec.clone()));
complex_map.insert(Key::new("a"), AnyValue::Map(Box::new(simple_map.clone())));
complex_map.insert(Key::new("b"), AnyValue::Map(Box::new(empty_map.clone())));
complex_map.insert(
Key::new("c"),
AnyValue::ListAny(Box::new(simple_vec.clone())),
);
complex_map.insert(
Key::new("d"),
AnyValue::ListAny(Box::new(empty_vec.clone())),
);
let result = complex_map.as_json_value();
assert_eq!(result, json!({"a":{"a":1,"b":2},"b":{},"c":[1,2],"d":[]}));

let complex_vec = vec![
AnyValue::Map(simple_map.clone()),
AnyValue::Map(empty_map.clone()),
AnyValue::ListAny(simple_vec.clone()),
AnyValue::ListAny(empty_vec.clone()),
let complex_vec = [
AnyValue::Map(Box::new(simple_map.clone())),
AnyValue::Map(Box::new(empty_map.clone())),
AnyValue::ListAny(Box::new(simple_vec.clone())),
AnyValue::ListAny(Box::new(empty_vec.clone())),
];
let result = complex_vec.as_json_value();
assert_eq!(result, json!([{"a":1,"b":2},{},[1,2],[]]));

let mut nested_complex_map = HashMap::new();
nested_complex_map.insert(Key::new("a"), AnyValue::Map(complex_map.clone()));
nested_complex_map.insert(Key::new("a"), AnyValue::Map(Box::new(complex_map.clone())));
let result = nested_complex_map.as_json_value();
assert_eq!(
result,
Expand Down
Loading

0 comments on commit 281c215

Please sign in to comment.