TraceFlags

zio.blocks.telemetry.TraceFlags
See theTraceFlags companion object
final class TraceFlags(val byte: Byte) extends AnyVal

Represents OpenTelemetry trace flags - a single byte where bit 0 represents the sampled flag.

Implemented as an AnyVal for zero heap allocation when used as a field in a case class.

Value parameters

byte

the underlying byte value

Attributes

Companion
object
Source
TraceFlags.scala
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def isSampled: Boolean

Checks if the sampled flag (bit 0) is set.

Checks if the sampled flag (bit 0) is set.

Attributes

Source
TraceFlags.scala
def toByte: Byte

Returns the underlying byte value.

Returns the underlying byte value.

Attributes

Source
TraceFlags.scala
def toHex: String

Converts this trace flags to a 2-character lowercase hexadecimal string.

Converts this trace flags to a 2-character lowercase hexadecimal string.

Attributes

Source
TraceFlags.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
TraceFlags.scala
def withSampled(sampled: Boolean): TraceFlags

Creates a new TraceFlags with the sampled flag set or cleared.

Creates a new TraceFlags with the sampled flag set or cleared.

Attributes

Source
TraceFlags.scala

Concrete fields

val byte: Byte

Attributes

Source
TraceFlags.scala