[Geneva Exporter] Add CentralBlob decoder test utility and enhanced OTLP encoder tests #374
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds a test-only CentralBlob decoder utility and comprehensive unit tests for the OTLP encoder to validate encoding correctness.
While the actual correctness of encoding is validated using the validation with the binary data blob encoded using C++ encoder in mod.rs, this extends the functionality further to test the values for individual OTLP log fields, attribute types, trace context, schema generation, batching behavior, and end-to-end encoding/decoding workflows.
Changes
central_blob_decoder.rs
- Test-only utility for decoding CentralBlob payloadsotlp_encoder.rs
- Added 7 basic tests covering encoder functionality.New unit tests:
test_schema_caching_behavior
- Validates schema reuse and cache efficiencytest_event_name_and_batching
- Tests event grouping and empty name handlingtest_comprehensive_field_encoding
- Verifies all field types are properly encodedtest_field_ordering_consistency
- Ensures field order doesn't affect schema IDtest_multiple_schemas_per_batch
- Tests multiple schemas in single batchtest_minimal_vs_maximal_logs
- Covers edge cases for minimal/maximal logstest_timestamp_and_id_encoding
- Validates timestamp and ID hex encodingMerge requirement checklist
CHANGELOG.md
files updated for non-trivial, user-facing changes