Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IDGenerator ¶
type IDGenerator struct{}
IDGenerator 是一个追踪 ID 生成器。
type TracerProvider ¶
type TracerProvider struct {
*sdkTrace.TracerProvider
}
func New ¶
func New() *TracerProvider
New 函数返回一个新创建并已配置的 TracerProvider,该实例尚未关联 SpanProcessor。
默认情况下,返回的 TracerProvider 已按照以下配置进行设置: - 使用 ParentBased(AlwaysSample) 采样器; - 使用基于 Unix 纳秒时间戳和随机数生成的 IDGenerator; - 使用资源默认值 resource.Default(); - 使用默认的 SpanLimits。
通过传入的 opts 参数可用于覆盖这些默认值,并相应地配置返回的 TracerProvider。
Click to show internal directories.
Click to hide internal directories.