Commit Graph

32 Commits

Author SHA1 Message Date
f-kanari-safie 0a03c9abf2
refactor(tornado): replaces SpanAttributes by semconv attributes (#3582)
* refactor: fix import paths

* fix imports

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-06-16 12:09:38 +00:00
Jordan Gibbings 560fd04962
fix(tornado): ensure reading future.result() won't throw an exception in client.py _finish_tracing_callback (#2563) 2024-08-19 07:59:24 -07:00
Diego Hurtado 8d43618798
Remove [test] package from tornado instrumentation (#2280)
Fixes #2223
2024-03-15 16:50:17 +00:00
Maciej Nachtygal 743ac64661
Issue #1757 - Update HTTP server/client instrumentation span names (#1759)
Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
2023-06-16 00:21:05 +02:00
Diego Hurtado bcf770d079
Use HTTP mock server for tornado tests (#1855)
* Use HTTP mock server for tornado tests

Fixes #1681

* Fix lint
2023-06-13 10:01:02 +00:00
Srikanth Chekuri 79d00ee7d3
Fix CI Failure (#1680)
* Fix CI Failure

* Actually fix

* Should be fixed now?

* Update tox.ini

* Disable test

* pypy3.7
2023-02-17 10:32:10 -06:00
Tom de Bruijn 78874df5c2
Fix install of Python 3.10 on GitHub Actions (#1609)
* Fix install of Python 3.10 on GitHub Actions

In PR #1604 the Python version was upgraded to Python 3.10 to fix a
local issue on M1 MacBooks.

The GitHub Action workflows now exit with the following message for the
docker-tests, spellcheck and lint checks, skipping these checks.

```
lint create: /home/runner/work/opentelemetry-python-contrib/opentelemetry-python-contrib/.tox/lint
SKIPPED: InterpreterNotFound: python3.10
___________________________________ summary ____________________________________
SKIPPED:  lint: InterpreterNotFound: python3.10
  congratulations :)
```

Upgrade the Python version in the GitHub Actions workflow to fix this.

* Fix YAML interpretation of Python 3.10

* Upgrade Docker tests dependencies

Upgrade the asyncpg and psycopg2 packages, they don't work on Python
3.10.

This also fixes running these tests no M1 MacBooks.

* Fix linter issues merged into main

They went unnoticed while the CI didn't fail on the lint task not
working.

---------

Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
2023-02-03 08:37:24 +05:30
Shalev Roda 744851b3cf
metric instrumentation Tornado (#1252) 2022-10-12 21:52:12 +05:30
Nikolay Gribanov 9d14265911
Fix Tornado errors mapping to 500 (#1048) 2022-04-13 10:08:42 -07:00
Ashutosh Goel d86f1645da
Tornado: Capture custom request/response headers as span attributes (#950) 2022-03-11 11:30:45 -08:00
Ashutosh Goel 0e92d6add8
Mark span as internal in presence of another span for tornado and use (#889)
_start_internal_or_server_span function for flask, pyramid and django

Adding changelog entry

Adding unit test and fixing lint errors

Refactoring to use _start_internal_or_server_span function

Removing unwanted imports and variables

Fixing lint errors

adding changes from tox -e generate

Fixing build errors
2022-02-03 14:08:04 +05:30
alrex face2a3272
refactor common test code to use utility method (#700) 2021-10-14 22:19:02 +00:00
Remi Rampin 3b5071b5a3
Tornado attributes (#706)
* Remove duplicate HTTP_HOST

* Set http.client_ip instead of net.peer.ip

Tornado sets remote_ip to the value of X-Forwarded-For or X-Real-IP if
the 'xheaders' setting is set.

* Add a "handler" attribute, with full class name

The spec has a 'http.route' which unfortunately seems difficult to get
at. However the full class name is readily available and most helpful.

* Add net.peer.ip from _orig_remote_ip

* Address review comments

- Don't set NET_PEER_IP if '_orig_remote_ip' is not set
- Add a comment about the difference between the attributes

* Make "handler" attribute into "tornado.handler"

* Add CHANGELOG entry

* Add test with X-Forwarded-For

Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
2021-10-04 21:31:30 +05:30
alrex fbb677a01d
use f-strings instead of format (#693)
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2021-09-28 19:12:47 +00:00
Owais Lone cc57aacd71
Improve reliability of tests (#643)
* Run tests on Windows in Github Actions

* core sha update

* format code

* fix ci yaml

* rebase

* lint

* Try without win+py3.6 fix

* Try without win+py3.6 fix

* Improve test reliability

Update some tests to use more deterministic methods of testing in memory
spans. This helps the core repo pass tests after adding Windows to CI
matrix.
2021-09-01 12:06:13 +02:00
Owais Lone ffc2a2ff4c
More consistent assertion methods (#641)
* More consistent assertion methods

* Updated core SHA
2021-08-30 22:46:18 +02:00
Ryo Kather c5c6977584
Add hooks for aiohttp, asgi, starlette, fastAPI, urllib, urllib3 (#576) 2021-07-26 14:34:50 -07:00
alrex 5b43a5993d
fix missing dep in docs build (#557) 2021-06-30 12:49:45 -07:00
Ryo Kather 865837f757
Ensure clean http url (#538) 2021-06-11 09:01:52 -07:00
Peter Bwire fe4e2d44c5
Reorder on_finish call order to correctly instrument all tornado work done during a request (#499)
Co-authored-by: alrex <aboten@lightstep.com>
2021-06-07 08:43:08 -07:00
Srikanth Chekuri 8d0c150b31
Sync with auto generated semantic convention constants (#428) 2021-04-19 23:37:10 -07:00
Owais Lone 308369004c
Added opt-in support to return traceresponse headers for server instrumentations. (#436) 2021-04-19 12:03:31 -07:00
Owais Lone 4aec1e448f
Request/Response hooks for Tornado server and client (#426) 2021-04-16 13:30:11 -07:00
Srikanth Chekuri 370952f684
Remove http.status_text from span attributes (#406) 2021-04-08 09:40:20 -07:00
Owais Lone f436514554
Replaced Tracer.use_span() with opentelemetry.trace.use_span() (#364) 2021-03-08 09:33:49 -08:00
Diego Hurtado 2fd68a2bf9
Remove Configuration from instrumentations (#285) 2021-02-04 08:02:37 -08:00
Mario Jonke f0adb23143
Remove 'component' span attribute in instrumentations (#301) 2021-01-29 13:15:26 -08:00
Srikanth Chekuri a403b65183
Use Config class methods for common purposes (#220) 2020-12-04 10:18:25 -08:00
Leighton Chen 53c0ca755a Use is_recording flag in aiopg, asyncpg, dbapi, psycopg2, pymemcache, pymongo, redis, sqlalchemy instrumentations (#1212) 2020-10-22 20:33:14 -07:00
Owais Lone 09bb0912d1 Added ability to extract span attributes from tornado request objects (#1178)
OTEL_PYTHON_TONADO_TRACED_REQUEST_ATTRS env var can be set to a command
separated list of attributes names that will be extracted from Tornado's
request object and set as attributes on spans.

Co-authored-by: (Eliseo) Nathaniel Ruiz Nowell <enruizno@uwaterloo.ca>
2020-10-22 20:33:14 -07:00
Leighton Chen 602083eae3 Use is_recording flag in flask, django, tornado, boto, botocore instrumentations (#1164) 2020-10-22 20:33:14 -07:00
Owais Lone a04a8c0952 Added instrumentation for Tornado 6 and above (#1018)
This commit adds auto-instrumentation for Tornado 6 and above on Python
versions 3.5 and above.
2020-10-22 20:33:14 -07:00