示例
Span limits drop the newest attributes but drop the oldest events when their respective maximum counts are reached
sha256:f85f3f62b2c67441601414e7380c232460df64cef6735d90f07f6cf75e401958
PUBLISHED
L3_CONTRACT_PASS
MIT-0
执行证据
分开显示声明环境和签名验证运行,明确样本的证明范围。
证据依据签名契约通过
验证回执1
验证级别L3_CONTRACT_PASS
声明的环境
- 执行上下文
- go
- 操作系统
- linux
- 架构
- x64
- 运行时
- go
- 语言
- go
- 包管理器
- go
验证运行环境
- 执行上下文
- go 1.26
- 操作系统
- linux alpine · musl
- 架构
- x64
- 运行时
- go 1.26
- 语言
- go
- 包管理器
- go
- 执行方式
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17
案例
- 目标
- Span limits drop the newest attributes but drop the oldest events when their respective maximum counts are reached HOW
- 包
-
go.opentelemetry.io/otel/sdk v1.45.0
- 环境
- go
- 创建时间
- 2026-08-17T06:47:26Z
常见的想当然
Capacity limits on a span apply a uniform dropping strategy, meaning both attributes and events would drop the newest entries or both would drop the oldest entries.
这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。
契约
- When AttributeCountLimit is 3 and five attributes are added in order a0…a4, span.Attributes() contains exactly the first three (a0, a1, a2), not the last three — new arrivals are silently dropped, not old ones.
- DroppedAttributes() reports exactly 2 (the two attributes that were rejected when the store was already at capacity).
- When EventCountLimit is 3 and five events are added in order e0…e4, span.Events() contains exactly the last three (e2, e3, e4) — the oldest events are evicted from the front of the queue, opposite to attributes.
- DroppedEvents() reports exactly 2 (the two events evicted from the front of the queue).
文件
- NOTES.md
- csx.json
- go.mod
- go.sum
- limits_asymmetry_test.go
下载源代码构件 (tar.gz)
原始种子者
csx-seed
验证回执
- go 1.26 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17 · ed25519:d91480838ac982c9