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

Use event.name as attribute key for exporting Log event name #2050

Merged
merged 2 commits into from
Aug 26, 2024
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
7 changes: 5 additions & 2 deletions opentelemetry-otlp/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

## vNext

- **Breaking** [1994](https://github.com/open-telemetry/opentelemetry-rust/pull/1994) The logrecord event-name is added as attribute with
key `name` only if the feature flag `populate-logs-event-name` is enabled.
- **Breaking**
[1994](https://github.com/open-telemetry/opentelemetry-rust/pull/1994) The
logrecord event-name is added as an attribute only if the feature flag
`populate-logs-event-name` is enabled. The name of the attribute is changed from
"name" to "event.name".

## v0.17.0

Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-proto/src/transform/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
if let Some(event_name) = &log_record.event_name {
let mut attributes_with_name = attributes;
attributes_with_name.push(KeyValue {
key: "name".into(),
key: "event.name".into(),

Check warning on line 106 in opentelemetry-proto/src/transform/logs.rs

View check run for this annotation

Codecov / codecov/patch

opentelemetry-proto/src/transform/logs.rs#L106

Added line #L106 was not covered by tests
value: Some(AnyValue {
value: Some(Value::StringValue(event_name.to_string())),
}),
Expand Down
Loading