Skip to content

Report first schema in OTel tracing db.namespace #6336

Open

Description

@roji

From the PostgreSQL tracing specs:

db.namespace SHOULD be set to the combination of database and schema name following the {database}|{schema} pattern. If either {database} or {schema} is unavailable, db.namespace SHOULD be set to the other (without any | separator)

search_path is one of the settings that get an asynchronous ParameterStatus message when they're changed (link), so we can be aware of when the user changes it.

However, PG doesn't seem to send search_path in the initial handshake, so we're unaware of the initial value. We can add a SHOW search_path query to type loading to get the database default (just like we currently fetch version); but we need to check what happens if the search_path is modified via the connection string/startup packet - if PG sends ParameterStatus for that then we're good.

Activity

  1. added this to the 11.0.0 milestone on Nov 20, 2025
  2. modified the milestones: 11.0.0, 12.0.0 on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions