Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support connection name-based configuration for Azure components #5827

Merged
merged 11 commits into from
Sep 27, 2024

Conversation

captainsafia
Copy link
Member

@captainsafia captainsafia commented Sep 22, 2024

Description

This pull request adds support for named configuration providers to Azure components and updates resource types that implement IResourceWithAzureFunctions config to inject values into configuration model.

  • Upgraded Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore to version 2.0.0-preview1 to use new FunctionsWebApplicationBuilder implementation so we can take advantage of IHostApplicationBuilder-based extension methods for integrations.
  • Updates implementors of IResourceWithAzureFunctionsConfig to inject named configuration values into environment variables.
  • Updated AzureComponent to support binding settings from named configuration providers.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?
Microsoft Reviewers: Open in CodeFlow

@davidfowl
Copy link
Member

davidfowl commented Sep 22, 2024

Test Log
| [2024-09-22T05:39:03] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 342: 2024-09-22T05:39:03.9590000Z [2024-09-22T05:39:03.959Z] Starting JobHost
| [2024-09-22T05:39:03] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 343: 2024-09-22T05:39:03.9630000Z [2024-09-22T05:39:03.962Z] Starting Host (HostId=a006yd6-2112638378, InstanceId=38584922-b3fe-4ddb-9e24-2da221b648d6, Version=4.834.3.22875, ProcessId=26737, AppDomainId=1, InDebugMode=False, InDiagnosticMode=False, FunctionsExtensionVersion=(null))
| [2024-09-22T05:39:03] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 344: 2024-09-22T05:39:03.9660000Z [2024-09-22T05:39:03.965Z] Loading functions metadata
| [2024-09-22T05:39:03] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 345: 2024-09-22T05:39:03.9660000Z [2024-09-22T05:39:03.965Z] Worker indexing is enabled
| [2024-09-22T05:39:03] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 346: 2024-09-22T05:39:03.9660000Z [2024-09-22T05:39:03.965Z] Fetching metadata for workerRuntime: dotnet-isolated
| [2024-09-22T05:39:03] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 347: 2024-09-22T05:39:03.9660000Z [2024-09-22T05:39:03.965Z] Reading functions metadata (Worker)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 348: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z] Unhandled exception. System.NotSupportedException: Multiple calls to UseOtlpExporter on the same IServiceCollection are not supported.
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 349: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at OpenTelemetry.Exporter.OpenTelemetryBuilderServiceProviderExtensions.EnsureSingleUseOtlpExporterRegistration(IServiceProvider serviceProvider)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 350: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at OpenTelemetry.Exporter.OtlpExporterBuilder.<RegisterOtlpExporterServices>g__GetBuilderOptionsAndValidateRegistrations|14_4(IServiceProvider sp, String name)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 351: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at OpenTelemetry.Exporter.OtlpExporterBuilder.<>c__DisplayClass14_0.<RegisterOtlpExporterServices>b__1(IServiceProvider sp, LoggerProviderBuilder logging)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 352: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at OpenTelemetry.Logs.OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions.ConfigureLoggerProviderBuilderCallbackWrapper.ConfigureBuilder(IServiceProvider serviceProvider, LoggerProviderBuilder loggerProviderBuilder)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 353: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at OpenTelemetry.Logs.LoggerProviderSdk..ctor(IServiceProvider serviceProvider, Boolean ownsServiceProvider)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 354: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at OpenTelemetry.Logs.LoggerProviderBuilderBase.<>c.<.ctor>b__3_0(IServiceProvider sp)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 355: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 356: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 357: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 358: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 359: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 360: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 361: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 362: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 363: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 364: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 365: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.Logging.OpenTelemetryLoggingExtensions.<>c.<AddOpenTelemetryInternal>b__5_1(IServiceProvider sp)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 366: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 367: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 368: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 369: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 370: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 371: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 372: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 373: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 374: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 375: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 376: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 377: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.951Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 378: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 379: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 380: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 381: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 382: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 383: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 384: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 385: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 386: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 387: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 388: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 389: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 390: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 391: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 392: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.Hosting.HostBuilder.<>c__DisplayClass35_0.<PopulateServiceCollection>b__2(IServiceProvider _)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 393: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 394: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 395: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 396: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 397: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 398: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 399: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 400: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 401: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 402: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 403: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.Hosting.HostBuilder.ResolveHost(IServiceProvider serviceProvider, DiagnosticListener diagnosticListener)
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 404: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 405: 2024-09-22T05:39:04.9520000Z [2024-09-22T05:39:04.952Z]    at Microsoft.Extensions.Hosting.FunctionsWebApplicationBuilder.Build() in D:\a\_work\1\s\extensions\Worker.Extensions.Http.AspNetCore\src\FunctionsWebApplicationBuilder.cs:line 69
| [2024-09-22T05:39:05] AzureFunctionsEndToEnd.AppHost.Resources.funcapp Information: 406: 2024-09-22T05:39:04.9540000Z [2024-09-22T05:39:04.954Z]    at Program.<Main>$(String[] args) in /datadisks/disk1/work/B7DE097C/w/A6B8098C/e/playground/AzureFunctionsEndToEnd/AzureFunctionsEndToEnd.Functions/Program.cs:line 21

@captainsafia
Copy link
Member Author

captainsafia commented Sep 22, 2024

Test Log

Yeah, I pulled a goofy pushing this commit without testing locally 🙊

We'll have to figure out how to inject the Functions-specific UseFunctionsWorkerDefaults into the OTel that is configured by AddServiceDefaults once OTtel is actually flowing from the Functions host.

  • We could require that users modify the default AddServiceDefaults implementation with the UseFunctionsWorkerDefaults call.
  • Configure some sort of of callback that can be set of AddServiceDefaults to modify the OpenTelemetryBuilder.

BindSettingsToConfiguration(settings, configSection);
BindSettingsToConfiguration(settings, configSection.GetSection(connectionName));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we only doing this for Azure client libraries? Shouldn't we be doing it for all, so they are consistent?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capturing offline discussion, we'll do this for all integrations but prioritizing Azure components and dependencies for Functions in this PR.

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is getting pretty close. Just a few more comments.

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking really good. I'm going to approve it now, but obviously we will need to resolve conflicts and get CI green. Assuming no more material changes are made, this is ready to ship IMO.

@captainsafia captainsafia added the area-integrations Issues pertaining to Aspire Integrations packages label Sep 27, 2024
@captainsafia captainsafia added the azure-functions Issues related to the Azure Functions integration label Sep 27, 2024
@captainsafia captainsafia merged commit d38ceea into main Sep 27, 2024
9 checks passed
@captainsafia captainsafia deleted the safia/funcs-dual-config branch September 27, 2024 20:12
@github-actions github-actions bot locked and limited conversation to collaborators Oct 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-integrations Issues pertaining to Aspire Integrations packages azure-functions Issues related to the Azure Functions integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants