feat(logs): config-driven log transformations and static values for golden log lines - #2075
Open
AmitsinghTanwar007 wants to merge 4 commits into
Open
feat(logs): config-driven log transformations and static values for golden log lines#2075AmitsinghTanwar007 wants to merge 4 commits into
AmitsinghTanwar007 wants to merge 4 commits into
Conversation
…olden log lines Add Euler-compatible log schema support: - Config-driven field renaming for golden log lines via [log.transformations.incoming] and [log.transformations.outgoing] (gated behind log-transformations feature flag) - Runtime static key-value pairs via [log.static_values], overridable per-request through x-config-override header - transformation_mode (copy/replace) for event field transformations - Deadlock fix: filter reserved keys before entering span write lock to prevent re-entrant deadlock from log_utils record_value calling tracing::warn! Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
AmitsinghTanwar007
force-pushed
the
feat/euler-log-structure
branch
from
August 7, 2026 05:00
6fd0ca8 to
2ef6c3a
Compare
Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions.
Allows different static key-value pairs for incoming (gRPC handler) and outgoing (connector call) golden log lines. Config format changes from flat [log.static_values] to [log.static_values.incoming] and [log.static_values.outgoing].
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.
Summary
[log.transformations.incoming]and[log.transformations.outgoing]config sections. Dotted target paths (e.g."api_details.url") create nested JSON objects. Gated behindlog-transformationsfeature flag.[log.static_values.incoming]and[log.static_values.outgoing]inject separate key-value pairs into each golden log line. This allows different values for the same field — e.g.hostname = "euler-gateway"on incoming vshostname = "connector-service"on outgoing. Overridable per-request viax-config-overrideheader — no server restart needed.transformation_mode: Controls whether event transformations copy or replace the original source fields ("copy"default,"replace"removes originals).log_utils::Storage::record_value()callstracing::warn!for reserved keys, which re-enters the subscriber while holding the span extensions write lock → deadlock. Fixed by filtering reserved keys before enteringwith_current_span_mut.Config Format
Test Plan
1. Build and run
cargo run --features "grpc-server/log-transformations" -p grpc-server2. gRPC request (static values via header override)
3. Response
{ "merchantTransactionId": "120087958932", "connectorTransactionId": "120087958932", "status": "CHARGED", "statusCode": 200, "networkTransactionId": "XUB15TGRX3P9358QTM7XAM4", "connectorResponse": { "additionalPaymentMethodData": { "card": { "paymentChecks": "eyJhdnNfcmVzdWx0X2NvZGUiOiJZIiwiZGVzY3JpcHRpb24iOiJUaGUgc3RyZWV0IGFkZHJlc3MgYW5kIHBvc3RhbCBjb2RlIG1hdGNoZWQuIn0=" } } }, "connectorReferenceId": "120087958932" }4. Outgoing golden log line
Shows
api_detailsnested object from log transformations +custom_hostname/custom_keyfrom outgoing static values:{ "message": "[EXECUTE_CONNECTOR_PROCESSING_STEP - EVENT] Outgoing Request completed", "level": "INFO", "tag": "OutgoingApi", "log_type": "api", "message_": "Golden Log Line (outgoing)", "custom_key": "my-custom-value", "custom_hostname": "outgoing-host", "latency": "2432", "gateway": "authorizedotnet", "api_details": { "url": "https://apitest.authorize.net/xml/v1/request.api", "method": "POST", "latency": "2432", "request_body": "{...}", "response_body": "{...}", "request_headers": "{...}", "response_headers": "{...}" } }5. Incoming golden log line
Shows
connectorfield from incoming transformation +api_detailsnested object + incoming static values:{ "message": "[PAYMENT_AUTHORIZE - EVENT] Golden Log Line (incoming - response)", "level": "INFO", "message_": "Golden Log Line (incoming)", "connector": "authorizedotnet", "custom_hostname": "incoming-host", "api_details": { "request_body": "{...}", "response_body": "PaymentServiceAuthorizeResponse { ... }" } }Checks
cargo check -p grpc-server(without feature flag) — passescargo check --features "grpc-server/log-transformations" -p grpc-server— passesGolden log incoming

Golden log outgoing
