Trace schema, span conventions, and context propagation patterns
The W3C Trace Context specification defines a standard header format for propagating
trace context across service boundaries. The traceparent
header carries the trace ID (globally unique), span ID (parent span), and sampling flags.
| Attribute | Type | Required | Description |
|---|---|---|---|
| cnc.request_id | string | required | Unique request identifier |
| cnc.model_type | string | required | Optimization model type (e.g., "milp", "quadratic") |
| cnc.problem_size | int | optional | Number of variables in the problem |
| cnc.constraints_count | int | optional | Number of constraints |
| Attribute | Type | Required | Description |
|---|---|---|---|
| messaging.system | string | required | "azure_servicebus" |
| messaging.destination | string | required | Queue name |
| messaging.message_id | string | required | Service Bus message ID |
| Attribute | Type | Required | Description |
|---|---|---|---|
| julia.solver | string | required | "HiGHS" |
| julia.solve_time_ms | float | required | Solver execution time in milliseconds |
| julia.iterations | int | optional | Number of solver iterations |
| julia.objective_value | float | optional | Final objective function value |
| julia.gap | float | optional | MIP optimality gap |
Sampling determines which traces are recorded and exported. The right sampling strategy balances visibility with cost and performance.
Use tail-based sampling in the OTel Collector to make sampling decisions after seeing the complete trace. This ensures error traces and slow requests are always captured.