-
Notifications
You must be signed in to change notification settings - Fork 64
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
base: main
Are you sure you want to change the base?
Conversation
|
Co-authored-by: lalitb <[email protected]>
Unit-test is not required. also check the lint. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #356 +/- ##
=====================================
Coverage 49.5% 49.5%
=====================================
Files 67 67
Lines 8909 8909
=====================================
Hits 4413 4413
Misses 4496 4496 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Removed test_trace_flags_uint32_type() as requested by maintainer - Fixed unnecessary cast warning by removing "as u32" cast since log.flags is already u32 - All linting checks now pass Co-authored-by: lalitb <[email protected]>
Removed the unit test and fixed the linting issue (unnecessary cast warning). All linting checks now pass. Changes in commit 14172ad. |
This PR fixes the trace flags field type in the Geneva exporter's OTLP encoder to use
u32
instead ofi32
, aligning with the OpenTelemetry protobuf specification.Changes Made
BondDataType::BT_INT32
toBondDataType::BT_UINT32
for trace flags in thedetermine_fields()
methodlog.flags as i32
tolog.flags as u32
in thewrite_row_data()
methodtest_trace_flags_uint32_type()
to verify the fix works correctlyBackground
The issue was identified during code review where it was noted that trace flags should be unsigned 32-bit integers according to the OpenTelemetry protobuf specification, but the Geneva exporter was incorrectly treating them as signed 32-bit integers.
Testing
BT_UINT32
typeThe changes are minimal and surgical, affecting only the specific type handling for trace flags without impacting any other functionality.
Fixes #355.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.