Azure / azure-functions-sql-extension

Azure SQL bindings for Azure Functions ⚡️ supports Azure SQL Database, Azure SQL Managed Instance, and SQL Server 2016+
https://aka.ms/sqlbindings
MIT License
120 stars 61 forks source link

Add default Application Name to connections #597

Open Charles-Gagnon opened 1 year ago

Charles-Gagnon commented 1 year ago

Currently we don't specify an Application Name, which means that unless the user specifies one themselves it will just show up as something generic like this :

Core Microsoft SqlClient Data Provider

which isn't very useful.

Users can always specify it themselves in their connection string, but the downside of this is that there's no easy way to tell which connection is for what purpose (and we make a number of connections, especially for the trigger).

So the first question is whether we should do anything about this at all - or just let people specify an Application Name themselves if they want.

Some other options if we do want to add it :

  1. Assign a name ourselves to each connection, overwriting whatever the user may have specified
  2. Check if the user already passed in a name - and if so then do nothing (leave it as-is)
  3. Check if the user already passed in a name - and if so then use that name but append a specifier to the end to signify what the connection is doing. If none provided have a default value for each connection.
Charles-Gagnon commented 1 year ago

@dzsquared Do you have any thoughts on this?

dzsquared commented 1 year ago