Skip to main content

LogSpanOtherContent

Catch-all content type for any operation that does not fit the other span categories.

Overview

LogSpanOtherContent is a general-purpose span type for operations that don’t map to Model, ModelStream, Embeddings, Function, Tool, Guardrail, or Retrieval. It is wrapped in a LogSpanContent union via the actual_instance pattern.
from adaline_api.models.log_span_other_content import LogSpanOtherContent

Fields

type
str
required
Must be "Other".
input
str
required
The input payload as a JSON string. Must be valid, parseable JSON (the result of json.dumps()).
output
str
required
The output payload as a JSON string. Must be valid, parseable JSON (the result of json.dumps()).

Construction Pattern

All span content is wrapped in LogSpanContent using the actual_instance parameter:
from adaline_api.models.log_span_content import LogSpanContent
from adaline_api.models.log_span_other_content import LogSpanOtherContent

content = LogSpanContent(
    actual_instance=LogSpanOtherContent(
        type="Other",
        input=json.dumps({"key": "value"}),
        output=json.dumps({"result": "ok"}),
    )
)

Example

import json
from adaline_api.models.log_span_content import LogSpanContent
from adaline_api.models.log_span_other_content import LogSpanOtherContent

other_input = {"operation": "cache_refresh", "keys": ["user:123", "user:456"]}
other_output = {"refreshed": 2, "failed": 0}

span.update({
    "status": "success",
    "content": LogSpanContent(
        actual_instance=LogSpanOtherContent(
            type="Other",
            input=json.dumps(other_input),
            output=json.dumps(other_output),
        )
    ),
})