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:
parent
2bc7799f3c
commit
eb6c0a5068
@ -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("")]
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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": {
|
||||
|
@ -1,4 +1,7 @@
|
||||
{
|
||||
"ApplicationInsights": {
|
||||
"InstrumentationKey": "5e6c8e7c-8a6d-4d4b-866e-4b80e5b9203e"
|
||||
},
|
||||
"globalSettings": {
|
||||
"siteName": "bitwarden",
|
||||
"baseVaultUri": "http://localhost:4001",
|
||||
|
@ -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("")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user