Skip to main content

Module util

Module util 

Source

Structs§

ProfileArgs
PyHelperFuncs

Enums§

DataType
FileName
Status

Constants§

DEFAULT_VERSION
MISSING

Traits§

ProfileBaseArgs
ValidateAlertConfig

Functions§

create_feature_map
depythonize_object_to_value
get_utc_datetime
is_pydantic_basemodel
Checks if python object is an instance of a Pydantic BaseModel
is_pydict
json_to_pyobject
json_to_pyobject_value
otel_value_to_serde_value
Converts OpenTelemetry AnyValue to serde_json::Value
pydantic_to_value
Helper for converting a pydantic model to a pyobject (pydict) we are keeping the type as Bound<’py, PyAny> so that is is compatible with pyobject_to_json
pydict_to_otel_keyvalue
Converts a Python dict to flattened OpenTelemetry KeyValue pairs. Nested dicts are flattened using dot notation (e.g., “user.name”, “user.email”). This is the standard approach for OpenTelemetry span events and attributes.
pyobject_to_json
pyobject_to_otel_value
Converts a Python object to an OpenTelemetry Value. Complex types (dicts, nested structures) are serialized to JSON strings.
pyobject_to_tracing_json
Converts a Python object to a tracing-compatible JSON Map, handling Pydantic BaseModel objects. This will also truncate long string values to the specified max_length.
scouter_version