Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for AsyncElasticsearch #843

Merged
merged 3 commits into from
Jun 2, 2020

Conversation

sethmlarson
Copy link
Contributor

@sethmlarson sethmlarson commented Jun 1, 2020

What does this pull request do?

Adds support for elasticsearch.AsyncElasticsearch which is going to be released with elasticsearch-py v7.8.0. I ran the test suite against elasticsearch==7.8.0a1 which passed but left the requirements file to only use released versions.

Let me know if any of the changes to the existing ES instrumentation shouldn't be modified. I made these changes under the impression that these were private APIs :)

@apmmachine
Copy link
Contributor

apmmachine commented Jun 1, 2020

💔 Tests Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #843 updated]

  • Start Time: 2020-06-02T21:45:08.683+0000

  • Duration: 27 min 1 sec

Test stats 🧪

Test Results
Failed 1
Passed 9208
Skipped 6796
Total 16005

Test errors

Expand to view the tests failures

  • Name: Test / windows-3.8-none / test_api_request_time_dynamic – tests.transports.test_base

    • Age: 1
    • Duration: 0.263
    • Error Details: assert not [<LogRecord: elasticapm.transport, 10, C:\Users\jenkins\workspace\thon_apm-agent-python-mbp_PR-843\src\github.com\elas...-agent-python\elasticapm\transport\base.py, 154, "flushing due to time since last flush %.3fs > max_flush_time %.3fs">] + where [<LogRecord: elasticapm.transport, 10, C:\Users\jenkins\workspace\thon_apm-agent-python-mbp_PR-843\src\github.com\elas...-agent-python\elasticapm\transport\base.py, 154, "flushing due to time since last flush %.3fs > max_flush_time %.3fs">] = <_pytest.logging.LogCaptureFixture object at 0x000001C9D4470160>.records

Log output

Expand to view the last 100 lines of log output

