Add adapter version to LLO bridge telemetry - #23791
Open
denis-chernov-smartcontract wants to merge 1 commit into
Open
denis-chernov-smartcontract wants to merge 1 commit into
denis-chernov-smartcontract wants to merge 1 commit into
Conversation
product-security-plaid-production
Bot
requested review from
DylanTinianov,
Krish-vemula,
Unheilbar,
amit-momin,
bolekk,
dhaidashenko,
ilija42,
prashantkumar1982,
silaslenihan and
yashnevatia
September 22, 2026 00:14
Contributor
|
✅ No conflicts with other open PRs targeting |
denis-chernov-smartcontract
force-pushed
the
Add-adapter-proto-and-version-to-the-LLO-telemetry
branch
from
September 22, 2026 01:19
0a634eb to
efe0c56
Compare
denis-chernov-smartcontract
force-pushed
the
Add-adapter-proto-and-version-to-the-LLO-telemetry
branch
from
September 22, 2026 02:16
efe0c56 to
d9467c2
Compare
|
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
External-adapter (streams-adapter) version is now discovered from the adapter's
health endpoint and stamped into the
meta.adapterVersionfield of each livebridge observation's telemetry copy, alongside a TTL bump for cached
observations.
Changes
Adapter version discovery (
bridgeconn)BridgeConnManagergains anAdapterVersion(bridge) (string)method thatreturns the version the bridge's streams-adapter last reported, or
""if itis not yet known. It never creates a connection.
eaConnnow tracks the adapter version behind a dedicatedversionMu, plus ahealthURLandhealthClientused for discovery.eaConnasynchronously fetchesGET <bridge URL>/health(adapterHealthURL, bounded by the newadapterHealthTimeout = 1s) and records the response'sadapterVersionfield via
fetchAdapterVersion. Failures are best-effort: they log at debugand leave the previous value in place, never affecting the stream.
adapterHealthURLderives the health endpoint from the bridge URL, preservingscheme/authority and stripping query/fragment.
Version field in telemetry (
task.bridge.go)the telemetry copy only, via the new
adapterMetaForTelemetryhelper. Thebyte slice is cloned before
jsonparser.Setso the untouched body remains thetask result, and the value persisted to the bridge cache.
adapter build), consistent with
local_cache_hitmarking those rows.Observation cache TTL
observationTTLincreased from 60s to 90s (bridge_conn_manager.go) to match the JS adapter behaviour.Testing
TestAdapterHealthURL— health endpoint derivation from bridge URLs.TestEAConn_RefreshAdapterVersion— version discovery behavior across HTTPstatuses, missing/malformed fields, and disabled clients.
TestBridgeConnManager_AdapterVersion— bridge-name prefix normalization andunknown-bridge handling.
TestAdapterMetaForTelemetry— version stamping edge cases (empty version,non-object body, escaping, input non-mutation).
TestBridgeTask_UsesBridgeConnManagerCacheFallbackto exercise thelive-observation and cache-fallback telemetry paths.