luckyframework / luckyframework/lucky

Add more info to the RequestCompleteEvent

Open
#1,844 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Crystal
Stars
2.7k
Forks
172
PR merge metrics
No merged PRs in 30d

Description

The LogHandler publishes a Pulsar event `RequestCompleteEvent` which lets you know the duration a request took. This is something you'd use in Breeze to store how long each request took. I think it would be great to add in `context` as well since we already have access to it. Then you could subscribe and send off your own events. Without access to `context` from the event, you only know how long something took... You don't know *what* that something was.

https://github.com/luckyframework/lucky/blob/8eef897212ebbcbb6f0735ae3d8c3381f44b2449/src/lucky/log_handler.cr#L38

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/lucky/log_handler.cr around the linked RequestCompleteEvent publication and trace how context is available there. Extend the event so subscribers can access that context, then run the project's relevant tests to verify the event still publishes correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
crystal
Domain
backend, observability-sre
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.