[2020-06-02T22:11:51.646Z] You should consider upgrading via the '/opt/pypy/pypy2.7-7.3.1/bin/pypy -m pip install --upgrade pip' command.
[2020-06-02T22:11:51.646Z]     + built_wheel=(/tmp/built_wheel/*.whl)
[2020-06-02T22:11:51.646Z]     + rm -rf /tmp/repaired_wheels
[2020-06-02T22:11:51.646Z]     + mkdir /tmp/repaired_wheels
[2020-06-02T22:11:51.646Z]     + [[ /tmp/built_wheel/elastic_apm-5.6.0-py2-none-any.whl == *none-any.whl ]]
[2020-06-02T22:11:51.646Z]     + mv /tmp/built_wheel/elastic_apm-5.6.0-py2-none-any.whl /tmp/repaired_wheels
[2020-06-02T22:11:51.646Z]     + repaired_wheels=(/tmp/repaired_wheels/*.whl)
[2020-06-02T22:11:51.646Z]     + '[' '!' -z '' ']'
[2020-06-02T22:11:51.646Z]     + mv /tmp/repaired_wheels/elastic_apm-5.6.0-py2-none-any.whl /output
[2020-06-02T22:11:51.646Z]     + for repaired_wheel in '"${repaired_wheels[@]}"'
[2020-06-02T22:11:51.646Z]      + basename /tmp/repaired_wheels/elastic_apm-5.6.0-py2-none-any.whl
[2020-06-02T22:11:51.646Z]     + chown 1156:1157 /output/elastic_apm-5.6.0-py2-none-any.whl
[2020-06-02T22:11:51.646Z] + docker exec -i cibuildwheel-aed09b0c-a5e3-4362-8332-fa0d9331d41d sh -c 'cat > /constraints.txt'
[2020-06-02T22:11:51.907Z] + docker exec -i cibuildwheel-aed09b0c-a5e3-4362-8332-fa0d9331d41d /bin/bash
[2020-06-02T22:11:52.474Z]     + mkdir -p /output
[2020-06-02T22:11:52.474Z]     + cd /project
[2020-06-02T22:11:52.474Z]     + PYBIN=/opt/python/pp36-pypy36_pp73/bin
[2020-06-02T22:11:52.474Z]     + export PATH=/opt/python/pp36-pypy36_pp73/bin:/opt/rh/devtoolset-8/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[2020-06-02T22:11:52.474Z]     + PATH=/opt/python/pp36-pypy36_pp73/bin:/opt/rh/devtoolset-8/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[2020-06-02T22:11:52.474Z]      + which pip
[2020-06-02T22:11:52.474Z]     + '[' /opt/python/pp36-pypy36_pp73/bin/pip '!=' /opt/python/pp36-pypy36_pp73/bin/pip ']'
[2020-06-02T22:11:52.474Z]      + which python
[2020-06-02T22:11:52.474Z]     + '[' /opt/python/pp36-pypy36_pp73/bin/python '!=' /opt/python/pp36-pypy36_pp73/bin/python ']'
[2020-06-02T22:11:52.474Z]     + '[' '!' -z '' ']'
[2020-06-02T22:11:52.474Z]     + rm -rf /tmp/built_wheel
[2020-06-02T22:11:52.474Z]     + mkdir /tmp/built_wheel
[2020-06-02T22:11:52.474Z]     + pip wheel /project/. -w /tmp/built_wheel --no-deps
[2020-06-02T22:11:55.014Z] Processing /project
[2020-06-02T22:11:55.584Z]   Installing build dependencies: started
[2020-06-02T22:11:59.782Z]   Installing build dependencies: finished with status 'done'
[2020-06-02T22:11:59.782Z]   Getting requirements to build wheel: started
[2020-06-02T22:12:01.169Z]   Getting requirements to build wheel: finished with status 'done'
[2020-06-02T22:12:01.169Z]     Preparing wheel metadata: started
[2020-06-02T22:12:02.555Z]     Preparing wheel metadata: finished with status 'done'
[2020-06-02T22:12:02.555Z] Building wheels for collected packages: elastic-apm
[2020-06-02T22:12:02.555Z]   Building wheel for elastic-apm (PEP 517): started
[2020-06-02T22:12:04.467Z]   Building wheel for elastic-apm (PEP 517): finished with status 'done'
[2020-06-02T22:12:04.467Z]   Created wheel for elastic-apm: filename=elastic_apm-5.6.0-py3-none-any.whl size=446813 sha256=577ccdc8100f0d6b800f62b823eaa1b356f3021280c34abb3989a6f006e291ed
[2020-06-02T22:12:04.468Z]   Stored in directory: /tmp/pip-ephem-wheel-cache-s7kw6nnc/wheels/de/ab/88/a237fdf750e25f63db6cf5343e3feef89c5f93e985be647379
[2020-06-02T22:12:04.468Z] Successfully built elastic-apm
[2020-06-02T22:12:04.468Z] WARNING: You are using pip version 20.0.2; however, version 20.1.1 is available.
[2020-06-02T22:12:04.468Z] You should consider upgrading via the '/opt/pypy/pypy3.6-7.3.1/bin/pypy -m pip install --upgrade pip' command.
[2020-06-02T22:12:04.729Z]     + built_wheel=(/tmp/built_wheel/*.whl)
[2020-06-02T22:12:04.729Z]     + rm -rf /tmp/repaired_wheels
[2020-06-02T22:12:04.729Z]     + mkdir /tmp/repaired_wheels
[2020-06-02T22:12:04.729Z]     + [[ /tmp/built_wheel/elastic_apm-5.6.0-py3-none-any.whl == *none-any.whl ]]
[2020-06-02T22:12:04.729Z]     + mv /tmp/built_wheel/elastic_apm-5.6.0-py3-none-any.whl /tmp/repaired_wheels
[2020-06-02T22:12:04.729Z]     + repaired_wheels=(/tmp/repaired_wheels/*.whl)
[2020-06-02T22:12:04.729Z]     + '[' '!' -z '' ']'
[2020-06-02T22:12:04.729Z]     + mv /tmp/repaired_wheels/elastic_apm-5.6.0-py3-none-any.whl /output
[2020-06-02T22:12:04.729Z]     + for repaired_wheel in '"${repaired_wheels[@]}"'
[2020-06-02T22:12:04.729Z]      + basename /tmp/repaired_wheels/elastic_apm-5.6.0-py3-none-any.whl
[2020-06-02T22:12:04.729Z]     + chown 1156:1157 /output/elastic_apm-5.6.0-py3-none-any.whl
[2020-06-02T22:12:04.729Z] + docker cp cibuildwheel-aed09b0c-a5e3-4362-8332-fa0d9331d41d:/output/. /var/lib/jenkins/workspace/thon_apm-agent-python-mbp_PR-843/src/github.com/elastic/apm-agent-python/wheelhouse
[2020-06-02T22:12:04.729Z] + docker rm --force -v cibuildwheel-aed09b0c-a5e3-4362-8332-fa0d9331d41d
[2020-06-02T22:12:05.301Z] cibuildwheel-aed09b0c-a5e3-4362-8332-fa0d9331d41d
[2020-06-02T22:12:05.301Z] + ls -l wheelhouse
[2020-06-02T22:12:05.301Z] total 12720
[2020-06-02T22:12:05.301Z] -rw-r--r-- 1 jenkins jenkins 496439 Jun  2 22:10 elastic_apm-5.6.0-cp27-cp27m-manylinux1_i686.whl
[2020-06-02T22:12:05.301Z] -rw-r--r-- 1 jenkins jenkins 502265 Jun  2 22:09 elastic_apm-5.6.0-cp27-cp27m-manylinux1_x86_64.whl
[2020-06-02T22:12:05.301Z] -rw-r--r-- 1 jenkins jenkins 496440 Jun  2 22:10 elastic_apm-5.6.0-cp27-cp27m-manylinux2010_i686.whl
[2020-06-02T22:12:05.301Z] -rw-r--r-- 1 jenkins jenkins 502269 Jun  2 22:09 elastic_apm-5.6.0-cp27-cp27m-manylinux2010_x86_64.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 496434 Jun  2 22:10 elastic_apm-5.6.0-cp27-cp27mu-manylinux1_i686.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 502274 Jun  2 22:09 elastic_apm-5.6.0-cp27-cp27mu-manylinux1_x86_64.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 496435 Jun  2 22:10 elastic_apm-5.6.0-cp27-cp27mu-manylinux2010_i686.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 502277 Jun  2 22:09 elastic_apm-5.6.0-cp27-cp27mu-manylinux2010_x86_64.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 499945 Jun  2 22:10 elastic_apm-5.6.0-cp35-cp35m-manylinux1_i686.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 505669 Jun  2 22:09 elastic_apm-5.6.0-cp35-cp35m-manylinux1_x86_64.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 499947 Jun  2 22:10 elastic_apm-5.6.0-cp35-cp35m-manylinux2010_i686.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 505673 Jun  2 22:09 elastic_apm-5.6.0-cp35-cp35m-manylinux2010_x86_64.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 500190 Jun  2 22:10 elastic_apm-5.6.0-cp36-cp36m-manylinux1_i686.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 505898 Jun  2 22:09 elastic_apm-5.6.0-cp36-cp36m-manylinux1_x86_64.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 500194 Jun  2 22:10 elastic_apm-5.6.0-cp36-cp36m-manylinux2010_i686.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 505901 Jun  2 22:09 elastic_apm-5.6.0-cp36-cp36m-manylinux2010_x86_64.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 501130 Jun  2 22:11 elastic_apm-5.6.0-cp37-cp37m-manylinux1_i686.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 506834 Jun  2 22:09 elastic_apm-5.6.0-cp37-cp37m-manylinux1_x86_64.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 501135 Jun  2 22:11 elastic_apm-5.6.0-cp37-cp37m-manylinux2010_i686.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 506839 Jun  2 22:09 elastic_apm-5.6.0-cp37-cp37m-manylinux2010_x86_64.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 505756 Jun  2 22:11 elastic_apm-5.6.0-cp38-cp38-manylinux1_i686.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 511153 Jun  2 22:09 elastic_apm-5.6.0-cp38-cp38-manylinux1_x86_64.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 505758 Jun  2 22:11 elastic_apm-5.6.0-cp38-cp38-manylinux2010_i686.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 511154 Jun  2 22:09 elastic_apm-5.6.0-cp38-cp38-manylinux2010_x86_64.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 446804 Jun  2 22:11 elastic_apm-5.6.0-py2-none-any.whl
[2020-06-02T22:12:05.302Z] -rw-r--r-- 1 jenkins jenkins 446813 Jun  2 22:12 elastic_apm-5.6.0-py3-none-any.whl
[2020-06-02T22:12:06.537Z] Stashed 26 file(s)
[2020-06-02T22:12:07.753Z] Scheduling project: APM Integration Test MBP Selector » master
[2020-06-02T22:12:07.771Z] [INFO] Can not determine redirect link!!!
[2020-06-02T22:12:08.764Z] Stage "Benchmarks" skipped due to when conditional
[2020-06-02T22:12:08.804Z] Timeout set to expire in 12 hr
[2020-06-02T22:12:08.860Z] Stage "Prepare Release" skipped due to when conditional
[2020-06-02T22:12:08.877Z] Stage "Prepare Release" skipped due to when conditional
[2020-06-02T22:12:08.911Z] Stage "Prepare Release" skipped due to when conditional
[2020-06-02T22:12:08.944Z] Stage "Prepare Release" skipped due to when conditional
[2020-06-02T22:12:09.148Z] Running on Jenkins in /var/lib/jenkins/workspace/thon_apm-agent-python-mbp_PR-843
[2020-06-02T22:12:09.231Z] [INFO] getVaultSecret: Getting secrets
[2020-06-02T22:12:09.295Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-06-02T22:12:09.842Z] + chmod 755 generate-build-data.sh
[2020-06-02T22:12:09.842Z] + ./generate-build-data.sh https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-python/apm-agent-python-mbp/PR-843/ https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-python/apm-agent-python-mbp/PR-843/runs/3 UNSTABLE 1620900
[2020-06-02T22:12:10.393Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-python/apm-agent-python-mbp/PR-843/runs/3/steps/?limit=10000 -o steps-info.json
[2020-06-02T22:12:12.876Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-python/apm-agent-python-mbp/PR-843/runs/3/tests/?status=FAILED -o tests-errors.json

Copy link
Contributor

@basepi basepi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks most excellent! Thanks @sethmlarson!

@basepi basepi merged commit a898c34 into elastic:master Jun 2, 2020
@sethmlarson sethmlarson deleted the async-elasticsearch branch June 3, 2020 13:40
romulorosa pushed a commit to romulorosa/apm-agent-python that referenced this pull request Oct 15, 2020
* Add support for AsyncElasticsearch

* Add to changelog

Co-authored-by: Colton Myers <colton.myers@gmail.com>
romulorosa pushed a commit to romulorosa/apm-agent-python that referenced this pull request Oct 15, 2020
* Add support for AsyncElasticsearch

* Add to changelog

Co-authored-by: Colton Myers <colton.myers@gmail.com>
beniwohli pushed a commit to beniwohli/apm-agent-python that referenced this pull request Sep 14, 2021
* Add support for AsyncElasticsearch

* Add to changelog

Co-authored-by: Colton Myers <colton.myers@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants