title | summary | reviewed | component | versions | related | |
---|---|---|---|---|---|---|
Metrics |
Collect metric data about endpoint performance using the Metrics plugin |
2024-10-30 |
Metrics |
Metrics:* |
|
Note
This plugin can be enabled and configured with the ServicePlatform Connector plugin.
partial: opentelemetry
The Metrics plugin collects metric data about the performance of running endpoints. This data can be forwarded to a ServiceControl monitoring instance and viewed in ServicePulse.
To see performance monitoring in action, try the standalone demo.
For a full list of the performance metrics captured and their formal definitions, see Metric definitions.
graph LR
subgraph Endpoint
Metrics[Metrics<br>Plugin] -- Metric Data --> MetricsSC[Metrics<br>ServiceControl<br>Plugin]
end
MetricsSC -- Metric Data --> MQ
MQ[Metrics Queue] -- Metric Data --> Monitoring[ServiceControl<br>Monitoring<br>Instance]
Monitoring -- Endpoint<br>performance<br>data --> ServicePulse
To enable collecting metrics in an environment:
- Install a ServiceControl monitoring instance
- Install and configure the ServiceControl Metrics plugin in each endpoint
- (MSMQ Transport only) Install the MSMQ queue length reporter in each endpoint
- View the performance data collected for endpoints in ServicePulse
Note
NServiceBus monitoring setup tutorial is an in-depth, step-by-step tutorial about installing and configuring everything to get the most out of performance monitoring.
A ServiceControl monitoring instance is more lightweight than a regular ServiceControl instance. However, hosting a monitoring instance and production endpoint instances on the same machine is not recommended.
Each endpoint instance collects performance metrics, which are buffered and then sent. A single metrics message contains a batch of values written in a compact binary format, making reporting very lightweight.
A Service Control Monitoring instance processes metrics. Metrics data is stored in RAM only, for at most one hour. Logfiles are still written to disk. A 100MB process can hold metrics data for at least 100 endpoint instances.
The metrics service is only performing simple summing aggregation logic. The CPU usage is low.
- Metrics can be reported to Windows Performance Counters.
- Observing raw metric data allows reporting to any 3rd party metric database.