Skip to content

Conversation

@KodrAus
Copy link
Member

@KodrAus KodrAus commented Jan 21, 2026

This PR implements a sample metrics system for the Roastery sample used by seqcli sample ingest. At the moment it supports an exponential histogram called http.request.duration. I haven't used the System.Diagnostics.Metrics infrastructure here because we simulate many HTTP servers in a single process, and didn't want to mess with any shared state. It's also just a very simple system as a starting point for future exploration.

We'll want to take a look at the data model for histograms, property casing and naming, metric naming, and other things.

I haven't invested in test infrastructure yet, because support in Seq itself is still experimental and subject to change.

Copy link
Member

@nblumhardt nblumhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to get the ball rolling.

I think it's worth calling out that, at this point, we probably won't make more RTM builds from the changes currently in dev until we hit 2026.1 (it'd be strange to see @d properties floating around in the Events stream if this were used against a 2025.2 instance).

@KodrAus
Copy link
Member Author

KodrAus commented Jan 21, 2026

Think I’ll tack a few more metrics onto this; orders placed would make a good counter.

new Dictionary<string, object>
{
request = new
{ "http.request.duration", new { kind = "Exponential", unit = "ms", description = "The time taken to fully process a request" } }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seqcli sample ingest produces data with Serilog, rather than OTel, naming conventions. It might be a bit incongruous to see names like http.request.duration and order.shipped in this context. Since it's mock data, perhaps it's worth aiming for consistency and using HttpRequestDuration, OrderShipped etc. here?

@KodrAus KodrAus merged commit 9face8b into datalust:dev Jan 21, 2026
2 checks passed
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