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 database as a dependency in asyncpg instrumentation #1115

Conversation

ajaygupta2790
Copy link
Contributor

@ajaygupta2790 ajaygupta2790 commented Apr 26, 2021

Adds database(postgres) as a dependency in python elastic apm for asyncpg instrumentation

I have taken the code from psycopg2 instrumentation which is able to show database as a dependency. Ran these changes locally and I can now see postgres under dependencies.

116056619-a139e600-a69b-11eb-80ae-58bb164c49ef

Related issues
closes #1111

@apmmachine
Copy link
Contributor

apmmachine commented Apr 26, 2021

💔 Build Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Started by user Benjamin Wohlwend

  • Start Time: 2021-04-26T20:44:20.732+0000

  • Duration: 18 min 0 sec

  • Commit: a9df55f

Test stats 🧪

Test Results
Failed 0
Passed 7344
Skipped 7899
Total 15243

Trends 🧪

Image of Build Times

Image of Tests

Steps errors 11

Expand to view the steps failures

Show only the first 10 steps failures

Install python3:3.6
  • Took 0 min 7 sec . View more details on here
Install python3:3.6
  • Took 0 min 7 sec . View more details on here
Install python3:3.7
  • Took 0 min 11 sec . View more details on here
Install python3:3.7
  • Took 0 min 7 sec . View more details on here
Install python3:3.7
  • Took 0 min 8 sec . View more details on here
Install python3:3.8
  • Took 0 min 9 sec . View more details on here
Install python3:3.8
  • Took 0 min 6 sec . View more details on here
Install python3:3.8
  • Took 0 min 7 sec . View more details on here
Archive the artifacts
  • Took 0 min 0 sec . View more details on here
  • Description: [2021-04-26T21:02:18.741Z] Archiving artifacts hudson.AbortException: script returned exit code 1
Error signal
  • Took 0 min 0 sec . View more details on here
  • Description: hudson.AbortException: script returned exit code 1

Log output

Expand to view the last 100 lines of log output

[2021-04-26T21:01:44.316Z] + python3 -m coverage combine
[2021-04-26T21:02:16.478Z] + python3 -m coverage xml
[2021-04-26T21:02:17.899Z] [Cobertura] Skipping Cobertura coverage report as build was not SUCCESS or better ...
[2021-04-26T21:02:17.899Z] 
[2021-04-26T21:02:18.266Z] + curl -sLO https://code.jquery.com/jquery-3.3.1.slim.min.js
[2021-04-26T21:02:18.567Z] + curl -sLO https://cdn.jsdelivr.net/npm/htmlson.js@1.0.4/src/htmlson.js
[2021-04-26T21:02:18.741Z] Archiving artifacts
[2021-04-26T21:02:18.875Z] Stage "Building packages" skipped due to earlier failure(s)
[2021-04-26T21:02:18.913Z] Stage "Integration Tests" skipped due to earlier failure(s)
[2021-04-26T21:02:18.950Z] Stage "Benchmarks" skipped due to earlier failure(s)
[2021-04-26T21:02:19.039Z] Stage "Prepare Release" skipped due to earlier failure(s)
[2021-04-26T21:02:19.060Z] Stage "Prepare Release" skipped due to earlier failure(s)
[2021-04-26T21:02:19.101Z] Stage "Prepare Release" skipped due to earlier failure(s)
[2021-04-26T21:02:19.140Z] Stage "Prepare Release" skipped due to earlier failure(s)
[2021-04-26T21:02:19.511Z] Running on Jenkins in /var/lib/jenkins/workspace/hon_apm-agent-python-mbp_PR-1115
[2021-04-26T21:02:19.613Z] [INFO] getVaultSecret: Getting secrets
[2021-04-26T21:02:19.654Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-04-26T21:02:20.502Z] + chmod 755 generate-build-data.sh
[2021-04-26T21:02:20.502Z] + ./generate-build-data.sh https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-python/apm-agent-python-mbp/PR-1115/ https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-python/apm-agent-python-mbp/PR-1115/runs/2 FAILURE 1079510
[2021-04-26T21:02:20.502Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-python/apm-agent-python-mbp/PR-1115/runs/2/steps/?limit=10000 -o steps-info.json
[2021-04-26T21:02:25.698Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-python/apm-agent-python-mbp/PR-1115/runs/2/tests/?status=FAILED -o tests-errors.json
[2021-04-26T21:02:26.249Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-python/apm-agent-python-mbp/PR-1115/runs/2/log/ -o pipeline-log.txt

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 7344
Skipped 7899
Total 15243

@ajaygupta2790
Copy link
Contributor Author

@beniwohli I have created a new PR for this. ajay1mg was my official account, not sure I should sign the CLA with that.

@beniwohli
Copy link
Contributor

@ajaygupta2790 awesome, thanks for re-opening the PR!

@beniwohli beniwohli merged commit 1ee4d33 into elastic:master Apr 27, 2021
beniwohli added a commit to beniwohli/apm-agent-python that referenced this pull request Sep 14, 2021
* add database as a dependency in asyncpg instrumentation

* fixed "black" code style issue

Co-authored-by: Benjamin Wohlwend <beni@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python agent should show database as a dependency, shows up in span
3 participants