Repository navigation
feat(observability): identify the lens on eth_call wide events - #89
Draft
haydenshively wants to merge 1 commit into
Draft
haydenshively wants to merge 1 commit into
haydenshively wants to merge 1 commit into
Conversation
Both lens handlers stamp `eth_call.lens_address` and `eth_call.lens_signature` on their facet, and `EthCallPolicy` gains an optional `label`, accepted by `readLens` and `policy()`, stamped as `eth_call.lens_label`. The label is not part of cache identity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Context
eth_callran. The lens is identified by its bytecode and calldata, andobservetrims everyreqstring to 100 characters, which cuts both off.withLoggingmetadata can't fill the gap. Hosts open the scope once per procedure or lambda, well above individual calls, and nesting a second scope drops the outer one's fields.Special things to note
Change outline
Each lens handler adds three fields to the
eth_callfacet it already writes (deployless.eth_call.*orcache.eth_call.*). Both handlers already decode everything required.facet.set({ input_elements, + lens_address, // counterfactual address from factory + factoryData; changes with each lens build + lens_signature, // per-item function, e.g. "balancesOf(address)" + lens_label, // policy.label, when the caller sets it })EthCallPolicygainslabel?: string.readLensandpolicy()accept it and pass it through.lens_addresslets dashboards tell lens versions apart.lens_labelgives a readable name without a lookup table from addresses to names.Evidence
deployless.test.tsandcache/eth-call/handler.test.tsread all three fields off the emitted event. A cache test shows a labelled request served entirely from entries an unlabelled one wrote.pnpm test: 688 passed, 1 skipped.pnpm typecheckandbiome checkare clean.🤖 Generated with Claude Code