-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunctionBase.cs
More file actions
30 lines (25 loc) · 907 Bytes
/
FunctionBase.cs
File metadata and controls
30 lines (25 loc) · 907 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using Microsoft.ApplicationInsights;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using System.Diagnostics;
namespace Unstruk.Functions.Common
{
public abstract class FunctionBase
{
#region Public fields
protected readonly ILogger Logger;
protected readonly IConfiguration Configuration;
protected readonly TelemetryClient TelemetryClient;
#endregion
public FunctionBase(ILogger logger = null, IConfiguration configuration = null, TelemetryClient client = null)
{
this.Logger = logger;
this.Configuration = configuration;
this.TelemetryClient = client;
}
protected Activity GenerateActivity(string operationName, string correlationId)
{
return new Activity(operationName).AddTag("correlationId", correlationId);
}
}
}