From c9f602366eb798dffb2a1809fbfdaee0cac8bf3d Mon Sep 17 00:00:00 2001 From: Deborah Jacob Date: Thu, 5 Feb 2026 22:26:44 -0500 Subject: [PATCH] docs: use generic LF-style examples throughout documentation Replace domain-specific examples (process_order) with generic placeholders (my_workflow, my_function) following LF/CNCF documentation conventions. Co-Authored-By: Claude Opus 4.5 --- README.md | 10 ++++---- docs/api/decorators.md | 31 ++++++++++++------------ docs/getting-started/quickstart.md | 21 ++++++++-------- docs/index.md | 10 ++++---- docs/integration/auto-instrumentation.md | 8 +++--- docs/integration/kubernetes.md | 10 ++++---- 6 files changed, 44 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index f884850..3605c12 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,12 @@ Botanu adds **runs** on top of distributed tracing. A run represents a single bu ```python from botanu import enable, botanu_use_case -enable(service_name="my-app") +enable(service_name="my-service") -@botanu_use_case(name="process_order") -def process_order(order_id: str): - order = db.get_order(order_id) - result = llm.analyze(order) +@botanu_use_case(name="my_workflow") +def my_function(): + data = db.query(...) + result = llm.complete(...) return result ``` diff --git a/docs/api/decorators.md b/docs/api/decorators.md index 98e5c93..36eb768 100644 --- a/docs/api/decorators.md +++ b/docs/api/decorators.md @@ -29,10 +29,10 @@ from botanu import botanu_use_case ```python from botanu import botanu_use_case -@botanu_use_case(name="process_order") -def process_order(order_id: str): - order = db.get_order(order_id) - result = llm.analyze(order) +@botanu_use_case(name="my_workflow") +def my_function(): + data = db.query(...) + result = llm.complete(...) return result ``` @@ -53,9 +53,9 @@ def process_order(order_id: str): ```python from botanu import use_case -@use_case(name="process_order") -def process_order(order_id: str): - return db.get_order(order_id) +@use_case(name="my_workflow") +def my_function(): + return db.query(...) ``` ## @botanu_outcome @@ -79,19 +79,18 @@ def extract_data(): ```python from botanu import botanu_use_case, botanu_outcome -@botanu_use_case(name="data_pipeline") -def run_pipeline(): - extract_data() - transform_data() - load_data() +@botanu_use_case(name="my_workflow") +def my_function(): + step_one() + step_two() @botanu_outcome() -def extract_data(): - return fetch_from_source() +def step_one(): + return do_work() @botanu_outcome() -def transform_data(): - return apply_transformations() +def step_two(): + return do_more_work() ``` ## See Also diff --git a/docs/getting-started/quickstart.md b/docs/getting-started/quickstart.md index b3190ed..b2fd386 100644 --- a/docs/getting-started/quickstart.md +++ b/docs/getting-started/quickstart.md @@ -26,10 +26,10 @@ enable(service_name="my-service") ```python from botanu import botanu_use_case -@botanu_use_case(name="process_order") -def process_order(order_id: str): - order = db.get_order(order_id) - result = llm.analyze(order) +@botanu_use_case(name="my_workflow") +def my_function(): + data = db.query(...) + result = llm.complete(...) return result ``` @@ -40,16 +40,15 @@ All LLM calls, database queries, and HTTP requests inside the function are autom ```python from botanu import enable, botanu_use_case -enable(service_name="order-service") +enable(service_name="my-service") -@botanu_use_case(name="process_order") -def process_order(order_id: str): - order = db.get_order(order_id) +@botanu_use_case(name="my_workflow") +def my_function(): + data = db.query(...) result = openai.chat.completions.create( model="gpt-4", - messages=[{"role": "user", "content": order.description}] + messages=[{"role": "user", "content": data}] ) - db.save_result(order_id, result) return result ``` @@ -58,7 +57,7 @@ def process_order(order_id: str): | Attribute | Example | Description | |-----------|---------|-------------| | `botanu.run_id` | `019abc12-...` | Unique run identifier | -| `botanu.use_case` | `process_order` | Business use case | +| `botanu.use_case` | `my_workflow` | Business use case | | `gen_ai.usage.input_tokens` | `150` | LLM input tokens | | `gen_ai.usage.output_tokens` | `200` | LLM output tokens | | `db.system` | `postgresql` | Database system | diff --git a/docs/index.md b/docs/index.md index c08dfd0..1f77d25 100644 --- a/docs/index.md +++ b/docs/index.md @@ -51,12 +51,12 @@ Botanu introduces **run-level attribution**: a unique `run_id` that follows your ```python from botanu import enable, botanu_use_case -enable(service_name="my-app") +enable(service_name="my-service") -@botanu_use_case(name="process_order") -def process_order(order_id: str): - order = db.get_order(order_id) - result = llm.analyze(order) +@botanu_use_case(name="my_workflow") +def my_function(): + data = db.query(...) + result = llm.complete(...) return result ``` diff --git a/docs/integration/auto-instrumentation.md b/docs/integration/auto-instrumentation.md index 4df42d0..bec3e44 100644 --- a/docs/integration/auto-instrumentation.md +++ b/docs/integration/auto-instrumentation.md @@ -15,12 +15,12 @@ from botanu import enable, botanu_use_case enable(service_name="my-service") -@botanu_use_case(name="process_order") -def process_order(order_id: str): - order = db.get_order(order_id) +@botanu_use_case(name="my_workflow") +def my_function(): + data = db.query(...) result = openai.chat.completions.create( model="gpt-4", - messages=[{"role": "user", "content": order.description}] + messages=[{"role": "user", "content": data}] ) return result ``` diff --git a/docs/integration/kubernetes.md b/docs/integration/kubernetes.md index e35b949..c71cf4e 100644 --- a/docs/integration/kubernetes.md +++ b/docs/integration/kubernetes.md @@ -253,11 +253,11 @@ from botanu import enable, botanu_use_case enable(service_name="entry-service") -@botanu_use_case(name="process_order") -def process_order(order_id: str): - order = db.get_order(order_id) - result = llm.analyze(order) - notify_service.send(result) +@botanu_use_case(name="my_workflow") +def my_function(): + data = db.query(...) + result = llm.complete(...) + downstream_service.call(result) return result ```