Carlos Castillo
Carlos Castillo

Reputation: 553

how can I record Service Stack services stats

Is there a plugin for Service Stack that allow me to track services stats, like number of calls, response times, etc ?

We have a lot of services running but we want to start collecting stats for them. Any idea?

Upvotes: 2

Views: 214

Answers (1)

mythz
mythz

Reputation: 143359

There isn't a plugin available to do aggregate request metrics like this that's built into ServiceStack specifically, the closest thing would be the Request Logger Plugin which exposes a simple service that logs all requests and lets you query and introspect past requests.

You could provide a similar service to Request Logger where you could implement your own IRequestLogger like InMemoryRollingRequestLogger which aggregates and persists the information you want.

Another strategy would be instead of building metrics inside and specific to each Web Framework, to instead aggregate logs using a generic HTTP proxy like HAProxy, Nginx or IIS and to instead run analytic's over the HTTP Proxy logs - this is the approach that companies like StackOverflow does.

Upvotes: 1

Related Questions