GhaylStackDocumentationv1.0.2
العربيةWebsite
Operations

Operations

Health, logs and telemetry

Separate liveness from readiness and configure real trace, metric and log export.

Start with the signal you need

GhaylStack combines structured logging with OpenTelemetry instrumentation. Locally, Aspire gives each service a resource view so you can move from a failed request to its process logs and traces. In a deployed installation, you supply and operate the collector and monitoring destination.

Use logs for a concrete event, traces for work across request boundaries, metrics for behavior over time, and health endpoints for availability decisions. A quiet trace screen does not prove that the API is idle: the exporter may be disabled or its endpoint unreachable.

Distinguish liveness and readiness

Endpoint What it checks Response behavior
/health/live API process response without dependency checks 200 with a health payload
/health/ready Registered dependency checks 200 when Healthy; 503 otherwise

Readiness returns entries and durations even on a 503 response, allowing operators to identify the failing check. The endpoints are anonymous and bypass rate limiting in the application; decide their network exposure at your deployment edge.

sh
curl -i https://api.example.com/health/ready

Replace the example origin. Check the body as well as the HTTP code. A running process with unavailable PostgreSQL is a different situation from a process that cannot respond at all.

Enable OTLP export explicitly

The API's base and Production files enable instrumentation but set the configured OTLP exporter to disabled. One supported process-environment configuration is:

sh
export OTEL_SERVICE_NAME='mycompany-api'
export OTEL_EXPORTER_OTLP_ENDPOINT='https://collector.example.com:4317'
export OTEL_EXPORTER_OTLP_PROTOCOL='grpc'

Use your collector's real endpoint, trust and protocol. The implementation recognizes a non-empty standard OTEL_EXPORTER_OTLP_ENDPOINT and enables export even when the configuration flag is false. Aspire supplies standard variables for its own receiver during local orchestration.

Alternatively set OpenTelemetryOptions__Exporter__Otlp__Enabled=true, its Endpoint, and its Protocol on the API process. The supplied Compose file maps the .env endpoint to the configuration endpoint only; add the enabling flag or pass the standard OTEL environment variable into the API container. Filling that .env line alone does not activate the configured exporter.

Inspect useful measurements

HTTP, runtime, database, cache and selected module instrumentation are registered by the platform. Mediator and job instrumentation have independent switches. SQL statements and Redis commands are filtered by default through OpenTelemetryOptions:Data; do not treat this as a guarantee that every custom log is free of sensitive information.

The metric exporter uses a 10-second interval unless OTEL_METRIC_EXPORT_INTERVAL provides a positive override in milliseconds. Allow for export and collector processing before interpreting an empty chart. Serilog logging configuration and an OTLP log sink must also be checked; working traces do not automatically prove working remote logs.

Verify the complete monitoring path

Make an authenticated application request, record its time and service identity, then find it in the expected trace/log destination. Confirm metrics change with a small controlled workload. Restart the API and verify the same service naming convention remains usable.

For an incident, correlate request failures with readiness, migration state and dependency logs. Record deployment and tenant context without copying tokens or report bodies. See background jobs and auditing for domain-specific signals.

Sources

Health implementation, telemetry registration, telemetry options, Production logging and Compose environment.

View MarkdownBack to top

Search documentation

Use ↑ ↓ to move, Enter to open and Esc to close.