Skip to content
Draft
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
18 changes: 18 additions & 0 deletions content/en/docs/languages/python/propagation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Propagation
description: Context propagation for the Python SDK
weight: 65
cSpell:ignore: sqlcommenter
---

Propagation is the mechanism that moves data between services and processes.
Expand Down Expand Up @@ -110,6 +111,23 @@ if __name__ == '__main__':
From there, when you have a deserialized active context, you can create spans
that are part of the same trace from the other service.

### sqlcommenter

Some Python instrumentations support sqlcommenter, which enriches database query
statements with contextual information. Queries made with sqlcommenter enabled
will have configurable key-value pairs appended to them. For example:

```sql
"select * from auth_users; /*traceparent=00-01234567-abcd-01*/"
```

This supports context propagation between database client and server when
database log records are enabled. For more information, see:

- [OpenTelemetry Python sqlcommenter example](https://opentelemetry-python.readthedocs.io/en/stable/examples/sqlcommenter/README.html)
- [Semantic Conventions - Database Spans](/docs/specs/semconv/database/database-spans/#sql-commenter)
- [sqlcommenter](https://google.github.io/sqlcommenter/)

## Next steps

To learn more about propagation, see
Expand Down
Loading