Skip to content

Support for Configuring Npgsql Tracing Options in NHibernate #3630

@sgudapa

Description

@sgudapa

I am using NHibernate with PostgreSQL via the Npgsql driver in our application. We are aiming to configure tracing options in Npgsql to control and eliminate specific logs emitted by Npgsql, particularly to improve our logging output and reduce noise.

The latest version of Npgsql introduces the ability to configure tracing options using the NpgsqlDataSourceBuilder API, as detailed in the Npgsql documentation:

Npgsql Tracing Documentation
However, I have encountered an issue where NHibernate's NpgsqlDriver does not seem to support configuring these tracing options. It appears that NHibernate uses NpgsqlConnection directly to create connections, without exposing a way to utilize NpgsqlDataSource or configure the tracing options.

My Questions:

  1. Is there a way to configure Npgsql tracing options within NHibernate?
  2. Can we extend or customize the NpgsqlDriver or ConnectionProvider to use NpgsqlDataSource and apply tracing configurations?
  3. Are there plans to update NHibernate to support the latest Npgsql features, including the NpgsqlDataSource API?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions