Skip to content

Commit

Permalink
Update Changelog and fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
oxeye-nikolay committed Sep 23, 2021
1 parent 7339ecb commit adad454
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `opentelemetry-instrumentation-asgi`, `opentelemetry-instrumentation-aiohttp-client`, `openetelemetry-instrumentation-fastapi`,
`opentelemetry-instrumentation-starlette`, `opentelemetry-instrumentation-urllib`, `opentelemetry-instrumentation-urllib3` Added `request_hook` and `response_hook` callbacks
([#576](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/576))
- `opentelemetry-instrumentation-pika` added RabbitMQ's pika module instrumentation.
([#680](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/680))

### Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@
API
---
"""
# pylint: disable=import-error

from .pika_instrumentor import ( # pylint: disable=unused-argument
PikaInstrumentor,
)
from .version import __version__ # pylint: disable=unused-argument
from .pika_instrumentor import PikaInstrumentor
from .version import __version__

__all__ = ["PikaInstrumentor", "__version__"]
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,13 @@ def test_get_span(
properties = mock.MagicMock()
task_name = "test.test"
get_value.return_value = None
span = utils._get_span(tracer, channel, properties, task_name)
_ = utils._get_span(tracer, channel, properties, task_name)
extract.assert_called_once()
generate_span_name.assert_called_once()
tracer.start_span.assert_called_once_with(
context=extract.return_value, name=generate_span_name.return_value
)
enrich_span.assert_called_once()
assert any(
span in call.args or span in call.kwargs.values()
for call in enrich_span.call_args_list
), "The returned span was not enriched using enrich_span!"

@mock.patch("opentelemetry.context.get_value")
@mock.patch("opentelemetry.instrumentation.pika.utils._generate_span_name")
Expand Down

0 comments on commit adad454

Please sign in to comment.