-
Notifications
You must be signed in to change notification settings - Fork 105
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 Neo4j plugin. #312
Add Neo4j plugin. #312
Conversation
@Jedore Thank you! Generally looks great! Please add the neo4j dependency to poetry plugins group as indicated in the PR template. And if you would like maybe also add a note in the neo4j plugin (You see there's a variable called note there), to indicate only the 5.x driver is supported and its fine since it can support both DBMS versions. |
@Superskyyy Thanks great! Please review the note and prproject.toml. |
|
||
|
||
def install(): | ||
from neo4j import AsyncSession, Session |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E0401: Unable to import 'neo4j'
❗❗ 7 similar findings have been found in this PR
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
skywalking/plugins/sw_neo4j.py | 36 |
skywalking/plugins/sw_neo4j.py | 37 |
tests/plugin/data/sw_neo4j/services/consumer.py | 20 |
tests/plugin/data/sw_neo4j/services/consumer.py | 21 |
tests/plugin/data/sw_neo4j/services/provider.py | 20 |
tests/plugin/data/sw_neo4j/services/provider.py | 21 |
tests/plugin/data/sw_neo4j/services/provider.py | 22 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
|
||
|
||
def install(): | ||
from neo4j import AsyncSession, Session |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reportMissingImports: Import "neo4j" could not be resolved
❗❗ 7 similar findings have been found in this PR
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
skywalking/plugins/sw_neo4j.py | 36 |
skywalking/plugins/sw_neo4j.py | 37 |
tests/plugin/data/sw_neo4j/services/consumer.py | 20 |
tests/plugin/data/sw_neo4j/services/consumer.py | 21 |
tests/plugin/data/sw_neo4j/services/provider.py | 20 |
tests/plugin/data/sw_neo4j/services/provider.py | 21 |
tests/plugin/data/sw_neo4j/services/provider.py | 22 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
If adding a new plugin, add a component id in the main repo. As Add Neo4j component language: Python skywalking#10937
If adding a new plugin, add a logo in the UI repo
I have added the library to
pyproject.toml
(plugin group) by runningpoetry add neo4j --group plugins
I have rebuilt the
Plugins.md
documentation by runningmake doc-gen
If this pull request closes/resolves/fixes an existing issue, replace the issue url. Closes: [Feature] [Python] Add Neo4j plugin skywalking#10898
Update the
CHANGELOG.md
.Something about the plugin,
The major Neo4j DBMS versions are 5 and 4.4. The latest neo4j python driver version is
5.x.x
which support both Neo4j DBMS 5 and 4.4 . And python driver4.4.x
differs much from5.x.x
.So the neo4j plugin only support neo4j python driver5.x.x
.Reference:
Neo4j python driver
5.x.x
provide two methodSession.run()
&Transaction.run()
to execute Cypher statement with both sync and async mode.tests/plugin/data/sw_neo4j/services/provider.py
contains these four cases:Session.run()
Transaction.run()
Session.run()
Transaction.run()