Skip to content

TraceqlFilter🔗

Definition🔗

class TraceqlFilter:
    # Uniquely identify the filter, will not be used in the query generation
    id_val: str
    # The tag for the search filter, for example: .http.status_code, .service.name, status
    tag: typing.Optional[str]
    # The operator that connects the tag to the value, for example: =, >, !=, =~
    operator: typing.Optional[str]
    # The value for the search filter
    value: typing.Optional[typing.Union[str, list[str]]]
    # The type of the value, used for example to check whether we need to wrap the value in quotes when generating the query
    value_type: typing.Optional[str]
    # The scope of the filter, can either be unscoped/all scopes, resource or span
    scope: typing.Optional[tempo.TraceqlSearchScope]

Methods🔗

to_json🔗

Converts this object into a representation that can easily be encoded to JSON.

def to_json() -> dict[str, object]

from_json🔗

Builds this object from a JSON-decoded dict.

@classmethod
def from_json(data: dict[str, typing.Any]) -> typing.Self

See also🔗