Span attributes
Marturia indexes a small set of well-known attributes for first-class filtering and aggregation. Anything else you set is preserved verbatim and visible in the span drawer — never silently dropped.
LLM observability (recommended)
The dashboard's "Cost by model", "Top slowest spans", and per-trace token summaries all read these attributes. If you're calling an LLM, set them.
| Attribute | Type | Notes |
|---|---|---|
llm.model |
string | Model identifier exactly as the provider returns it. Example: gpt-4o-mini. |
llm.cost_usd |
double | Cost of this single call in USD. Sum across spans gives the dashboard's spend tile. |
llm.input_tokens |
int | Prompt token count. Provider's billing units, not character count. |
llm.output_tokens |
int | Completion token count. |
llm.temperature |
double | Optional — useful when debugging variance between runs. |
User and session
These let you filter the span list to "everything for this customer" or "this user's last 10 sessions" — the most common debugging starting point.
| Attribute | Type | Notes |
|---|---|---|
user.id |
string | Stable identifier for the end user. Don't use email or PII. |
session.id |
string | Group spans into a session boundary (chat thread, request batch, etc.). |
tenant.id |
string | If you operate as multi-tenant SaaS, label spans with your customer's tenant. |
Errors
Set span.status to ERROR for any failed
operation, and use OTel's standard exception event for stack traces.
The dashboard's error-rate tile counts spans where status = ERROR.
# Python
from opentelemetry.trace import Status, StatusCode
try:
result = call_llm()
except Exception as e:
span.set_status(Status(StatusCode.ERROR, str(e)))
span.record_exception(e)
raise
Semantic conventions
Marturia respects the standard OpenTelemetry semantic conventions — HTTP, database, RPC, messaging. If you're using auto-instrumentation, those attributes already flow through unchanged.
Cardinality
Custom attributes
Any attribute we don't index is still stored verbatim and visible in the span drawer. There's no schema enforcement on custom attributes — name them whatever makes sense to your engineers. The dashboard's free-text search hits them.