Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re-enabling FunctionResultAggregator
- Loading branch information
Showing
4 changed files
with
86 additions
and
4 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
src/WebJobs.Script.WebHost/Diagnostics/FunctionInstanceLogCollectorProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using Microsoft.Azure.WebJobs.Host.Executors; | ||
using Microsoft.Azure.WebJobs.Host.Loggers; | ||
using Microsoft.Azure.WebJobs.Script.Diagnostics; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics | ||
{ | ||
internal class FunctionInstanceLogCollectorProvider : IEventCollectorProvider | ||
{ | ||
private readonly IFunctionMetadataManager _metadataManager; | ||
private readonly IProxyMetadataManager _proxyMetadataManager; | ||
private readonly IMetricsLogger _metrics; | ||
private readonly IHostIdProvider _hostIdProvider; | ||
private readonly IConfiguration _configuration; | ||
private readonly ILoggerFactory _loggerFactory; | ||
|
||
public FunctionInstanceLogCollectorProvider(IFunctionMetadataManager metadataManager, IProxyMetadataManager proxyMetadataManager, | ||
IMetricsLogger metrics, IHostIdProvider hostIdProvider, IConfiguration configuration, ILoggerFactory loggerFactory) | ||
{ | ||
_metadataManager = metadataManager ?? throw new ArgumentNullException(nameof(metadataManager)); | ||
_proxyMetadataManager = proxyMetadataManager ?? throw new ArgumentNullException(nameof(proxyMetadataManager)); | ||
_metrics = metrics ?? throw new ArgumentNullException(nameof(metrics)); | ||
_hostIdProvider = hostIdProvider ?? throw new ArgumentNullException(nameof(hostIdProvider)); | ||
_configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); | ||
_loggerFactory = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory)); | ||
} | ||
|
||
public IAsyncCollector<FunctionInstanceLogEntry> Create() | ||
{ | ||
return new FunctionInstanceLogger(_metadataManager, _proxyMetadataManager, _metrics, _hostIdProvider, _configuration, _loggerFactory); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters