Skip to content

Commit d973242

Browse files
CopilotJimDaly
andauthored
Fix BaggageBuilder docstring to use proper RST format (#87)
* Initial plan * Fix BaggageBuilder docstring example to use proper RST format Co-authored-by: JimDaly <6353736+JimDaly@users.noreply.github.com> * Remove trailing whitespace from docstring Co-authored-by: JimDaly <6353736+JimDaly@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JimDaly <6353736+JimDaly@users.noreply.github.com>
1 parent 8946789 commit d973242

File tree

1 file changed

+11
-8
lines changed
  • libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/middleware

1 file changed

+11
-8
lines changed

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)