Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.49k stars 4.81k forks source link

[FEATURE REQ] Service discovery with Azure services #47255

Open erwinkramer opened 3 days ago

erwinkramer commented 3 days ago

Library name

Any

Please describe the feature.

Would be cool if we can leverage Service discovery in .NET with the Azure SDK. This way we can streamline the usage of Azure endpoints.

So for example doing this, where you can set on 3 levels:

services.ConfigureAzureClientDefaults(clients =>
{
    clients.AddServiceDiscovery(); // Turn on service discovery by default for all clients: largest scope
});

services.AddAzureClients(builder =>
{
    builder.AddServiceDiscovery(); // Turn on service discovery by default for all clients: smaller scope

    builder.AddBlobServiceClient(serviceUri: new Uri("https://myBlobService")).ConfigureOptions( options =>
    {
        options.AddServiceDiscovery(); // Turn on service discovery by default for all clients: smallest scope
    }

    );
});
jsquire commented 2 days ago

//fyi: @annelo-msft, @m-redding

jsquire commented 2 days ago

Hi @erwinkramer. Thank you for your suggestion. I'm not sure how well service discovery maps to the Azure SDK packages, but we'll take a deeper look into things and give this consideration.