Initial metric support in sample ingest#440
Conversation
nblumhardt
left a comment
There was a problem hiding this comment.
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).
|
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" } } |
There was a problem hiding this comment.
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?
This PR implements a sample metrics system for the
Roasterysample used byseqcli sample ingest. At the moment it supports an exponential histogram calledhttp.request.duration. I haven't used theSystem.Diagnostics.Metricsinfrastructure 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.