Skip to content

Commit

Permalink
Update instrumentation/opentelemetry-instrumentation-tornado/tests/te…
Browse files Browse the repository at this point in the history
…st_instrumentation.py

Co-authored-by: (Eliseo) Nathaniel Ruiz Nowell <[email protected]>
  • Loading branch information
owais and NathanielRN committed Oct 2, 2020
1 parent 65b2d19 commit fbbba1f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Added support for `OTEL_PYTHON_TORNADO_TRACED_REQUEST_ATTRS` ([#1178](https://github.com/open-telemetry/opentelemetry-python/pull/1178))

## Version 0.13b0

Released 2020-09-17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ For example,

::

export OTEL_PYTHON_TONADO_TRACED_REQUEST_ATTRS='uri,query'
export OTEL_PYTHON_TORNADO_TRACED_REQUEST_ATTRS='uri,query'

will extract path_info and content_type attributes from every traced request and add them as span attributes.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,10 @@ def test_traced_attrs(self):
self.fetch("/ping?q=abc&b=123")
spans = self.sorted_spans(self.memory_exporter.get_finished_spans())
self.assertEqual(len(spans), 2)
server = spans[0]
self.assertEqual(server.kind, SpanKind.SERVER)
server_span = spans[0]
self.assertEqual(server_span.kind, SpanKind.SERVER)
self.assert_span_has_attributes(
server, {"uri": "/ping?q=abc&b=123", "query": "q=abc&b=123"}
server_span, {"uri": "/ping?q=abc&b=123", "query": "q=abc&b=123"}
)
self.memory_exporter.clear()

Expand Down

0 comments on commit fbbba1f

Please sign in to comment.