diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a443ae..7be92e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ name: CI on: push: - branches: [main, developer-deborah] + branches: [main] pull_request: branches: [main] diff --git a/docs/tracking/outcomes.md b/docs/tracking/outcomes.md index 0e870ac..dc0183a 100644 --- a/docs/tracking/outcomes.md +++ b/docs/tracking/outcomes.md @@ -268,7 +268,7 @@ Outcomes are recorded as span attributes: | Attribute | Description | |-----------|-------------| -| `botanu.outcome` | Status (success/partial/failed/timeout/canceled/abandoned) | +| `botanu.outcome.status` | Status (success/partial/failed/timeout/canceled/abandoned) | | `botanu.outcome.value_type` | What was achieved | | `botanu.outcome.value_amount` | Quantified value | | `botanu.outcome.confidence` | Confidence score | diff --git a/src/botanu/sdk/span_helpers.py b/src/botanu/sdk/span_helpers.py index 2d1889c..e698abd 100644 --- a/src/botanu/sdk/span_helpers.py +++ b/src/botanu/sdk/span_helpers.py @@ -63,7 +63,7 @@ def emit_outcome( span = trace.get_current_span() - span.set_attribute("botanu.outcome", status) + span.set_attribute("botanu.outcome.status", status) if value_type: span.set_attribute("botanu.outcome.value_type", value_type) diff --git a/tests/unit/test_span_helpers.py b/tests/unit/test_span_helpers.py index e5793b8..de8cc9b 100644 --- a/tests/unit/test_span_helpers.py +++ b/tests/unit/test_span_helpers.py @@ -20,7 +20,7 @@ def test_emit_success_outcome(self, memory_exporter): spans = memory_exporter.get_finished_spans() attrs = dict(spans[0].attributes) - assert attrs.get("botanu.outcome") == "success" + assert attrs.get("botanu.outcome.status") == "success" def test_emit_failure_outcome(self, memory_exporter): tracer = trace.get_tracer("test") @@ -29,7 +29,7 @@ def test_emit_failure_outcome(self, memory_exporter): spans = memory_exporter.get_finished_spans() attrs = dict(spans[0].attributes) - assert attrs.get("botanu.outcome") == "failed" + assert attrs.get("botanu.outcome.status") == "failed" assert attrs.get("botanu.outcome.reason") == "timeout" def test_emit_outcome_with_value(self, memory_exporter): @@ -43,7 +43,7 @@ def test_emit_outcome_with_value(self, memory_exporter): spans = memory_exporter.get_finished_spans() attrs = dict(spans[0].attributes) - assert attrs.get("botanu.outcome") == "success" + assert attrs.get("botanu.outcome.status") == "success" assert attrs.get("botanu.outcome.value_type") == "tickets_resolved" assert attrs.get("botanu.outcome.value_amount") == 5.0