Skip to content

Add Javalin monitoring tutorial with StatLite - #316

Open
ejboy wants to merge 2 commits into
javalin:masterfrom
ejboy:statlite-tutorial
Open

ejboy wants to merge 2 commits into
javalin:masterfrom
ejboy:statlite-tutorial

Conversation

@ejboy

@ejboy ejboy commented Oct 13, 2026

Copy link
Copy Markdown

Following a discussion on Discord, this PR adds a community tutorial on monitoring a Javalin application with StatLite.

The walkthrough uses Javalin’s Micrometer plugin and a small JSON adapter to show request counts, HTTP errors, average latency, JVM heap, and process CPU history. It links the complete runnable example and integration guide, and includes a dashboard screenshot.

Demo polling uses 10 seconds, with a clear note recommending 30 seconds or longer for production. The example was validated locally, and the rendered tutorial was checked on desktop and mobile.

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for javalin.io ready!

Name Link
🔨 Latest commit f7883f2
🔍 Latest build log https://github.com/javalin/website/actions/runs/39171647203
🌐 Preview https://javalin-pr-316-preview.surge.sh

@tipsy tipsy mentioned this pull request Oct 18, 2026
3 tasks
@tipsy tipsy closed this Oct 18, 2026
@tipsy tipsy reopened this Oct 18, 2026
@tipsy

tipsy commented Oct 18, 2026

Copy link
Copy Markdown
Member

Thanks @ejboy, nice work :)

A few things before merging:

  • Could you mention in the intro that you maintain StatLite? I think that's fair to readers.
  • I'd rather not link to the experiments repo, since it could move or change. Could you add a license and put just the javalin-micrometer example in its own repo? I can create javalin/javalin-statlite-example for it, like we did for the minecraft tutorial. It would also be nice to have the core of StatLiteMetrics inline in the tutorial.
  • I think it could be a fair bit shorter. The 30s/production note shows up a few times, and the statlite.yaml → sed → statlite-demo.yaml setup is a bit confusing. Wouldn't it be simpler to show the demo config and mention 30s once? 🤔

Small thing: the screenshot is ~2900px and 440KB, could you resize it a bit?

@ejboy

ejboy commented Oct 19, 2026

Copy link
Copy Markdown
Author

Hi @tipsy. Thanks for the thoughtful review! All points make sense to me.

  • I'll mention that I maintain StatLite in the introduction.
  • I'd be happy to move the runnable example to javalin/javalin-statlite-example. I also just added an MIT license to our experiments repository. For the new repo, either Apache 2.0 or MIT works for me, whichever you prefer.
  • I'll include the core of StatLiteMetrics inline, keeping the full implementation and maintained integration guide linked.
  • I'll simplify the tutorial and use 30-second polling throughout. The original demo used shorter intervals to speed up testing, but that introduced unnecessary configuration complexity.
  • I'll resize the screenshot.

One question about the example repository: would you be comfortable granting me collaborator access with permission to merge updates? I don't need ownership, but I'd be happy to help maintain the example as Javalin or StatLite evolves. Of course, I'm also fine contributing through PRs if that's your preferred workflow.

@ejboy

ejboy commented Oct 21, 2026

Copy link
Copy Markdown
Author

I've addressed the feedback in the latest revision, including simplifying the configuration, adding the inline adapter code, and resizing the screenshot.

The overall diff is slightly larger because I included the core of StatLiteMetrics inline, as requested. The actual setup and instructions are now simpler and less repetitive.

The remaining step is moving the runnable example to javalin/javalin-statlite-example, as discussed. I'm happy to handle the migration once the repository is created.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants