Skip to main content

Log Query

Loki-based log retrieval. The left-hand Log Management section has two panels, divided by source:

PanelSourceUse Case
Container ConsoleDocker container stdout/stderr (collected by Alloy)Troubleshooting middleware and infrastructure container logs (MySQL / Redis / Kafka, etc.)
Service LogsHAP microservice structured JSON logs (pushed directly by serilog)Troubleshooting business calls and exception stacks; searching by parameter (phone number / user ID / traceID)

Both panels have a keyword search (full-text, case-insensitive) and multi-select dropdown filters at the top. The time window defaults to the last 1 day and can be adjusted at the top right.

Container Console

Select a container name from the Container dropdown (such as script-app-1 or milvus-etcd) to view that container's recent stdout; combine it with keyword search to pinpoint content.

Container Console

Service Logs

Service Logs

Each log entry automatically expands its structured fields below the message body:

2026-05-13 17:43:22.911 {"Message":"SMS service not configured","level":"error"}
⏵ action: /MD.SmsService.Sms/SendMessage
⏵ level: error ⏵ elapsed_ms: 0
⏵ extras: [[Mobile, +8613800138000], [Message, Your verification code is …]]
⏵ stack: SMS service not configured at MD.Sms.GrpcService…

Common fields:

FieldMeaning
service_nameHAP microservice name (smssenderservice / workflow / worksheetservice …)
actionBusiness call method (gRPC path or class method)
detected_levelLevel (info / warn / error)
elapsedmillisecondsCall duration (milliseconds)
extrasBusiness parameters (often include phone numbers, IDs, etc.)
stackException call stack
hostnameService container hostname

Typical usage:

  • By service: select smssenderservice from the Service dropdown.
  • Search by parameter: type 13800138000 in the search box to match both the message body and all fields (phone numbers are usually in extras).
  • Errors only: select error under Level.
  • Trace a single request: search a traceID keyword to string together call logs across services.

Advanced LogQL

For complex queries (aggregation / statistics / regex), go to Grafana Explore (the Grafana icon at the bottom left → Explore) and write LogQL directly:

{service_name="smssenderservice", detected_level="error"} # all errors from the SMS service
{hostname=~".+"} |~ "(?i)13800138000" # search a phone number across all services
sum(rate({hostname=~".+"}[5m])) by (service_name) # per-service 5m log rate

For syntax, see the official LogQL documentation.

note

Logs are retained for 30 days by default (ENV_LOKI_RETENTION=720h), adjustable in ops.yaml / ConfigMap. If disk space is tight, consider configuring an S3/MinIO backend.