Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.bentolabs.ai/llms.txt

Use this file to discover all available pages before exploring further.

properties lets you attach arbitrary key/value pairs to a span. They pass through as-is (no namespace prefix) so they remain readable by other OTel backends if you ever switch.

Usage

import bentolabs_sdk.analytics as bento

bento.track_ai(
    event="search",
    properties={
        "feature": "semantic_search",
        "experiment": "v3",
        "ranking_model": "ce-3",
    },
    user_id="u1",
)
You can also pass properties to:
  • bento.begin(properties=...)
  • interaction.update(properties=...)
  • interaction.finish(properties=...)
  • bento.tool_span(name, properties=...)
  • interaction.tool_span(name, properties=...)

Type fidelity

Property values keep their type so downstream filters and aggregates work correctly:
You passSpan seesWhy it matters
"foo" (str)string
42 (int)intdashboard can experiment_id > 100
3.14 (float)float
True (bool)booldashboard can is_premium = true
[1, 2, 3] (homogeneous list)array
{"nested": "x"} or [1, "two"] (dict / mixed)JSON string (fallback)OTel doesn’t natively support these
Don’t put gen_ai.*, input.value, or output.value keys in properties. The SDK-managed kwargs are written after properties and will overwrite them. Use the dedicated kwargs (user_id, model, provider, input, output, convo_id) instead.

When to use properties vs built-in kwargs

Use a built-in kwargUse properties
User, conversation, model, provider, input, outputAnything else: feature flags, experiment buckets, latency, retrieved-chunk count
The dashboard has dedicated filters and breakdowns for theseBecomes a generic filter/breakdown dimension
If a property turns out to be widely useful, it’ll likely get promoted to a first-class column later. For now, anything in properties lands in spans.attributes as JSONB and is queryable from custom dashboards.