Commit Graph

57 Commits

Author SHA1 Message Date
Thiyagu55 fbac424515
Add psycopg2 native tags to sqlcommenter (#1203) 2022-07-30 05:14:47 +05:30
Thiyagu55 7c75b3867b
SQLCommenter semicolon bug fix (#1200) 2022-07-22 07:52:40 +05:30
Srikanth Chekuri d75194aed7
Sync with sdk setup from setUpClass to setUp (#1193) 2022-07-19 02:02:13 +05:30
shahargl 2ce69a668f
Add span for connection phase (#1134) 2022-07-17 21:09:15 +05:30
Sungwon Han 8823655b1c
Instrument RedisCluster clients (#1177)
* Instrument RedisCluster clients

* reformat files

* update changelogs

* refactor _traced_execute_pipeline

* handle AttributeError

* handle IndexError

* refactor _traced_execute_pipeline

* move hasattr check to _set_connection_attributes function

Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
2022-07-07 15:00:09 +02:00
Ben Sully fa56c6c09f
Instrument redis.asyncio clients (#1076) 2022-05-05 06:39:29 +05:30
Thiyagu55 e861b93362
Extending SQLCommenter support of dbapi into psycopg2 (#940)
* Added configuration for sqlcommenter

* Fixed linting errors

* Updated CHANGELOG.md

* Unit test case for sqlcommenter in psycopg2

* Merge conflict resolved

* Update CHANGELOG.md

* psycopg2 sqlcommenter integration test

* linting changes

* linting changes

* linting changes

* linting changes

* linting changes

* version compatability issue fix

Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
Co-authored-by: Leighton Chen <lechen@microsoft.com>
2022-03-17 19:19:30 -06:00
Owais Lone 3137c1fa41
Upgrade black (#802) 2021-11-10 20:57:01 +00:00
Michael Manganiello 07c52aad38
Refactor code using pyupgrade for Python 3.6 (#770)
* Refactor code using pyupgrade for Python 3.6

This diff is the result of applying the following command to the
project:

```shell
find . -type f -name "*.py" -exec pyupgrade --py36-plus '{}' +
```

* Simplify yield from
2021-10-24 07:04:06 +05:30
Owais Lone b41a91713e
Fix mssql docker tests v4 (#727)
* Remove unneded CI steps

These were not really needed and got in by mistake.

* Fix broken mssql integration tests

We were giving mssql server 10 seconds to start before creating the test
database. It now takes Github CI more than 10 seconds to start the mssql
server. Instead of increasing the leeway with guesses, this commit moves
the creation of test database from docker compose to the python test suite.
This allows the docker image to come up first and then create the DB
inside the test suite with proper retry mechanism that is already in
place.
2021-10-12 17:19:13 +02:00
Owais Lone cc2e7d276b
Fix mssql docker tests v2 (#723)
* Pin ubuntu to 20.04 in CI

* Fix mssql docker tests
2021-10-12 01:43:32 +05:30
Owais Lone 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
Diego Hurtado 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 4dbd91450b.

* Revert "Try without using the symbol"

This reverts commit d94f955646.
2021-09-01 19:38:02 +02:00
Diego Hurtado c279ee59a8
Rerun a flaky test (#639)
* Rerun a flaky test
2021-08-31 03:47:58 +05:30
Owais Lone 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
Matthew Brown c8b6de6c1c
Add support for SQLAlchemy 1.4 (#568) 2021-08-04 15:00:10 -07:00
Joshua b2dd4b8205
Fix pyodbc cursor error in SQLA instrumentation (#469) 2021-06-07 09:11:37 -07:00
Joshua a3ecbc1f41
Add SQLAlchemy multithreading test (#468) 2021-06-03 08:33:06 -07:00
Srikanth Chekuri 8d0c150b31
Sync with auto generated semantic convention constants (#428) 2021-04-19 23:37:10 -07:00
Vint Sanghyeok Lee 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
Srikanth Chekuri 634c2ac0ae
Update redis instrumentation to follow semantic conventions (#403) 2021-04-05 11:19:16 -07:00
sartx 12da395364
fix instrumentation of connection when pool.acquire was called multiple times (#381) 2021-04-02 16:45:12 -07:00
alrex 9315eb0fb2
use StatusCode from trace instead of trace.status (#366) 2021-03-09 14:33:13 -08:00
alrex 6720930cdb
rename simple/batch span processors (#352) 2021-03-01 13:40:25 -08:00
Leighton Chen c265e2f035
Remove metrics from main branch (#312) 2021-02-05 16:41:03 -08:00
alrex b53b9a012f
Fix failing aiopg tests (#317) 2021-02-04 17:39:24 -08:00
Owais Lone 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
Owais Lone 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
Azfaar Qureshi 6514f37177
Prometheus Remote Write Exporter (5/6) (#216) 2020-12-09 10:46:31 -08:00
Srikanth Chekuri 49f8c52e17 Merge branch 'dbindex-redis' of https://github.com/lonewolf3739/opentelemetry-python-contrib into dbindex-redis 2020-11-24 20:05:44 +05:30
Srikanth Chekuri 659007cd20 Add db for both name and database_index 2020-11-24 20:05:14 +05:30
Leighton Chen 13976b5275
Merge branch 'master' into dbindex-redis 2020-11-24 09:32:30 -05:00
Srikanth Chekuri 8541371c2e Update get command value 2020-11-24 13:10:12 +05:30
Srikanth Chekuri bfc55f5634 Lint fix 2020-11-24 10:47:51 +05:30
Srikanth Chekuri c3f94c39c9 Add test for database_index 2020-11-24 10:43:22 +05:30
Leighton Chen c1452b71ce
Merge branch 'master' into asyncpg-semantic-conv 2020-11-23 15:39:07 -05:00
Leighton Chen b7f8a5bee3
Merge branch 'master' into sqlalchemy-semantic-conv 2020-11-23 13:48:34 -05:00
Leighton Chen 184f786d9f
Merge branch 'master' into dbapi-semantic-conv 2020-11-23 10:50:44 -05:00
Leighton Chen 868dd770a5
Merge branch 'master' into sqlalchemy-semantic-conv 2020-11-23 10:45:32 -05:00
Srikanth Chekuri 963f65cb33 Fix lint 2020-11-22 01:27:52 +05:30
Srikanth Chekuri d51636e2c0 Update pymongo instrumentation to follow semantic conventions 2020-11-22 01:21:36 +05:30
Srikanth Chekuri 69b6c378c8 Lint fix 2020-11-21 22:43:53 +05:30
Srikanth Chekuri 3786d6d0fa Fix tests 2020-11-21 22:22:57 +05:30
Srikanth Chekuri f601bb2563 Fix env vars 2020-11-20 00:54:54 +05:30
Srikanth Chekuri 2228573bf3 Fix docker tests 2020-11-18 01:41:59 +05:30
Srikanth Chekuri 857581ca51 Remove PIPELINE from span name 2020-11-16 20:53:50 +05:30
Srikanth Chekuri e6503ce930 Update asyncpg docker tests 2020-11-15 12:28:52 +05:30
Srikanth Chekuri 326269ed0c Update docker tests 2020-11-15 12:15:12 +05:30
Srikanth Chekuri 6f2d60cb12 Fix docker tests 2020-11-15 02:10:57 +05:30
Nathaniel Ruiz Nowell d7a89a34a0 Merge branch 'core-docker-tests-v0.15b0' 2020-11-02 14:35:05 -08:00