observability

Configure Serilog, Prometheus, and OpenTelemetry for .NET on OpenShift.

7|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/rloisell/rl-agents-n-skills --skill observability-rloisell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: observability
Source: https://github.com/rloisell/rl-agents-n-skills/tree/main/observability
Command: npx skills add https://github.com/rloisell/rl-agents-n-skills --skill observability-rloisell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a consistent, production-ready approach to structured logging, metrics, tracing, and health checks so teams can reliably monitor, diagnose, and alert on .NET services running on Emerald OpenShift without leaking PII or losing observability context.

Core Features & Use Cases

  • Structured Logging: Serilog JSON output to stdout with environment and machine enrichment and log level standards that avoid leaking sensitive data.
  • Health Checks: Liveness and readiness endpoints with readiness tagging and container HEALTHCHECK guidance for OpenShift.
  • Metrics & Tracing: Prometheus-compatible /metrics exposure via prometheus-net and pod annotations for Emerald discovery, plus OpenTelemetry instrumentation and OTLP exporter configuration for distributed tracing.
  • Use Case: Instrument an ASP.NET Core API to emit compact JSON logs for centralized aggregation, expose Prometheus metrics for scaling and alerting, and record traces to an OTLP collector for performance diagnosis.

Quick Start

Configure my ASP.NET Core service to write Serilog JSON to stdout, expose /metrics for Prometheus scraping, enable OpenTelemetry tracing with an OTLP exporter, and add liveness/readiness health checks.

Frequently Asked Questions about observability

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Serilog JSON logging to stdout for an ASP.NET Core service?

Configure Serilog JSON logging to stdout by enforcing log level standards that prevent PII leakage while enriching logs with environment and machine context for centralized aggregation.

What is the best way to expose Prometheus metrics and health checks in .NET on OpenShift?

Expose Prometheus metrics and health checks by implementing liveness and readiness endpoints with prometheus-net, adding pod annotations for Emerald discovery, and configuring container HEALTHCHECK guidance for OpenShift.

How do I set up OpenTelemetry tracing with an OTLP exporter in a .NET application?

Set up OpenTelemetry tracing with an OTLP exporter by applying distributed tracing instrumentation to your ASP.NET Core service, recording performance traces and sending them to an OTLP collector.

Does this observability configuration support avoiding sensitive data leakage in logs?

Yes, this observability configuration supports avoiding sensitive data leakage by enforcing PII-free logging level standards within the Serilog JSON formatting to ensure compliant stdout output.

Can I use this to add both liveness and readiness health checks to my ASP.NET Core containers?

Yes, you can use this to add liveness and readiness health checks to ASP.NET Core containers by utilizing readiness tagging and applying specific container HEALTHCHECK guidance for OpenShift deployments.