Commit Graph

23 Commits

Author SHA1 Message Date
Riccardo Magliocchetti 3291f38e8d
elasticsearch: test against elasticsearch 7 (#2431)
* Update core repo SHA

* elasticsearch: test against elasticsearch 7

---------

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2024-04-28 09:20:17 -05:00
Riccardo Magliocchetti 4de0e5659d
elasticsearch: stop testing on ancient versions (#2422)
Pick 6.0 as the baseline.
2024-04-18 08:57:26 -05:00
Riccardo Magliocchetti ca082a7c52
elasticsearch: don't set body as db statement for bulk requests (#2355)
* elasticsearch: don't set body as db statement for bulk requests

bulk requests can be too big and diverse to make sense as db statement.
Other than that the sanitizer currently only handles dicts so it's
crashing.

Closes #2150

Co-authored-by: Jason Mobarak <git@jason.mobarak.name>
Co-authored-by: Quentin Pradet <quentin.pradet@gmail.com>

* Update CHANGELOG

* Please the linter

---------

Co-authored-by: Jason Mobarak <git@jason.mobarak.name>
Co-authored-by: Quentin Pradet <quentin.pradet@gmail.com>
2024-03-22 16:56:29 -06:00
Srikanth Chekuri 5888d4ef95
Enable lint on CI and update deps (#2067)
* Fix black an isort

* change bootstrap_gen to use a list instead of dict

* Bunch of updates

* Fix build

* fix lint

* Fix docs

* Fix lint

* More fixes

* Fix lint

* fix stupid mistake

---------

Co-authored-by: Christian Hartung <christian.hartung@olist.com>
2023-11-21 10:25:11 +02:00
Tammy Baylis e70437a36e
Add conditional elastic_transport import (#1810)
* Add conditional elastic_transport import

* Update changelog

* Add future es8 tests

* Update CHANGELOG.md

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>

* Add license, rm pylint disable

* Consistent elastic version check

* lint import

* Update CHANGELOG.md

---------

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
2023-06-25 08:25:09 +03:00
Nimrod Shlagman c9004bd375
Fix elastic-search sanitization for bulk queries (#1870)
* support sanitization for str body response

* add CHANGELOG entry

---------

Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com>
2023-06-25 07:44:57 +03:00
Nimrod Shlagman 19fe7713e2
Sanitize DB_STATEMENT by default for elasticsearch (#1758) 2023-04-23 22:55:05 +05:30
Akochavi 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
Nimrod Shlagman df32e8ca7f
add elasticsearch db.statement sanitization (#1598) 2023-02-10 06:20:42 +05:30
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
zhutianyu db478789e4
bugfix: correct generate search span_name (#1018) 2022-03-24 10:56:52 -07:00
Remi Rampin 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
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
ItayGibel-heliosphere 291e50813a
adding response_hook to elastic instrumentation (#670) 2021-09-14 11:09:14 -07: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
Srikanth Chekuri 8d0c150b31
Sync with auto generated semantic convention constants (#428) 2021-04-19 23:37:10 -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
Mario Jonke f0adb23143
Remove 'component' span attribute in instrumentations (#301) 2021-01-29 13:15:26 -08:00
Leighton Chen 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
Leighton Chen 44fbb714b1 Use is_recording flag in jinja, celery, esearch, falcon instrumentations (#1241) 2020-10-14 12:07:23 -07:00
Leighton Chen a49c812e6d Rename remaining framework packages from "ext" to "instrumentation" (#969) 2020-08-04 19:10:51 -07:00