Skip to content

Commit 2530b5a

Browse files
CopilotJimDaly
andcommitted
Fix BaggageBuilder docstring example to use proper RST format
Co-authored-by: JimDaly <6353736+JimDaly@users.noreply.github.com>
1 parent 88113b8 commit 2530b5a

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

  • libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/middleware

libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/middleware/baggage_builder.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,17 @@ class BaggageBuilder:
4343
propagated in the OpenTelemetry context.
4444
4545
Example:
46-
>>> with BaggageBuilder() \
47-
... .tenant_id("tenant-123") \
48-
... .agent_id("agent-456") \
49-
... .correlation_id("corr-789") \
50-
... .build():
51-
... # Baggage is set in this context
52-
... pass
53-
>>> # Baggage is restored after exiting the context
46+
.. code-block:: python
47+
48+
builder = (BaggageBuilder()
49+
.tenant_id("tenant-123")
50+
.agent_id("agent-456")
51+
.correlation_id("corr-789"))
52+
53+
with builder.build():
54+
# Baggage is set in this context
55+
pass
56+
# Baggage is restored after exiting the context
5457
"""
5558

5659
def __init__(self):

0 commit comments

Comments
 (0)