Monitors network requests and responses, enhancing debugging and analysis of client-server interactions. Features include header sanitization, log retention, and content length management with platform-specific integrations.
To isolate KtorMonitor from release builds, use the ktor-monitor-logging-no-op variant. This ensures the monitor code is not included in production artifact.
Found a bug or have a feature request? File an issue.
🙌 Acknowledgments
Community discussions on Slack — join us in the channel.
Documentation is available at .
API is available at .
KtorMonitor is available also on JetBrains' .
KtorMonitor on .
Some parts of this project are reusing ideas that are originally coming from .
Thanks to ChuckerTeam for Chucker!
Thanks to JetBrains for Ktor and Kotlin!
Medium article:
💸 Sponsors
KtorMonitor is maintained and improved during nights, weekends and whenever team has free time. If you use KtorMonitor in your project, please consider sponsoring us.
🛡️Production Safe: No-Op version to ensure monitoring code is excluded from your production builds.
sanitizeHeader
filter - filter logs for calls matching a predicate.
showNotification - Keep track of latest requests and responses into notification. Default is true. Android and iOS only. Notifications permission needs to be granted.
retentionPeriod - The retention period for the logs. Default is 1h.
maxContentLength - The maximum length of the content that will be logged. After this, body will be truncated. Default is 250_000. To log the entire body use ContentLength.Full.
sanitizeHeader
filter - filter logs for calls matching a predicate.
showNotification - Keep track of latest requests and responses into notification. Default is true. Android and iOS only. Notifications permission needs to be granted.
retentionPeriod - The retention period for the logs. Default is 1h.
maxContentLength - The maximum length of the content that will be logged. After this, body will be truncated. Default is 250_000. To log the entire body use ContentLength.Full.
sanitizeHeader
filter - filter logs for calls matching a predicate.
showNotification - Keep track of latest requests and responses into notification. Default is true. Android only. Notifications permission needs to be granted.
retentionPeriod - The retention period for the logs. Default is 1h.
maxContentLength - The maximum length of the content that will be logged. After this, body will be truncated. Default is 250_000. To log the entire body use ContentLength.Full.
showNotifcation = true
android.permission.POST_NOTIFICATIONS
KtorMonitor
Apps can optionally use the KtorMonitor() Composable directly into own Composable code.