1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-28 23:04:50 -05:00

added application insights to api

This commit is contained in:
Kyle Spearrin 2016-10-27 00:09:55 -04:00
parent 2bc7799f3c
commit eb6c0a5068
8 changed files with 135 additions and 125 deletions

View File

@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Bit.Api")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("bitwarden")]
[assembly: AssemblyCompany("8bit Solutions LLC")]
[assembly: AssemblyProduct("bitwarden")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]

View File

@ -38,6 +38,7 @@ namespace Bit.Api
if(env.IsDevelopment())
{
builder.AddUserSecrets();
builder.AddApplicationInsightsSettings(developerMode: true);
}
builder.AddEnvironmentVariables();
@ -49,6 +50,8 @@ namespace Bit.Api
public void ConfigureServices(IServiceCollection services)
{
services.AddApplicationInsightsTelemetry(Configuration);
var provider = services.BuildServiceProvider();
// Options
@ -164,6 +167,9 @@ namespace Bit.Api
globalSettings.Loggr.ApiKey);
}
app.UseApplicationInsightsRequestTelemetry();
app.UseApplicationInsightsExceptionTelemetry();
// Add static files to the request pipeline.
app.UseStaticFiles();

View File

@ -18,7 +18,8 @@
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.Binder": "1.0.0",
"Loggr.Extensions.Logging": "1.0.0"
"Loggr.Extensions.Logging": "1.0.0",
"Microsoft.ApplicationInsights.AspNetCore": "1.0.0"
},
"tools": {
@ -29,7 +30,7 @@
},
"frameworks": {
"net461": { }
"net461": {}
},
"buildOptions": {

View File

@ -1,4 +1,7 @@
{
"ApplicationInsights": {
"InstrumentationKey": "5e6c8e7c-8a6d-4d4b-866e-4b80e5b9203e"
},
"globalSettings": {
"siteName": "bitwarden",
"baseVaultUri": "http://localhost:4001",

View File

@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Bit.Core")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("bitwarden")]
[assembly: AssemblyCompany("8bit Solutions LLC")]
[assembly: AssemblyProduct("bitwarden")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]