Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: CI

on:
push:
branches: [main, developer-deborah]
branches: [main]
pull_request:
branches: [main]

Expand Down
2 changes: 1 addition & 1 deletion docs/tracking/outcomes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion src/botanu/sdk/span_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_span_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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):
Expand All @@ -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

Expand Down
Loading