Skip to content

fix(otel): set span.op to default by default #792

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

Closed
wants to merge 1 commit into from
Closed
Changes from all 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
4 changes: 1 addition & 3 deletions sentry-opentelemetry/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,17 @@ impl SpanProcessor for SentrySpanProcessor {
let mut span_map = self.span_map.lock().unwrap();

let mut span_description = String::new();
let mut span_op = String::new();
let mut span_start_timestamp = SystemTime::now();
let mut parent_sentry_span = None;
if let Some(data) = span.exported_data() {
span_description = data.name.to_string();
span_op = span_description.clone(); // TODO: infer this from OTEL span attributes
span_start_timestamp = data.start_time;
if data.parent_span_id != SpanId::INVALID {
parent_sentry_span = span_map.get(&convert_span_id(&data.parent_span_id));
};
}
let span_description = span_description.as_str();
let span_op = span_op.as_str();
let span_op = "default"; // TODO: infer this from OTEL span attributes

let sentry_span = {
if let Some(parent_sentry_span) = parent_sentry_span {
Expand Down