class LogRecordFlags
LogRecordFlags represents constants used to interpret the LogRecord.flags field, which is protobuf 'fixed32' type and is to be used as bit-fields. Each non-zero value defined in this enum is a bit-mask. To extract the bit-field, for example, use an expression like: (logRecord.flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK)
Protobuf type <code>opentelemetry.proto.logs.v1.LogRecordFlags</code>
Hierarchy
- class \Opentelemetry\Proto\Logs\V1\LogRecordFlags
Expanded class hierarchy of LogRecordFlags
File
-
vendor/
open-telemetry/ gen-otlp-protobuf/ Opentelemetry/ Proto/ Logs/ V1/ LogRecordFlags.php, line 19
Namespace
Opentelemetry\Proto\Logs\V1View source
class LogRecordFlags {
/**
* The zero value for the enum. Should not be used for comparisons.
* Instead use bitwise "and" with the appropriate mask as shown above.
*
* Generated from protobuf enum <code>LOG_RECORD_FLAGS_DO_NOT_USE = 0;</code>
*/
const LOG_RECORD_FLAGS_DO_NOT_USE = 0;
/**
* Bits 0-7 are used for trace flags.
*
* Generated from protobuf enum <code>LOG_RECORD_FLAGS_TRACE_FLAGS_MASK = 255;</code>
*/
const LOG_RECORD_FLAGS_TRACE_FLAGS_MASK = 255;
private static $valueToName = [
self::LOG_RECORD_FLAGS_DO_NOT_USE => 'LOG_RECORD_FLAGS_DO_NOT_USE',
self::LOG_RECORD_FLAGS_TRACE_FLAGS_MASK => 'LOG_RECORD_FLAGS_TRACE_FLAGS_MASK',
];
public static function name($value) {
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf('Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name) {
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf('Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
LogRecordFlags::$valueToName | private static | property | |
LogRecordFlags::LOG_RECORD_FLAGS_DO_NOT_USE | constant | The zero value for the enum. Should not be used for comparisons. Instead use bitwise "and" with the appropriate mask as shown above. |
|
LogRecordFlags::LOG_RECORD_FLAGS_TRACE_FLAGS_MASK | constant | Bits 0-7 are used for trace flags. | |
LogRecordFlags::name | public static | function | |
LogRecordFlags::value | public static | function |