Skip to content

fix: captured missing url for prisma mariadb adapter#2543

Merged
aryamohanan merged 9 commits into
mainfrom
feat-mariadb-adapter
May 14, 2026
Merged

fix: captured missing url for prisma mariadb adapter#2543
aryamohanan merged 9 commits into
mainfrom
feat-mariadb-adapter

Conversation

@aryamohanan
Copy link
Copy Markdown
Contributor

@aryamohanan aryamohanan commented May 11, 2026

Starting with Prisma v7, the new driver adapter model allows using different database drivers. For MySQL/MariaDB databases, Prisma now supports the @prisma/adapter-mariadb package. This adapter works seamlessly with both MySQL and MariaDB databases.

https://instana.io/s/Fp4ymN52R1eY0pieUVwA7g

ref: https://jsw.ibm.com/browse/INSTA-89747
See: https://github.com/prisma/prisma/tree/main/packages/adapter-mariadb

@aryamohanan aryamohanan force-pushed the feat-mariadb-adapter branch from abbcc8b to 91e879b Compare May 12, 2026 08:11
@aryamohanan aryamohanan force-pushed the feat-mariadb-adapter branch from b4fdde1 to 2d4949f Compare May 12, 2026 09:35
@aryamohanan aryamohanan marked this pull request as ready for review May 13, 2026 04:31
@aryamohanan aryamohanan requested a review from a team as a code owner May 13, 2026 04:31
const { PrismaPg } = await import('@prisma/adapter-pg');
adapter = new PrismaPg({ connectionString: process.env.INSTANA_CONNECT_POSTGRES_PRISMA_URL });
console.log(`Initialized Prisma ${version} with PostgreSQL adapter`);
} else if (provider === 'mysql') {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We have to call the provider mariadb.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok I understand the mariadb adapter can also work with mysql, but the adapter is called mariadb lol

Comment thread packages/collector/test/integration/currencies/databases/prisma/test_base.js Outdated
@aryamohanan aryamohanan changed the title test: added tests for prisma mariadb adapter fix: added tests for prisma mariadb adapter May 13, 2026
@aryamohanan aryamohanan changed the title fix: added tests for prisma mariadb adapter fix: captured missing url for prisma mariadb adapter May 13, 2026
Comment thread packages/core/src/tracing/instrumentation/databases/prisma.js
Copy link
Copy Markdown
Contributor

@kirrg001 kirrg001 left a comment

Choose a reason for hiding this comment

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

Cool. But please add a technical comment to explain the flows.

@aryamohanan aryamohanan force-pushed the feat-mariadb-adapter branch from 71dee18 to 96f287a Compare May 14, 2026 04:41
@aryamohanan aryamohanan force-pushed the feat-mariadb-adapter branch from 96f287a to e21e1d3 Compare May 14, 2026 06:55
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
27.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@aryamohanan aryamohanan merged commit dacba21 into main May 14, 2026
1 of 4 checks passed
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.

2 participants