Add stats for service endpoints using existing data.
For each service endpoint (e.g. posts to the xinventory service), a stat is available which shows the number of requests received and moving average per second The full name is "service.<http-method>:<path>.requests (e.g. service.POST:/xinventory.requests)0.8.0.3
parent
26916806db
commit
2f7d950ead
|
@ -26,6 +26,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using OpenSim.Framework.Monitoring;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Servers.HttpServer
|
namespace OpenSim.Framework.Servers.HttpServer
|
||||||
{
|
{
|
||||||
|
@ -61,6 +62,19 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
Description = description;
|
Description = description;
|
||||||
m_httpMethod = httpMethod;
|
m_httpMethod = httpMethod;
|
||||||
m_path = path;
|
m_path = path;
|
||||||
|
|
||||||
|
StatsManager.RegisterStat(
|
||||||
|
new Stat(
|
||||||
|
"requests",
|
||||||
|
"requests",
|
||||||
|
"Number of requests received by this service endpoint",
|
||||||
|
"requests",
|
||||||
|
"service",
|
||||||
|
string.Format("{0}:{1}", httpMethod, path),
|
||||||
|
StatType.Pull,
|
||||||
|
MeasuresOfInterest.AverageChangeOverTime,
|
||||||
|
s => s.Value = RequestsReceived,
|
||||||
|
StatVerbosity.Debug));
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual string Path
|
public virtual string Path
|
||||||
|
|
Loading…
Reference in New Issue