主题: observability
-
生产环境中的持续性能剖析:常开的采样剖析能回答什么问题
持续性能剖析(continuous profiling)会系统性地随时间采集 CPU 和内存剖析数据,并以带标签的序列形式存储,这样团队就能查询昨天整个集群中哪个函数消耗的 CPU 最多、或两个版本之间发生了什么变化之类的问题;采样式剖析器的开销足够低,可以一直保持开启,而 Go 的 /debug/pprof/ 之类的运行时端点或 eBPF 代理则负责提供这些剖析数据。
-
在低流量服务中,哪种链路采样策略能让罕见故障依然可见?
开放问题:现有的采样指南大多针对每秒成千上万条链路(trace)的服务而写,在那种规模下,1% 的采样比例仍具有代表性;但对于每秒只有几个请求的服务,头部采样(head sampling)、尾部采样(tail sampling)、按路由设置的采样率与数据保留策略要如何组合,才能以团队可以接受的成本,保住那条每周才出现一次的故障链路?
-
根据症状而非原因触发值班呼叫的告警
针对用户实际体验告警,例如错误率、延迟、可用性和数据新鲜度;将阈值与目标绑定,按紧急程度分派,并把每条嘈杂告警转化为修正或删除。
-
Which observability signals should a JVM or .NET service emit by default, and at what overhead?
Open question: both runtimes ship built-in telemetry (Flight Recorder and GC logging on the JVM; EventPipe counters and dotnet-trace on .NET) and both have OpenTelemetry auto-instrumentation, but there is little shared evidence on which of these should be always-on in production, what they cost, and which ones actually shortened incidents.
-
Log sampling for high-volume events: keep every error, sample the repetitive lines
Sampling drops a fraction of similar log events on purpose; the useful forms are one-in-N, burst-then-rate per period, per-level rules that leave warnings and errors untouched, and pipeline sampling keyed on a request ID so a whole request is kept or dropped together, with the applied rate written into the surviving events.
-
Verteiltes Tracing in Umrissen: Spans, Eltern-Kennungen und W3C Trace Context
Ein Trace ist ein Baum aus Spans, jeder mit Trace-Kennung, eigener Span-Kennung, Eltern-Span-Kennung, Zeitstempeln, Attributen und Status; der W3C-Header traceparent trägt Trace-Kennung, Eltern-Kennung und ein Sampled-Flag über Prozessgrenzen, und ein Dienst, der beide Header nur weiterreicht, hält Traces trotzdem zusammen.
-
journald forwarding and remote collection: ForwardToSyslog, systemd-journal-upload/-remote, and rate limits
journald can hand its entries to a local syslog daemon with ForwardToSyslog=, or ship them directly over HTTPS with systemd-journal-upload to a systemd-journal-remote listener that writes its own journal files. Both paths are subject to journald's own per-service rate limiting, which drops excess messages once a burst threshold is crossed and records only a count of what it dropped.
-
设计运维仪表板:每个面板一个问题,每类受众一个屏幕
从响应人员必须回答的问题出发,为每个问题安排一个面板,按从总体到具体的顺序排列,统一单位和坐标轴,使用模板变量代替副本,将每条值班呼叫告警链接到所需仪表板,并把仪表板定义纳入版本控制。
-
Windows Event Forwarding: a source-initiated subscription, wecutil, and the EventLog Readers group
In a source-initiated WEF subscription, each source computer pulls its configuration from a collector via Group Policy and pushes matching events to it; wecutil manages the subscription on the collector, and forwarding the Security log needs the NETWORK SERVICE account added to the EventLog Readers group on every source.
-
在智能体任务中贯穿使用关联标识符
区分任务身份、各次尝试和分布式追踪上下文,以便在不记录敏感载荷的情况下追踪重试。
-
Alarme sinnvoll gestalten: wenige Meldungen, jede mit einem nächsten Schritt
Ein Alarm, der jemanden weckt, muss dringend, handlungsleitend und für Nutzer spürbar sein; alles andere ist ein Ticket. Symptome an der Nutzerkante alarmieren, Schwellen an Ziele und die Verbrauchsrate des Fehlerbudgets binden, eine Wartezeit gegen Flackern setzen, das Runbook verlinken und jeden Alarm ohne Handlung wöchentlich abschaffen oder nachjustieren.
-
Alert hygiene for host monitoring: rate over threshold, failed units, and duration windows
A page should mean a human must act now; a host disk approaching full should page on its fill rate, not a fixed percentage that a slow-growing partition can sit near for months, and a threshold crossed for an instant should not page at all. Google's SRE materials on paging discipline and multiwindow alerting give the reasoning; this article applies it to the host signals covered in this series.
-
可重放的智能体运行日志:记录每次模型和工具调用
只有把每个模型请求、响应、工具调用和工具结果按顺序记录下来,并附带标识符和参数,才能调试智能体运行。OpenTelemetry GenAI 语义约定规定字段名,可重放日志则允许在无需支付新一轮运行费用的情况下复现故障。
-
Metric naming and label cardinality: units in the name, bounded values in the labels
Prometheus naming conventions put an application prefix, a base unit and a _total suffix for counters into the metric name and reserve labels for bounded dimensions; every distinct label combination is its own time series, so user IDs, raw URLs and error messages in labels multiply storage until the server degrades.
-
Forwarding syslog with rsyslog over TCP behind a disk-assisted queue
A drop-in file under /etc/rsyslog.d/ can forward every message to a central collector over TCP while a disk-assisted action queue buffers messages locally, so a collector outage or network blip does not drop logs. rsyslogd -N1 validates the syntax before the change is applied.
-
Correlation versus causation in incident and operations data
A correlation coefficient measures how two series move together; it says nothing about which one drives the other, whether a third factor such as traffic drives both, or whether the data were selected by the outcome. Plot first, condition on the obvious common causes, check timing, and confirm with an intervention such as a flag or canary before acting.
-
The RED method for request-driven services, with exemplars that link a slow bucket to a trace
Instrument every request-handling service identically with rate, errors and duration: one counter with route, method and status labels and one duration histogram; when tracing exists, attach exemplars (a trace ID with a recorded value) to the histogram so a slow bucket on the dashboard opens the trace that landed there.
-
日志轮转与保留期限限制
每一层的日志都必须限制大小和保存时间,包括应用、容器运行时、代理和系统日志。保留期限应根据调试与法律需求选择,而不是“一切都保存”。
-
Synthetic monitoring and uptime checks: probing from outside what users see
A synthetic check sends a scripted request from outside the system at a fixed interval and records whether the response was correct and how long it took; it is black-box monitoring in the SRE sense, catches failures that internal instrumentation cannot see (DNS, TLS, the load balancer, an expired domain), and must be probed from more than one place before it pages anyone.
-
在入口处一次性配置 logging 模块
库只获取日志记录器,不配置处理器;应用在启动时统一配置一次处理器、级别和格式,使输出集中受控,并避免重复日志。
机器可读: JSON