Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Support comparing release versions without build code. ([#5376](https://github.com/getsentry/relay/pull/5376))
- Support uploading attachments directly to objectstore. ([#5367](https://github.com/getsentry/relay/pull/5367))
- Add `event.name` attribute to OTLP logs. ([#5396](https://github.com/getsentry/relay/pull/5396))

**Internal**:

Expand Down Expand Up @@ -53,7 +54,6 @@
- Remove the span kind from the Kafka span schema. ([#5368](https://github.com/getsentry/relay/pull/5368))
- Unconditionally enable span extraction. ([#5308](https://github.com/getsentry/relay/pull/5308))


## 25.10.0

**Features**:
Expand Down
1 change: 1 addition & 0 deletions relay-conventions/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ convention_attributes!(
DSC_TRACE_ID => "sentry.dsc.trace_id",
DSC_TRANSACTION => "sentry.dsc.transaction",
ENVIRONMENT => "sentry.environment",
EVENT_NAME => "event.name",
FAAS_TRIGGER => "faas.trigger",
GEN_AI_COST_INPUT_TOKENS => "gen_ai.cost.input_tokens",
GEN_AI_COST_OUTPUT_TOKENS => "gen_ai.cost.output_tokens",
Expand Down
8 changes: 6 additions & 2 deletions relay-ourlogs/src/otel_to_sentry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use chrono::{TimeZone, Utc};
use opentelemetry_proto::tonic::common::v1::InstrumentationScope;
use opentelemetry_proto::tonic::common::v1::any_value::Value as OtelValue;
use opentelemetry_proto::tonic::logs::v1::LogRecord as OtelLogRecord;
use relay_conventions::ORIGIN;
use relay_conventions::{EVENT_NAME, ORIGIN};

use opentelemetry_proto::tonic::resource::v1::Resource;
use relay_event_schema::protocol::{Attributes, OurLog, OurLogLevel, SpanId, Timestamp, TraceId};
Expand Down Expand Up @@ -59,7 +59,10 @@ pub fn otel_to_sentry_log(
attributes,
trace_id,
span_id,
..
event_name,
observed_time_unix_nano: _,
dropped_attributes_count: _,
flags: _,
} = otel_log;

let span_id = match span_id.is_empty() {
Expand All @@ -76,6 +79,7 @@ pub fn otel_to_sentry_log(

let mut attribute_data = Attributes::default();
attribute_data.insert(ORIGIN, "auto.otlp.logs".to_owned());
attribute_data.insert(EVENT_NAME, event_name.to_owned());

relay_otel::otel_scope_into_attributes(&mut attribute_data, resource, scope);

Expand Down