How to add application insights to AWS Serverless Lambda?
Need to specify the website_hostname
and need to specify the APPINSIGHTS_INSTRUMENTATIONKEY
var functionProps = new FunctionProps()
{
Environment = new Dictionary<string, string>()
{
{ nameof(DeploymentOptions.ApiConfigKey), apiConfigKey},
{ "WEBSITE_HOSTNAME", scope.StackName },
{ "APPINSIGHTS_INSTRUMENTATIONKEY", Fn.ImportValue(ATS.AWSBootstrap.ExportNames.EmployeePlatformAppInsightsKey) },
},
Timeout = Duration.Minutes(1),
MemorySize = 1024,
};
{ "Logging": { "ApplicationInsights": { "LogLevel": { "Default": "Debug", "Microsoft": "Error" } }, "LogLevel": { "Default": "Information" } }, "ApplicationInsights": { "InstrumentationKey": "000000000000000000000000000000" } }
APPINSIGHTS_INSTRUMENTATIONKEY
ReplyDeleteLogging__LogLevel__Default - Information
WEBSITE_HOSTNAME - Accounts