Commit Graph

40 Commits

Author SHA1 Message Date
Riccardo Magliocchetti c9832ba232
instrumentation/django: fix test_trace_parent (#2338) 2024-03-19 10:58:51 -07:00
Marc Dougherty acfe932f7d
fix(django): avoid empty span name on empty path (#1788)
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2023-07-12 18:38:59 +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
Leighton Chen 3770e574eb
Add ability to exclude some routes explicitly with Django Instrumentation (#1618) 2023-02-03 15:14:28 -08:00
Shalev Roda 1f0dda9865
Add uninstrument test for django (#1557) 2023-01-06 17:34:15 +00:00
Dan Rogers a8cf644960
Add support for regular expression matching and sanitizing of headers in Django. (#1411) 2022-11-02 09:24:33 +05:30
Sanket Mehta 7382b5eed9
Restore metrics in django (#1208) 2022-08-24 20:25:32 +05:30
Thiyagu55 9e2dbecedc
Adding multiple db connections support for django-instrumentation's sqlcommenter (#1187) 2022-07-14 15:59:34 +05:30
Thiyagu55 ac84e9968f
Integrating sql commenter into otel_django_instrumentation (#896)
* Integrating sql commenter into otel_django_instrumentation

* Added test cases for django

* - Linting changes
- Added Changelog

* - Linting changes

* - Linting changes

* - Linting changes

* - Linting changes

* - Linting changes

* - Linting changes

* - Linting changes

* PR changes

* PR changes

* Linting changes

* Linting changes

* Linting changes

* Linting changes

* PR changes

* PR changes

* PR changes

* linting changes

* PR changes

* linting changes

* PR changes

* PR changes

* PR changes

* PR changes

* PR changes

Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2022-06-29 12:06:25 +02:00
Srikanth Chekuri 0007c9046c
Add metric instrumentation for WSGI (#1128) 2022-06-22 03:54:05 +05:30
Sanket Mehta b1e94d6a6b
Django: Capture custom request/response headers (#1024) 2022-04-05 12:05:48 -07:00
Sanket Mehta d01efe5c50
Develop/condition server span django (#832)
* Code changes and pytests for https://github.com/open-telemetry/opentelemetry-python-contrib/issues/448

* removing unnecessary imports

* removing unnecessary imports

* adding wsgi.py file to get the wsgi application object

* Revert "Updating personal fork from public repo"

* Revert "Updating personal fork from public repo"

* Revert "Updating personal fork from public repo"

* Revert "Updating personal fork from public repo"

* Changing the unit test case by removing WSGI instrumentation and make it from generalised

* removing unnecessary import statements

* Revert "Updating personal fork from public repo"

* resolving failed builds for lint and generate

* removing commented code

* removing blank line

* removed unused variable resp from test_middleware.py and modified the CHANGELOG.md with PR entry

* modified the CHANGELOG.md to removed unnecessary entry

* modified the CHANGELOG.md to add proper PR entry

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2022-01-07 16:24:09 -06:00
Jakub Wach 07f81461df
lambda instrumentation - support for flush timeout (#825)
* lambda instrumentation - support for flush timeout

* Update instrumentation/opentelemetry-instrumentation-aws-lambda/tests/test_aws_lambda_instrumentation_manual.py

Co-authored-by: (Eliseo) Nathaniel Ruiz Nowell <enruizno@uwaterloo.ca>

* Update instrumentation/opentelemetry-instrumentation-aws-lambda/tests/test_aws_lambda_instrumentation_manual.py

Co-authored-by: (Eliseo) Nathaniel Ruiz Nowell <enruizno@uwaterloo.ca>

* fixing lint

* fixing django lint

Co-authored-by: (Eliseo) Nathaniel Ruiz Nowell <enruizno@uwaterloo.ca>
2021-12-14 18:06:36 +05:30
Owais Lone 3137c1fa41
Upgrade black (#802) 2021-11-10 20:57:01 +00:00
Michael Manganiello 9dc3bbb8dc
`django`: Fix instrumentation and tests for all Django major versions (#780) 2021-10-28 13:52:36 -07:00
Michael Manganiello 4b9b6dc18e
django: Fix carrier usage on ASGI requests (#767)
* django: Fix carrier usage on ASGI requests

For ASGI requests, we must use `request.scope` instead of
`request.META`. This is because `ASGIGetter` retrieves the `headers` key
from the carrier [0], which is only present in `request.scope`.

[0] https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py#L133

* Add unit tests
2021-10-25 16:14:47 +00:00
alrex face2a3272
refactor common test code to use utility method (#700) 2021-10-14 22:19:02 +00:00
Michael Manganiello 5105820fff
Add Django ASGI support (#391) 2021-10-12 10:28:03 -07:00
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
Srikanth Chekuri 3ec77360cb
Update instrumentations to use tracer_provider for creating tracer if given, otherwise use global tracer provider (#402) 2021-04-28 08:36:37 -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
Srikanth Chekuri 370952f684
Remove http.status_text from span attributes (#406) 2021-04-08 09:40:20 -07:00
Owais Lone 1ee8924cfb
Support request and resposne hooks for Django instrumentation (#407) 2021-04-08 08:06:41 -07:00
alrex 9315eb0fb2
use StatusCode from trace instead of trace.status (#366) 2021-03-09 14:33:13 -08:00
Owais Lone f436514554
Replaced Tracer.use_span() with opentelemetry.trace.use_span() (#364) 2021-03-08 09:33:49 -08:00
Leighton Chen c265e2f035
Remove metrics from main branch (#312) 2021-02-05 16:41:03 -08:00
Diego Hurtado 2fd68a2bf9
Remove Configuration from instrumentations (#285) 2021-02-04 08:02:37 -08:00
Srikanth Chekuri 744e961080
Update instrumentations (#232) 2020-12-07 08:29:57 -08:00
Srikanth Chekuri a403b65183
Use Config class methods for common purposes (#220) 2020-12-04 10:18:25 -08:00
zhutianyu 2504416734 Bugfix django instrumentation (#1309) 2020-11-01 19:50:17 -08:00
Leighton Chen b5b81db05f Change status codes from grpc status codes, remove setting status in instrumentations except on ERROR (#1282) 2020-10-28 14:28:58 -07:00
Owais Lone fa77bb85a7 Django: Record status, http.status_code and event on exception (#1257) 2020-10-21 09:01:49 -07:00
Leighton Chen ad1ed83571 Adding metric collection as part of instrumentations - Django (#1230) 2020-10-15 17:24:29 -07:00
stschenk d4b3dac596 Add capture of http.route to DjangoInstrumentor middleware (#1226) 2020-10-15 12:34:32 -07:00
Leighton Chen 7fef6fa47c Use is_recording flag in aiopg, asyncpg, dbapi, psycopg2, pymemcache, pymongo, redis, sqlalchemy instrumentations (#1212) 2020-10-08 12:25:20 -07:00
Leighton Chen 287e026060 Use is_recording flag in flask, django, tornado, boto, botocore instrumentations (#1164) 2020-09-30 07:36:57 -07:00
Owais Lone e3199ac411 Added ability to extract span attributes from django request objects. (#1154)
OTEL_PYTHON_DJANGO_TRACED_REQUEST_ATTRS env var can be set to a command
separated list of attributes names that will be extracted from Django's
request object and set as attributes on spans.
2020-09-28 21:52:11 -07:00
HiveTraum 06511cd31a Django span names according to convention (#992) 2020-09-21 13:30:03 -07:00
Leighton Chen b372486958 Rename web framework packages from "ext" to "instrumentation" (#961) 2020-08-03 10:10:45 -07:00