From c40b0c458c6297f9114ec8616fcd24c57d6b6dca Mon Sep 17 00:00:00 2001 From: YasanPunch Date: Thu, 2 Apr 2026 09:22:33 +0530 Subject: [PATCH 1/5] Update changelog for version 1.18.0 --- changelog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/changelog.md b/changelog.md index 86d8f511..3b9ebffa 100644 --- a/changelog.md +++ b/changelog.md @@ -6,8 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.18.0] + ### Added - [Introduce additional Debezium properties](https://github.com/ballerina-platform/ballerina-library/issues/8572) +- [Add observability metrics tags to PostgreSQL client](https://github.com/ballerina-platform/ballerina-library/issues/8572) ## [1.16.1] - 2024-06-13 From 887d45267e40dafbd933d61cb17d2c7988bbbe33 Mon Sep 17 00:00:00 2001 From: YasanPunch <104901790+YasanPunch@users.noreply.github.com> Date: Thu, 2 Apr 2026 09:28:31 +0530 Subject: [PATCH 2/5] Updated with correct issue --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 3b9ebffa..24edd487 100644 --- a/changelog.md +++ b/changelog.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - [Introduce additional Debezium properties](https://github.com/ballerina-platform/ballerina-library/issues/8572) -- [Add observability metrics tags to PostgreSQL client](https://github.com/ballerina-platform/ballerina-library/issues/8572) +- [Add observability metrics tags to PostgreSQL client](https://github.com/ballerina-platform/ballerina-library/issues/7763) ## [1.16.1] - 2024-06-13 From 8f06a910bf598ddcb7191599f69aa193c7c382fc Mon Sep 17 00:00:00 2001 From: YasanPunch Date: Thu, 2 Apr 2026 12:36:16 +0530 Subject: [PATCH 3/5] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 10 +++++----- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index d946d03b..b5ec101e 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,13 +1,13 @@ [package] org = "ballerinax" name = "postgresql" -version = "1.17.0" +version = "1.18.0" authors = ["Ballerina"] keywords = ["client", "network", "SQL", "RDBMS", "Vendor/PostgreSQL", "Area/Database", "Type/Connector", "Type/Trigger"] repository = "https://github.com/ballerina-platform/module-ballerinax-postgresql" icon = "icon.png" license = ["Apache-2.0"] -distribution = "2201.12.0" +distribution = "2201.13.0" [platform.java21] graalvmCompatible = true @@ -15,11 +15,11 @@ graalvmCompatible = true [[platform.java21.dependency]] groupId = "io.ballerina.stdlib" artifactId = "postgresql-native" -version = "1.17.0" -path = "../native/build/libs/postgresql-native-1.17.0-SNAPSHOT.jar" +version = "1.18.0" +path = "../native/build/libs/postgresql-native-1.18.0-SNAPSHOT.jar" [[platform.java21.dependency]] groupId = "io.ballerina.stdlib" artifactId = "sql-native" version = "1.19.0" -path = "./lib/sql-native-1.19.0-20260331-111100-8a9f7f8.jar" +path = "./lib/sql-native-1.19.0.jar" diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index 1a947a0b..9fdbea0a 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "postgresql-compiler-plugin" class = "io.ballerina.stdlib.postgresql.compiler.PostgreSQLCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/postgresql-compiler-plugin-1.17.0-SNAPSHOT.jar" +path = "../compiler-plugin/build/libs/postgresql-compiler-plugin-1.18.0-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index e0ba9f71..f1b43e6a 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -235,7 +235,7 @@ modules = [ [[package]] org = "ballerinax" name = "postgresql" -version = "1.17.0" +version = "1.18.0" dependencies = [ {org = "ballerina", name = "crypto"}, {org = "ballerina", name = "file"}, From 99ea18cf746d3b6e5010ebcb0512888a689dd0ab Mon Sep 17 00:00:00 2001 From: YasanPunch Date: Thu, 2 Apr 2026 15:54:26 +0530 Subject: [PATCH 4/5] Update specification document to reflect new observability features and connection pool metrics for PostgreSQL module --- docs/spec/spec.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/spec/spec.md b/docs/spec/spec.md index 9abf851b..4898d18e 100644 --- a/docs/spec/spec.md +++ b/docs/spec/spec.md @@ -3,7 +3,7 @@ _Owners_: @daneshk @niveathika _Reviewers_: @daneshk _Created_: 2022/01/14 -_Updated_: 2022/04/25 +_Updated_: 2026/04/02 _Edition_: Swan Lake ## Introduction @@ -18,11 +18,13 @@ The conforming implementation of the specification is released to Ballerina cent ## Contents 1. [Overview](#1-overview) -2. [Client](#2-client) - 2.1. [Connection Pool Handling](#21-connection-pool-handling) +2. [Client](#2-client) + 2.1. [Connection Pool Handling](#21-connection-pool-handling) 2.2. [Closing the Client](#22-closing-the-client) 3. [Queries and Values](#3-queries-and-values) 4. [Database Operations](#4-database-operations) +5. [Observability](#5-observability) + 5.1. [Metrics Tags](#51-metrics-tags) # 1. Overview @@ -211,6 +213,20 @@ All the above values are supported as typed `OutParameters` of the `call()` oper For more information on database operations see the [SQL Specification](https://github.com/ballerina-platform/module-ballerina-sql/blob/master/docs/spec/spec.md#4-database-operations) +# 5. Observability + +The PostgreSQL module supports observability through connection pool metrics, reported via the `ballerina/observe` module. The metric names and lifecycle are defined by the `ballerina/sql` module. For more information on connection pool metrics, see the [SQL specification](https://github.com/ballerina-platform/module-ballerina-sql/blob/master/docs/spec/spec.md). + +## 6.1. Metric tags + +The PostgreSQL module sets the following metric tags on every connection pool it creates. These tags are attached to all pool health and connection event metrics, enabling filtering and identification. + +| Tag | Source | Always present | Description | +|---|---|---|---| +| `db_host` | `host` parameter | Yes | Hostname of the MySQL server (defaults to `"localhost"`) | +| `db_port` | `port` parameter | Yes | Port number of the MySQL server (defaults to `3306`) | +| `db_name` | `database` parameter | No | Database name; omitted when `database` is `nil` or empty | + ### Change Data Capture Listener To listen for change data capture (CDC) events from a Postgres database, you must create a [`postgresql:CdcListener`](https://docs.central.ballerina.io/ballerinax/postgresql/latest#CdcListener) object. The listener allows your Ballerina application to react to changes (such as inserts, updates, and deletes) in real time. From 6ce573695701510afdebe33e72ab770fcd47b2ee Mon Sep 17 00:00:00 2001 From: Niveathika Date: Fri, 3 Apr 2026 11:34:49 +0530 Subject: [PATCH 5/5] Update changelog for version 1.18.0 release --- changelog.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 24edd487..1d2b23d4 100644 --- a/changelog.md +++ b/changelog.md @@ -6,12 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [1.18.0] +## [1.18.0] - 2026-04-03 ### Added -- [Introduce additional Debezium properties](https://github.com/ballerina-platform/ballerina-library/issues/8572) - [Add observability metrics tags to PostgreSQL client](https://github.com/ballerina-platform/ballerina-library/issues/7763) +## [1.17.0] + +### Added + +- [Introduce additional Debezium properties](https://github.com/ballerina-platform/ballerina-library/issues/8572) + ## [1.16.1] - 2024-06-13 ### Changed