Monitoring
Metrics
By default, operators will emit a collection of performance metrics for each controller.
Grafana Dashboard
Here is a sample dashboard to get started: operator-dashboard.json
Tracing
To enable OpenTelemetry tracing, there is a
AddKubernetesOperatorInstrumentation
extension method to the
TracerProviderBuilder
class.
using Neon.Operator;
using OpenTelemetry;
using OpenTelemetry.Resources;
var builder = Sdk.CreateTracerProviderBuilder()
.SetResourceBuilder(ResourceBuilder.CreateDefault()
.AddService("my-operator", serviceVersion: "1.0.0"))
.AddKubernetesOperatorInstrumentation()
.AddOtlpExporter(
options =>
{
options.ExportProcessorType = ExportProcessorType.Batch;
options.BatchExportProcessorOptions = new BatchExportProcessorOptions<Activity>();
options.Endpoint = new Uri("otel-collector-uri");
options.Protocol = OpenTelemetry.Exporter.OtlpExportProtocol.Grpc;
})
.Build();