Skip to content

Fix trace flags type from i32 to u32 in Geneva exporter #356

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
fields.push((FIELD_SPAN_ID.into(), BondDataType::BT_STRING));
}
if log.flags != 0 {
fields.push((FIELD_TRACE_FLAGS.into(), BondDataType::BT_INT32));
fields.push((FIELD_TRACE_FLAGS.into(), BondDataType::BT_UINT32));

Check warning on line 122 in opentelemetry-exporter-geneva/geneva-uploader/src/payload_encoder/otlp_encoder.rs

View check run for this annotation

Codecov / codecov/patch

opentelemetry-exporter-geneva/geneva-uploader/src/payload_encoder/otlp_encoder.rs#L122

Added line #L122 was not covered by tests
}

// Part B - Core log fields
Expand Down Expand Up @@ -252,7 +252,7 @@
BondWriter::write_string(&mut buffer, hex_str);
}
FIELD_TRACE_FLAGS => {
BondWriter::write_numeric(&mut buffer, log.flags as i32);
BondWriter::write_numeric(&mut buffer, log.flags);

Check warning on line 255 in opentelemetry-exporter-geneva/geneva-uploader/src/payload_encoder/otlp_encoder.rs

View check run for this annotation

Codecov / codecov/patch

opentelemetry-exporter-geneva/geneva-uploader/src/payload_encoder/otlp_encoder.rs#L255

Added line #L255 was not covered by tests
}
FIELD_NAME => {
BondWriter::write_string(&mut buffer, &log.event_name);
Expand Down
Loading