17 Commits

Author SHA1 Message Date
19fe7713e2 Sanitize DB_STATEMENT by default for elasticsearch (#1758) 2023-04-23 22:55:05 +05:30
aa6397ad59 Audit and test opentelemetry-instrumentation-elasticsearch NoOpTracer… (#1616)
* Audit and test opentelemetry-instrumentation-elasticsearch NoOpTracerProvider

* wip

* wip

* wip

* wip

* wip

---------

Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
2023-02-18 02:07:07 +00:00
df32e8ca7f add elasticsearch db.statement sanitization (#1598) 2023-02-10 06:20:42 +05:30
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
db478789e4 bugfix: correct generate search span_name (#1018) 2022-03-24 10:56:52 -07:00
1b75672e73 Don't create Elasticsearch span names containing document IDs (#705)
* Fix typo: _DEFALT_OP_NAME

* Extract ES document ID from URL, put in attributes

Elasticsearch creates URLs for index() and delete() before they hit
perform_request(). This means there would be many unique span names
containing unique document IDs, of the form
'Elasticsearch/indexname/_doc/documentid'.

This extracts the document ID from the URL and replaces it with ':id',
then puts it in the span's attributes.

* Add TODO comment with link to issue

* Add CHANGELOG entry

* Don't use custom doc types, deprecated in ES 7

* Update tests to match instrumentation
2021-10-13 04:00:00 +05:30
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
291e50813a adding response_hook to elastic instrumentation (#670) 2021-09-14 11:09:14 -07:00
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
ffc2a2ff4c More consistent assertion methods (#641)
* More consistent assertion methods

* Updated core SHA
2021-08-30 22:46:18 +02:00
8d0c150b31 Sync with auto generated semantic convention constants (#428) 2021-04-19 23:37:10 -07:00
9315eb0fb2 use StatusCode from trace instead of trace.status (#366) 2021-03-09 14:33:13 -08:00
f436514554 Replaced Tracer.use_span() with opentelemetry.trace.use_span() (#364) 2021-03-08 09:33:49 -08:00
f0adb23143 Remove 'component' span attribute in instrumentations (#301) 2021-01-29 13:15:26 -08:00
f5c3825e33 Change status codes from grpc status codes, remove setting status in instrumentations except on ERROR (#1282) 2020-10-28 14:28:58 -07:00
44fbb714b1 Use is_recording flag in jinja, celery, esearch, falcon instrumentations (#1241) 2020-10-14 12:07:23 -07:00
a49c812e6d Rename remaining framework packages from "ext" to "instrumentation" (#969) 2020-08-04 19:10:51 -07:00