Skip to main content

1. Tracing Integrations: Quick Start (Auto-Instrumentation)

Implement trace logging effortlessly with our pre-built tracing integrations. These integrations offer flexibility for further customization as needed.

2. Manual Instrumentation

For applications requiring precise control over trace data, Future AGI provides OpenTelemetry (OTEL) support. This enables custom span creation and modification using the OpenTelemetry Trace API.

Implementation Guide

Step 1: System Requirements

Prerequisites:

Step 2: Set Environment Variables

Step 3: Configuring a Tracer

Setting up an OTEL tracer typically requires complex boilerplate code. Future AGI simplifies this process with our register helper function:

Step 4: Span Implementation

When using our Auto-Instrumenters, span creation is handled automatically. You can further customize these spans as needed.
For complete control over spans you can use manual instrumentation:
Next we create spans by starting spans and defining our name and other attributes:
You can also use start_span to create a span without making it the current span. This is usually done to track concurrent or asynchronous operations.

Implementing Nested Spans

Track sub-operations within larger operations by creating hierarchical span relationships:
In our platform child span appears as a nested component under the parent span.

Decorator Implementation

Use of the decorator is equivalent to creating the span inside process_operation() and ending it when process_operation() is finished. To use the decorator, you must have a tracer instance in scope for your function declaration.