Skip to content

SQL Server: Introduce EF and its version into the connection string's Application Name #35730

Description

@roji

In order to get information about EF usage, we'll consider injecting EF information into the Application Name of the connection string passed to SqlClient. This isn't ideal - we've discussed the possibility of a separate API point in SqlClient to allow EF (and similar layers) to add "user-agent" information.

/cc @saurabh500 @cheenamalhotra @perrysk-msft - is there an issue tracking the new SqlClient API on your side?

/cc @SamMonoRT

Activity

  1. added this to the Backlog milestone on Mar 5, 2025
  2. cheenamalhotra commented on Mar 5, 2025

    @cheenamalhotra
    Member

    We've been discussing internally on this, and most likely will come up with a new API for the same, to prevent inconsistent usage of Application Name from exploiting telemetry data.

    We're drafting out API structure and will share details soon for review.

  3. modified the milestones: Backlog, 10.0.0 on Mar 26, 2025
  4. self-assigned this
    on Jun 2, 2025
  5. added theissue type on Jun 15, 2025
  6. roji commented on Jun 27, 2025

    @roji
    MemberAuthor

    SqlClient-side user agent PRs: dotnet/SqlClient#3451, dotnet/SqlClient#3489

  7. added 4 commits that reference this issue on Aug 11, 2025
    fa3ee29
    daf752b
    f41e45e
    38632ed
  8. added a commit that references this issue on Aug 14, 2025
    65a206f
  9. changed the title [-]SQL Server: Consider introducing EF and its version into the connection string's Application Name[/-] [+]SQL Server: Introduce EF and its version into the connection string's Application Name[/+] on Aug 14, 2025
  10. roji commented on Aug 14, 2025

    @roji
    MemberAuthor

    Opened #36571 to track switching to the upcoming new SqlClient user-agent mechanism, replacing this.

  11. roji commented on Oct 9, 2025

    @roji
    MemberAuthor

    Note breaking aspect in #36911.

  12. mdzieg commented on Jun 5, 2026

    @mdzieg

    @roji
    My edge case is described in the docs—transaction in ef and non-ef code.

    I would rather not set the application name to anything explicitly, as the connection string is in the env and reused across several apps. Is there a way to disable this functionality? I want my connection string used as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions