Skip to content

Commit

Permalink
updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
galbash committed Apr 8, 2024
1 parent 81bdcec commit 59d3b1b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
### Added

- `opentelemetry-instrumentation-pika` Instrumentation for `channel.consume()` function
- `opentelemetry-instrumentation-pika` Instrumentation for `channel.consume()` (supported
only for global, non channel specific instrumentation)
([#2397](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2397)))

### Breaking changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ def consume_hook(span: Span, body: bytes, properties: BasicProperties):
PikaInstrumentor.instrument_channel(channel, publish_hook=publish_hook, consume_hook=consume_hook)
Consumer Instrumentation
-----
For consumer instrumentation, pika supports two consuming modes:
* Consumers using the `basic_consume` method which accepts a callback. This is supported for global instrumentation
(`PikaInstrumentor().instrument()`) as well channel specific instrumentation (`PikaInstrumentor().instrument_channel(channel)`)
* Consumers using the `consume` method which returns a generator over messages. This is supported for global
instrumentations only (`PikaInstrumentor().instrument()`)
API
---
"""
Expand Down

0 comments on commit 59d3b1b

Please sign in to comment.