Effective observability is essential for building reliable workflows. Understanding and monitoring the execution of workflows and their tasks helps ensure correctness and efficiency. This section describes methods to gain insights into your workflow’s execution.
Tilebox Workflows is designed with OpenTelemetry in mind, which provides a set of APIs and libraries for instrumenting, generating, collecting, and exporting telemetry data (metrics, logs, and traces) in distributed systems.
Tilebox Workflows currently supports OpenTelemetry for tracing and logging, with plans to include metrics in the future.
Tilebox exports telemetry data using the OpenTelemetry Protocol. This allows you to send telemetry data to any OpenTelemetry-compatible backend, such as Axiom or Jaeger.
Tilebox Workflows has built-in support for Axiom, a cloud-based observability and telemetry platform. The examples and screenshots in this section come from this integration.To get started, sign up for a free Axiom account, create an axiom dataset for traces and logs, and generate an API key with ingest permissions for those datasets.You can then configure Tilebox to export traces and logs to Axiom using configure_otel_tracing_axiom and configure_otel_logging_axiom.
Another popular option is Jaeger, a popular distributed tracing system. You can use the OpenTelemetry Collector to collect telemetry data from Tilebox Workflows and export it to Jaeger.An all-in-one Jaeger environment can be spun up using Docker:
You can then configure Tilebox to export traces to Jaeger using configure_otel_tracing.
Copy
Ask AI
from tilebox.workflows import Clientfrom tilebox.workflows.observability.tracing import configure_otel_tracing# your own workflow:from my_workflow import MyTaskdef main(): configure_otel_tracing( # export traces to the local Jaeger instance endpoint="http://localhost:4318", ) # the following task runner generates traces for executed tasks and # exports trace and span data to the specified endpoint client = Client() runner = client.runner(tasks=[MyTask]) runner.run_forever()if __name__ == "__main__": main()
The generated workflow traces can then be viewed in the Jaeger UI at http://localhost:16686.