46 Commits

Author SHA1 Message Date
c4639ee3f5 Fix flaky celery docker test (#652)
The test was actually generating 2 spans but on very fast systems we
only saw one as the test ran faster than the message would travel
through the broker, trigger a task and generate 2nd span.

Switched from .delay() to .apply() so only one span is generated which
is enough for the test in question.
2021-09-02 10:14:38 +02:00
b6e49ba66d Remove unused imports (#646)
* Remove unused imports

Fixes #645

* Fix lint

* Import trace_tween_factory

* Fix lint

* Fix lint

* Fix pylint

* Try without using the symbol

* Fix isort

* Revert "Fix isort"

This reverts commit 4dbd91450b4ee099fd09ab1ca0fb8ae9c10bdcfa.

* Revert "Try without using the symbol"

This reverts commit d94f95564671a3155edf44bf71bf58f22ca309f0.
2021-09-01 19:38:02 +02:00
c279ee59a8 Rerun a flaky test (#639)
* Rerun a flaky test
2021-08-31 03:47:58 +05:30
c6976fc51f Potential fix for flaky celery test (#629)
It seems the same in memory span exporter was being reused by multiple
tests. This change _should_ create a new instance of memeory exporter
per test/function.

Fixes #2067
2021-08-26 03:30:26 +05:30
c8b6de6c1c Add support for SQLAlchemy 1.4 (#568) 2021-08-04 15:00:10 -07:00
b2dd4b8205 Fix pyodbc cursor error in SQLA instrumentation (#469) 2021-06-07 09:11:37 -07:00
a3ecbc1f41 Add SQLAlchemy multithreading test (#468) 2021-06-03 08:33:06 -07:00
8d0c150b31 Sync with auto generated semantic convention constants (#428) 2021-04-19 23:37:10 -07:00
08682f6f1d redis: fix default port KeyError, wrong attr name (#265)
* redis: fix default port KeyError, wrong attr name
* fix docker tests and another ip/port issue in asyncpg

Co-authored-by: Alex Boten <aboten@lightstep.com>
2021-04-14 08:45:36 -07:00
634c2ac0ae Update redis instrumentation to follow semantic conventions (#403) 2021-04-05 11:19:16 -07:00
12da395364 fix instrumentation of connection when pool.acquire was called multiple times (#381) 2021-04-02 16:45:12 -07:00
9315eb0fb2 use StatusCode from trace instead of trace.status (#366) 2021-03-09 14:33:13 -08:00
6720930cdb rename simple/batch span processors (#352) 2021-03-01 13:40:25 -08:00
c265e2f035 Remove metrics from main branch (#312) 2021-02-05 16:41:03 -08:00
b53b9a012f Fix failing aiopg tests (#317) 2021-02-04 17:39:24 -08:00
8b9202be6f Updated dbapi and psycopg2 instrumentations. (#246)
Changes:

- Update dbapi instrumentation to use the SQL statement name as the span
instead of the entire SQL query.
- Renamed TracedCursor with CursorTracing. The class was not a valid
Cursor so the name was confusing.
- Updated CursorTracing's (previously TracedCursor) traced_execution
method to accept the cursor instance as the first argument. This is
required as for some dbapi implementations, we need a reference to the
cursor in order to correctly format the SQL query.
- Updated psycopg2 instrumentation to leverage dbapi's `cursor_factory`
mechanism instead of wrapping the cursor with wrapt. This results in a
simpler instrumentation without monkey patching objects at runtime and
allows psycopg2's type registration system to work. This should make it
possible to use psycopg2 instrumentation when using the JSONB feature or
with frameworks like Django.
2021-01-20 10:45:28 -08:00
8c8f2785bd SQLAlchemy: Use SQL operation and DB name as the Span name (#254)
Current instrumentation uses the entire SQL query as the operation name
which makes traces very hard to read and understand in addition to
introducing high-cardinality issues. This commit fixes the problem by
using only the SQL operation name and the DB name instead of the entire
query.
2021-01-20 08:41:19 -08:00
6514f37177 Prometheus Remote Write Exporter (5/6) (#216) 2020-12-09 10:46:31 -08:00
49f8c52e17 Merge branch 'dbindex-redis' of https://github.com/lonewolf3739/opentelemetry-python-contrib into dbindex-redis 2020-11-24 20:05:44 +05:30
659007cd20 Add db for both name and database_index 2020-11-24 20:05:14 +05:30
13976b5275 Merge branch 'master' into dbindex-redis 2020-11-24 09:32:30 -05:00
8541371c2e Update get command value 2020-11-24 13:10:12 +05:30
bfc55f5634 Lint fix 2020-11-24 10:47:51 +05:30
c3f94c39c9 Add test for database_index 2020-11-24 10:43:22 +05:30
c1452b71ce Merge branch 'master' into asyncpg-semantic-conv 2020-11-23 15:39:07 -05:00
b7f8a5bee3 Merge branch 'master' into sqlalchemy-semantic-conv 2020-11-23 13:48:34 -05:00
184f786d9f Merge branch 'master' into dbapi-semantic-conv 2020-11-23 10:50:44 -05:00
868dd770a5 Merge branch 'master' into sqlalchemy-semantic-conv 2020-11-23 10:45:32 -05:00
963f65cb33 Fix lint 2020-11-22 01:27:52 +05:30
d51636e2c0 Update pymongo instrumentation to follow semantic conventions 2020-11-22 01:21:36 +05:30
69b6c378c8 Lint fix 2020-11-21 22:43:53 +05:30
3786d6d0fa Fix tests 2020-11-21 22:22:57 +05:30
f601bb2563 Fix env vars 2020-11-20 00:54:54 +05:30
2228573bf3 Fix docker tests 2020-11-18 01:41:59 +05:30
857581ca51 Remove PIPELINE from span name 2020-11-16 20:53:50 +05:30
e6503ce930 Update asyncpg docker tests 2020-11-15 12:28:52 +05:30
326269ed0c Update docker tests 2020-11-15 12:15:12 +05:30
6f2d60cb12 Fix docker tests 2020-11-15 02:10:57 +05:30
d7a89a34a0 Merge branch 'core-docker-tests-v0.15b0' 2020-11-02 14:35:05 -08:00
032c1ff730 Change status codes from grpc status codes, remove setting status in instrumentations except on ERROR (#1282) 2020-10-28 14:28:58 -07:00
4d26c1b502 Leave OpenCensus test in the Core Repo 2020-10-23 11:17:42 -07:00
b630d65294 Parent is now always passed in via Context, intead of Span or SpanContext (#1146)
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2020-10-08 08:39:04 -07:00
9641c8a62c Added context propagation support to celery instrumentation (#1135) 2020-09-29 08:36:05 -07:00
70b63c3959 Add support for db cursors and connections in context managers (#1028)
Here is an example snippet that will not report tracing without this patch:

with psycopg2.connect(...) as conn, conn.cursor() as cursor:
    cursor.execute("select 1;")

Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
2020-09-02 11:26:16 -07:00
bdc39963c0 Increase docker-tests retry count (#1026) 2020-08-20 09:25:14 -07:00
7d4d2ce4dc Rename remaining framework packages from "ext" to "instrumentation" (#969) 2020-08-04 19:10:51 -07:00