mirror of
https://github.com/bitwarden/server.git
synced 2024-11-28 13:15:12 +01: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: AssemblyTitle("Bit.Api")]
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("bitwarden")]
|
[assembly: AssemblyCompany("8bit Solutions LLC")]
|
||||||
[assembly: AssemblyProduct("bitwarden")]
|
[assembly: AssemblyProduct("bitwarden")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
|
@ -38,6 +38,7 @@ namespace Bit.Api
|
|||||||
if(env.IsDevelopment())
|
if(env.IsDevelopment())
|
||||||
{
|
{
|
||||||
builder.AddUserSecrets();
|
builder.AddUserSecrets();
|
||||||
|
builder.AddApplicationInsightsSettings(developerMode: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.AddEnvironmentVariables();
|
builder.AddEnvironmentVariables();
|
||||||
@ -49,6 +50,8 @@ namespace Bit.Api
|
|||||||
|
|
||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
|
services.AddApplicationInsightsTelemetry(Configuration);
|
||||||
|
|
||||||
var provider = services.BuildServiceProvider();
|
var provider = services.BuildServiceProvider();
|
||||||
|
|
||||||
// Options
|
// Options
|
||||||
@ -164,6 +167,9 @@ namespace Bit.Api
|
|||||||
globalSettings.Loggr.ApiKey);
|
globalSettings.Loggr.ApiKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.UseApplicationInsightsRequestTelemetry();
|
||||||
|
app.UseApplicationInsightsExceptionTelemetry();
|
||||||
|
|
||||||
// Add static files to the request pipeline.
|
// Add static files to the request pipeline.
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
|
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
|
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
|
||||||
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
|
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
|
||||||
"Microsoft.Extensions.Configuration.Binder": "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": {
|
"tools": {
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
"ApplicationInsights": {
|
||||||
|
"InstrumentationKey": "5e6c8e7c-8a6d-4d4b-866e-4b80e5b9203e"
|
||||||
|
},
|
||||||
"globalSettings": {
|
"globalSettings": {
|
||||||
"siteName": "bitwarden",
|
"siteName": "bitwarden",
|
||||||
"baseVaultUri": "http://localhost:4001",
|
"baseVaultUri": "http://localhost:4001",
|
||||||
|
@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyTitle("Bit.Core")]
|
[assembly: AssemblyTitle("Bit.Core")]
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("bitwarden")]
|
[assembly: AssemblyCompany("8bit Solutions LLC")]
|
||||||
[assembly: AssemblyProduct("bitwarden")]
|
[assembly: AssemblyProduct("bitwarden")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
|
Loading…
Reference in New Issue
Block a user