utils

package
v0.84.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package utils holds utility related to the model

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TraceID

type TraceID struct {
	Lo uint64
	Hi uint64
}

TraceID is a 128-bit identifier for a trace.

func (TraceID) HexString added in v0.83.0

func (t TraceID) HexString() string

HexString returns the trace ID as lowercase hex.

When Hi == 0 (the high half was not collected, e.g. dd-trace-go pprof labels expose only the lower 64 bits), Lo is emitted unpadded so the result is byte-exact for backend pattern searches against the uint64 lower half.

When Hi != 0 the full 128-bit ID was collected and the result must match the canonical 16-byte form (e.g. APM's 32-char display): Hi is emitted unpadded but Lo is zero-padded to 16 hex chars so leading zeros in Lo — which are part of the real 128-bit ID — are preserved.

func (TraceID) String

func (t TraceID) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL