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 Derby/Sybase/SQLite/DB2/OceanBase jdbc url format in URLParser #687

Merged
merged 3 commits into from
May 11, 2024

Conversation

CzyerChen
Copy link
Contributor

apache/skywalking#12207

Support URLs

DataBase UrlPattern URLs
Derby   1、jdbc:derby:[subprotocol:][databaseName][;attribute=value]*
2、jdbc:derby://server[:port]/databaseName[;attribute=value]*
jdbc:derby:directory:mydb
jdbc:derby:memory:mydb;create=true
jdbc:derby:memory:C:\test\mydb
jdbc:derby:memory:/home/test/mydb
jdbc:derby:classpath:/test/mydb
jdbc:derby:jar:(C:/dbs.jar)test/mydb
jdbc:derby:mydb
jdbc:derby:/test/mydb;create=true;create=true
jdbc:derby:test/mydb;create=true
jdbc:derby:A:/test/mydb;create=true
jdbc:derby:test/mydb;create=true
jdbc:derby://localhost:1527/mydb;create=true;user=root;password=pass
jdbc:derby://localhost:1527/mydb
jdbc:derby://localhost/mydb;create=true
jdbc:derby://localhost:1527/c:\temp\mydb
jdbc:derby://localhost:1527//opt/test/mydb;create=true
jdbc:derby://localhost:1527/memory:mydb;create=true
jdbc:derby://localhost:1527/memory:C:\test\mydbmydb;create=true
jdbc:derby://localhost:1527/memory:/test/mydb;create=true
Sqlite jdbc:sqlite:[subprotocol:][path/][databaseName][?attribute=value]* jdbc:sqlite:C:/work/mydatabase.db
jdbc:sqlite:/home/leo/work/mydatabase.db
jdbc:sqlite::memory:
jdbc:sqlite::resource:org/yourdomain/sample.db
jdbc:sqlite::resource:http://www.xerial.org/svn/project/XerialJ/trunk/sqlite-jdbc/src/test/java/org/sqlite/sample.db
jdbc:sqlite::resource:jar:http://www.xerial.org/svn/project/XerialJ/trunk/sqlite-jdbc/src/test/resources/testdb.jar!/sample.db
jdbc:sqlite:db.sqlite?hexkey_mode=sse
jdbc:sqlite::memory:?jdbc.explicit_readonly=true
jdbc:sqlite:sample.db
DB2 1、jdbc:db2:databasename
2、jdbc:db2://[hostname]:[port]/[database_name]:user=[username];password=[password]
jdbc:db2://localhost:50000/mydb:user=root;password=pass
jdbc:db2:mydb:user=root;password=pass
jdbc:db2://clusterip:50000/mydb
Sybase jdbc:sybase:Tds:host:port[/database][?connection_property=value;] jdbc:sybase:Tds:localhost:5000/testdb?charset=utf-8
jdbc:sybase:Tds:localhost:5000?USER=sa&PASSWORD=secret
OceanBase jdbc:oceanbase:[hamode:]//host:port/databasename?[username&password]&[opt1=val1&opt2=val2...] jdbc:oceanbase://localhost:2881/mydb?user=root@sys&password=pass&pool=false&useBulkStmts=true&rewriteBatchedStatements=false&useServerPrepStmts=true
jdbc:oceanbase://primaryhost:2888,secondaryhost1,secondaryhost2/mydb?user=root@sys&password=pass&pool=false&useBulkStmts=true&rewriteBatchedStatements=false&useServerPrepStmts=true
jdbc:oceanbase:hamode://clusterip:2881/test?user=root@sys&password=pass&pool=false&useBulkStmts=true&rewriteBatchedStatements=false&useServerPrepStmts=true

Example: Druid + Sqlite can not report metrics before:

General-Root  General-Service  General-Instance

Example: Druid + Sqlite can report metrics now:

image

@wu-sheng wu-sheng added this to the 9.3.0 milestone May 11, 2024
@wu-sheng wu-sheng added the enhancement New feature or request label May 11, 2024
@wu-sheng
Copy link
Member

@CzyerChen You added RocketMQ plugin test, right? I noticed, it is unstable for various PRs. Could you check the CI logs?

@wu-sheng wu-sheng merged commit 7dd7914 into apache:main May 11, 2024
190 checks passed
@CzyerChen
Copy link
Contributor Author

@CzyerChen You added RocketMQ plugin test, right? I noticed, it is unstable for various PRs. Could you check the CI logs?

OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants