Structured logging - #112
Merged
Merged
Conversation
…h-opentelemetry Add OpenTelemetry structured logging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
Description
tracing::semconvand aLogSeverityenum to represent severity text and numeric levels used by VeriNode.LogRecordandStructuredLoggerwithemit,info, anderrorhelpers that publish structured log events under thelog::recordSoroban event topic and correlate withTraceId/SpanId.encode_attributeshelper and addcritical_path_attributesto serialize attributes askey=valuepairs for constrained contract callers.Tracerto reuse the attribute encoder, addend_span_athelper, and keep trace/span event format consistent with OpenTelemetry semantics.src/lib.rsto mention structured logging and add unit tests insrc/tracing/test.rsplus Soroban test snapshots undertest_snapshots/tracingto exercise emitted trace/log events.Testing
cargo test tracing::testwhich executed the tracing/logging unit tests and snapshots with all tracing tests passing (12 passed).cargo test; tracing tests passed but the overall run surfaced pre‑existingpool_managerunit test failures (full run:134 passed; 17 failed) that are unrelated to the tracing/logging changes.cargo fmt/rustfmtduring development.Closes #74