feat(events): add monitor_event for invoice contract observability#258
Open
Nuwe10 wants to merge 1 commit into
Open
feat(events): add monitor_event for invoice contract observability#258Nuwe10 wants to merge 1 commit into
Nuwe10 wants to merge 1 commit into
Conversation
Closes Stellar-split#180 - Add monitor_event() to events.rs with topic (symbol_short!("monitor"), function_name) and data (invoice_id, actor, ledger_timestamp) - Emit monitor_event as the first operation in create_invoice, pay, release, and refund - Add four tests verifying monitor event is emitted with correct function name for each entry point
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
Adds a
monitor_eventfunction toevents.rsand emits it as the first operation in all four public entry points (create_invoice,pay,release,refund), enabling real-time contract health observability for indexers and dashboards.Changes
monitor_event(env, function, invoice_id, actor, timestamp)with topic(symbol_short!("monitor"), function_name)and data(invoice_id, actor_address, ledger_timestamp)monitor_eventas the first operation increate_invoice,pay,release, andrefundValidation
Closes #180