Skip to content

Add structured log for each request that exceeds the configured response time threshold #754

Closed

Description

@Chucks1093

Summary

Slow requests are currently invisible until they appear in error logs or user reports. A warn-level log for any request exceeding a configurable threshold (default 2000ms) would give operators a proactive signal of performance degradation without requiring external APM tooling.

Scope

  • Measure total request duration in the response middleware
  • Emit a warn-level log when duration exceeds the threshold with fields: method, path, status_code, duration_ms, wallet (if authenticated), slow_threshold_ms
  • Threshold configurable via environment variable SLOW_REQUEST_THRESHOLD_MS (default 2000)
  • Log emitted after the response is sent, not before
  • Do not log the request body or response body

Acceptance Criteria

  • Warn log emitted for requests exceeding the threshold with all six fields
  • Threshold configurable via environment variable
  • Log emitted after response is sent
  • Request and response bodies absent from log
  • Fast requests produce no slow-request log entry

ETA: 12 hours


Coordinate on Telegram

Activity

  1. k-deejah commented on Aug 24, 2026

    @k-deejah

    Hello Maintainer,

    I’d love to work on this issue. I have experience with backend development and API instrumentation, and I understand the importance of adding useful performance visibility without introducing unnecessary logging overhead or exposing sensitive request data.

    I can implement the response-time measurement in the response middleware, add the configurable SLOW_REQUEST_THRESHOLD_MS environment variable with the 2000ms default, and emit a structured warn-level log after the response is sent with the required method, path, status code, duration, threshold, and authenticated wallet fields.

    I’ll also ensure request and response bodies are never included, fast requests produce no log entry, and the behavior is covered with appropriate tests.

    I can deliver a clean, focused implementation within the 12-hour ETA and coordinate on Telegram as needed.

  2. grantfox-oss commented on Aug 24, 2026

    @grantfox-oss

    🦊 GrantFox — @k-deejah has been assigned to this issue as part of the Third Campaign campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #754)
    2. Your PR will be reviewed by the accesslayerorg maintainers

    Good luck! Track your progress on GrantFox.

  3. Stormzy-prog commented on Oct 17, 2026

    @Stormzy-prog

    @Stormzy-prog has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Allow me to professionally implement this task with precision and accuracy.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Stormzy-prog to this issue.

  4. kehindeafolabi006-creator commented on Oct 17, 2026

    @kehindeafolabi006-creator

    @kehindeafolabi006-creator has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    I would love to be on this issue

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @kehindeafolabi006-creator to this issue.

  5. cryptojayfx commented on Oct 17, 2026

    @cryptojayfx

    @cryptojayfx has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi I would like to work this issue

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @cryptojayfx to this issue.

  6. iyanukid2008-pixel commented on Oct 17, 2026

    @iyanukid2008-pixel
    Contributor

    @iyanukid2008-pixel has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    I’ve gone through the issue in detail and have a clear understanding of the expected outcome. I’d like to take this on and approach the implementation with a focus on correctness, maintainability, and consistency with the current codebase.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @iyanukid2008-pixel to this issue.

  7. Zymogen45 commented on Oct 17, 2026

    @Zymogen45
    Contributor

    @Zymogen45 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    I've reviewed the issue thoroughly and can start working on it right away. Looking forward to contributing

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Zymogen45 to this issue.

  8. daviddaniel43000-star commented on Oct 17, 2026

    @daviddaniel43000-star

    @daviddaniel43000-star has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    I’ve carefully reviewed the issue and have a clear understanding of what needs to be addressed. I’d like to take this on and work toward a clean, reliable implementation that aligns with the existing codebase. I’ll keep the changes focused on the requirements, follow the project’s established conventions, and ensure the implementation is properly tested to avoid regressions and maintain overall code quality.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @daviddaniel43000-star to this issue.

  9. DavisVT commented on Oct 17, 2026

    @DavisVT
    Contributor

    @DavisVT has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    pls assign

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @DavisVT to this issue.

  10. AzahasTech commented on Oct 17, 2026

    @AzahasTech

    @AzahasTech has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi maintainers!
    I’d love to help out with this issue. I’ve checked the current codebase/documentation and know exactly what needs to be updated to make this clearer. I will ensure everything aligns perfectly with your existing contribution guidelines.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @AzahasTech to this issue.

  11. Fabluchy commented on Oct 17, 2026

    @Fabluchy

    @Fabluchy has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Can I work on this issue please

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Fabluchy to this issue.

  12. abbaskachia commented on Oct 17, 2026

    @abbaskachia

    @abbaskachia has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi, let me work on this issue please

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @abbaskachia to this issue.

  13. funds0033-cmyk commented on Oct 17, 2026

    @funds0033-cmyk

    @funds0033-cmyk has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Pls kindly assign

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @funds0033-cmyk to this issue.

  14. drips-wave commented on Oct 17, 2026

    @drips-wave

    Congratulations, @DavisVT! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @DavisVT: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  15. grantfox-oss commented on Oct 22, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @DavisVT's PR #1203 was approved and merged by @Chucks1093.

    🏆 @DavisVT: You earned 40 FoxPoints for this contribution! Your current tier: Builder (2,627 total points). Track your full progress on GrantFox.

    👏 Great work, @DavisVT! Keep contributing to accesslayerorg.

  16. drips-wave commented on Oct 22, 2026

    @drips-wave

    This issue has been completed by @DavisVT as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @DavisVT: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

  17. added 2 commits that reference this issue on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardStellar WaveIssues in the Stellar wave programThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions