Apache Airflow DAG Patterns
Build production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workflows, or scheduling batch jobs.
5,452,940 AI resources indexedWorking toward the world’s largest AI resource index.
OpenTelemetry tracing for agent observations and SPI verification
---
name: otel-tracing-8864a600f4d1
description: OpenTelemetry tracing for agent observations and SPI verification
version: 1.0.0
---
# OpenTelemetry Tracing Skill
**Trit**: -1 (VALIDATOR)
**Bundle**: infrastructure
**Role**: Verification of execution traces and distributed contexts.
## Overview
This skill provides a standard interface for emitting OpenTelemetry spans from agent actions. It is crucial for:
1. **SPI Verification**: Tracing execution paths to ensure determinism.
2. **Debugging**: Visualizing distributed agent interactions.
3. **Performance**: Measuring latency in ACSet bridge operations.
## Integration
### Python
```python
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import ConsoleSpanExporter, SimpleSpanProcessor
def init_tracer(service_name="agent-skill"):
provider = TracerProvider()
processor = SimpleSpanProcessor(ConsoleSpanExporter())
provider.add_span_processor(processor)
trace.set_tracer_provider(provider)
return trace.get_tracer(service_name)
tracer = init_tracer()
with tracer.start_as_current_span("agent_action") as span:
span.set_attribute("agent.trit", -1)
span.set_attribute("agent.id", "minus_validator")
# ... perform action ...
```
## SPI Verification Pattern
To verify Strong Parallelism Invariance (SPI), traces must be deterministic given a seed.
```python
def verify_spi_trace(seed, trace_id):
expected_hash = compute_spi_hash(seed)
actual_hash = hash(trace_id)
assert expected_hash == actual_hash
```
## Neo4j Mapping
* **Nodes**: `Span`, `Trace`
* **Relationships**: `PARENT_OF`, `NEXT_SIBLING`
* **Properties**: `start_time`, `end_time`, `attributes` (JSON)
## Commands
* `trace-agent <agent_id>`: Start a trace for an agent.
* `export-traces`: Dump traces to JSON.
---
name: otel-tracing-8864a600f4d1
description: OpenTelemetry tracing for agent observations and SPI verification
version: 1.0.0
---
# OpenTelemetry Tracing Skill
**Trit**: -1 (VALIDATOR)
**Bundle**: infrastructure
**Role**: Verification of execution traces and distributed contexts.
## Overview
This skill provides a standard interface for emitting OpenTelemetry spans from agent actions. It is crucial for:
1. **SPI Verification**: Tracing execution paths to ensure determinism.
2. **Debugging**: Visualizing distributed agent interactions.
3. **Performance**: Measuring latency in ACSet bridge operations.
## Integration
### Python
```python
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import ConsoleSpanExporter, SimpleSpanProcessor
def init_tracer(service_name="agent-skill"):
provider = TracerProvider()
processor = SimpleSpanProcessor(ConsoleSpanExporter())
provider.add_span_processor(processor)
trace.set_tracer_provider(provider)
return trace.get_tracer(service_name)
tracer = init_tracer()
with tracer.start_as_current_span("agent_action") as span:
span.set_attribute("agent.trit", -1)
span.set_attribute("agent.id", "minus_validator")
# ... perform action ...
```
## SPI Verification Pattern
To verify Strong Parallelism Invariance (SPI), traces must be deterministic given a seed.
```python
def verify_spi_trace(seed, trace_id):
expected_hash = compute_spi_hash(seed)
actual_hash = hash(trace_id)
assert expected_hash == actual_hash
```
## Neo4j Mapping
* **Nodes**: `Span`, `Trace`
* **Relationships**: `PARENT_OF`, `NEXT_SIBLING`
* **Properties**: `start_time`, `end_time`, `attributes` (JSON)
## Commands
* `trace-agent <agent_id>`: Start a trace for an agent.
* `export-traces`: Dump traces to JSON.
Imported from the listed AgentSkill.sh category. Complete supplied package files and notices are retained. Required external tools and credentials are not installed. No bundled code was executed during import. Individual agent task behavior has not been tested.