-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the DotNetDiagnostics wiki!
-
An infrastructure from inputting, processing to outputting the result.
-
One pipeline will be responsible for controlling all aspects of a dotnet tools. For example, a pipeline for
dotnet-counters
.
- A mean for the pipeline to start processing. For example,
process startup trigger for dotnet-counters
enablesdotnet-counters
at the beginning of the application. - An http endpoint could be treated as a special case of a manual trigger.
- A pipeline can have multiple triggers.
- Triggers are easy to extend to hook up with other systems - alert trigger for example.
- A destination for the data. For example,
Application Insights sink for dotnet-counters
holds the metrics inApplication Insights
. - Multiple sinks could be configured to work simultaneously.
- Sinks are easy to extend to output data to other systems - Elastic Search for example.
-
For scaled applications that has more than 1 instances, an external mechanism is needed to decide which instance get the job to run, and job dispatcher and the counterpart matcher runner is designed to work in that scenario.
-
For example, the
AzureBlobJobDispatcher
allows dispatch the jobs to an Azure Storage. See How to run dotnet counters in multiple instances for more details.
We use dependency injects to putting up the pipeline by code, for example:
// Start the builder for the pipeline
builder.Services.AddDotNetCounters(pipeline => {
pipeline.AddProcessStartTrigger() // Add a trigger to enable dotnet-counters at the beginning of the application
.AddAzureBlobJobDispatcher() // Add job dispatcher so that it will work in multiple-instance environment
.AddLocalFileSink() // Add a sink of local file
.AddAzureBlobSink() // Add a sink of Azure Blob
.AddApplicationInsightsSink() // Add a sink of Application Insights.
});
// Register services for Application Insights, this is required for the app insights sink to work.
builder.Services.AddApplicationInsightsTelemetry();
var app = builder.Build();
...
app.MapDotNetCounters("/dotnet-counters"); // Expose the manual trigger
app.Run();
And that builds a pipeline like this:
For more details about how to use it, check out the wikis below: