Closed Overseven closed 2 weeks ago
[!IMPORTANT]
Review skipped
Draft detected.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yaml
file in this repository. To trigger a single review, invoke the@coderabbitai review
command.You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
The changes introduce telemetry and event-tracking capabilities to the x/warden
and x/intent
modules. This enhancement involves adding event message definitions in Protobuf files, integrating telemetry tracking for various functions, and ensuring the keeper
struct and associated functions can handle these new features. The aim is to improve the observability of the application by tracking key events and metrics, enabling better monitoring and analytics.
File/Path | Change Summary |
---|---|
justfile |
Added telemetry.enabled configuration. |
proto/warden/.../events.proto |
Introduced new message definitions for various events related to space, key, and intent operations. |
warden/testutil/keeper/... |
Added runtime.ProvideEventService() to enhance event handling capabilities in test utilities. |
warden/x/intent/keeper/... |
Integrated telemetry functions to track metrics in various functions handling intents and actions. |
warden/x/warden/keeper/... |
Introduced event and telemetry tracking in functions managing spaces, keys, and keychains. |
wardend/x/intent/module/... |
Enhanced module initialization to include EventService . |
wardend/x/warden/module/... |
Initialized EventService in the module setup. |
CHANGELOG.md |
Documented the addition of events and metrics for the x/intent and x/warden modules. |
sequenceDiagram
participant User
participant Msg_Server
participant WardenKeeper
participant EventService
participant Telemetry
User->>Msg_Server: Invoke NewAction
Msg_Server->>WardenKeeper: Call AddAction
WardenKeeper->>EventService: Emit EventCreateIntent
WardenKeeper->>Telemetry: Increment AddAction Counter
return EventService, Telemetry
return Msg_Server
Msg_Server->>User: Confirm Action Created
Objective (Mention Issue Number) | Addressed | Explanation |
---|---|---|
Add event message definitions for key operations (#222 ) |
✅ | |
Integrate telemetry tracking for intent handling (#222 ) |
✅ | |
Enhance keeper with event handling capabilities (#222 ) |
✅ | |
Document changes in CHANGELOG.md (#222 ) |
✅ |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Hey @Overseven and thank you for opening this pull request! 👋🏼
It looks like you forgot to add a changelog entry for your changes. Make sure to add a changelog entry in the 'CHANGELOG.md' file.
superseeded by #410 #411 #441
closes #222
PR contains events only. Metrics will be added later in this PR
I created these events using three principles:
Events
Warden module events
Related to Spaces:
EventCreateSpace(id, creator, owners_count, admin_intent_id, sign_intent_id)
EventUpdateSpace(space_id, admin_intent_id, sign_intent_id)
EventAddSpaceOwner(space_id, new_owner, owners_count)
EventRemoveSpaceOwner(space_id, removed_owner, owners_count)
Related to Keys:
EventRequestNewKey(id, space_id, keychain_id, intent_id, key_type, creator)
EventRequestNewKeyFulfilled(request_id, public_key)
EventRequestNewKeyRejected(request_id)
EventUpdateKey(key_id, intent_id)
Related to Signatures:
EventRequestNewSignature(id, key_id, signing_data_hash, creator)
EventRequestNewSignatureFulfilled(request_id)
EventRequestNewSignatureRejected(request_id)
Related to Keychains:
EventNewKeychain(id, creator, admin_intent_id, keychain_fees)
EventUpdateKeychain(id, keychain_fees, is_active)
EventAddKeychainParty(id, new_party, party_count)
Intent module events
EventCreateIntent(id, creator)
EventUpdateIntent(id)
Metrics
Action execution time measurement was added.
List of new metrics (counters):
action_count
approve_action.msg.count
revoke_action.msg.count
new_intent.msg.count
update_intent.msg.count
new_keychain.msg.count
add_keychain_party.msg.count
update_keychain.msg.count
new_space.msg.count
update_space.msg.count
add_space_owner.msg.count
remove_space_owner.msg.count
new_key_request.msg.count
update_key_request.msg.count
update_key.msg.count
new_signature_request.msg.count
fulfill_signature_request.msg.count
warden.update_params.msg.count
intent.update_params.msg.count
Summary by CodeRabbit
New Features
x/warden
andx/intent
modules.Documentation
CHANGELOG.md
to reflect new events and telemetry metrics for thex/intent
andx/warden
modules.