Files
nexus/sreweekly/markdown/448/04-opentelemetry-challenges-handling-long-running-spans-zh.md

21 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# OpenTelemetry 的挑战:处理长生命周期 Span
- **期号**: SRE Weekly Issue #448(2024-10-27)
- **作者**: Hazel Weakly — The New Stack
- **链接**: https://hazelweakly.me/blog/opentelemetry-challenges-handling-long-running-spans/
## 简介
长生命周期 span 可能很难处理,但幸运的是 Hazel Weakly 带来了解释和一些技巧。
## 正文
# [OpenTelemetry 的挑战:处理长生命周期 Span](https://hazelweakly.me#opentelemetry-challenges-handling-long-running-spans)
长生命周期 span 是我在 OpenTelemetry 中遇到的“我们其实并没有一个好的标准解决方案”的最大问题之一。我之前就碰到过它们,而且频率高得奇怪,尤其是当我尝试对前端或移动端系统进行埋点的时候。
不过事实证明,长生命周期 span 的问题,其实和中断的、不完整的或未关闭的 span 的问题非常相似。事实上,它们基本上就是一回事(额外附送一个“好处”:如果你做尾部采样(tail sampling),你的采样决策会在 span 结束之前做出,这会把本来正常的 span 变成残缺损坏的 span,从而让问题雪上加霜)。
总之,我在文章中讨论了这些以及更多内容,还指出了一个来自 [Embrace](https://embrace.io) 的非常酷的解决方案,它以一种兼容 OpenTelemetry 的方式处理了这个问题(提示:听到“write ahead log(预写日志)”这个词你会激动得颤抖吗?如果是,那你绝对应该读一读)。
<https://thenewstack.io/opentelemetry-challenges-handling-long-running-spans/>