mirror of
https://github.com/bitwarden/server.git
synced 2024-11-25 12:45:18 +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("")]
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
{
|
{
|
||||||
"iisSettings": {
|
"iisSettings": {
|
||||||
"windowsAuthentication": false,
|
"windowsAuthentication": false,
|
||||||
"anonymousAuthentication": true,
|
"anonymousAuthentication": true,
|
||||||
"iisExpress": {
|
"iisExpress": {
|
||||||
"applicationUrl": "http://localhost:4000",
|
"applicationUrl": "http://localhost:4000",
|
||||||
"sslPort": 0
|
"sslPort": 0
|
||||||
}
|
|
||||||
},
|
|
||||||
"profiles": {
|
|
||||||
"IIS Express": {
|
|
||||||
"commandName": "IISExpress",
|
|
||||||
"launchBrowser": true,
|
|
||||||
"environmentVariables": {
|
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Web": {
|
|
||||||
"commandName": "Project",
|
|
||||||
"launchBrowser": true,
|
|
||||||
"launchUrl": "http://localhost:5000",
|
|
||||||
"environmentVariables": {
|
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"profiles": {
|
||||||
|
"IIS Express": {
|
||||||
|
"commandName": "IISExpress",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Web": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "http://localhost:5000",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
|
|
||||||
|
@ -1,59 +1,60 @@
|
|||||||
{
|
{
|
||||||
"userSecretsId": "aspnet5-bitwarden-Api",
|
"userSecretsId": "aspnet5-bitwarden-Api",
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Core": {
|
"Core": {
|
||||||
"target": "project"
|
"target": "project"
|
||||||
},
|
|
||||||
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
|
|
||||||
"Microsoft.AspNetCore.Mvc": "1.0.0",
|
|
||||||
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
|
|
||||||
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
|
|
||||||
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0",
|
|
||||||
"Microsoft.Extensions.Logging": "1.0.0",
|
|
||||||
"Microsoft.Extensions.Logging.Console": "1.0.0",
|
|
||||||
"Microsoft.Extensions.Logging.Debug": "1.0.0",
|
|
||||||
"Microsoft.AspNetCore.Cors": "1.0.0",
|
|
||||||
"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"
|
|
||||||
},
|
},
|
||||||
|
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
|
||||||
|
"Microsoft.AspNetCore.Mvc": "1.0.0",
|
||||||
|
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
|
||||||
|
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
|
||||||
|
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0",
|
||||||
|
"Microsoft.Extensions.Logging": "1.0.0",
|
||||||
|
"Microsoft.Extensions.Logging.Console": "1.0.0",
|
||||||
|
"Microsoft.Extensions.Logging.Debug": "1.0.0",
|
||||||
|
"Microsoft.AspNetCore.Cors": "1.0.0",
|
||||||
|
"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",
|
||||||
|
"Microsoft.ApplicationInsights.AspNetCore": "1.0.0"
|
||||||
|
},
|
||||||
|
|
||||||
"tools": {
|
"tools": {
|
||||||
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
|
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
|
||||||
"version": "1.0.0-preview2-final",
|
"version": "1.0.0-preview2-final",
|
||||||
"imports": "portable-net45+win8+dnxcore50"
|
"imports": "portable-net45+win8+dnxcore50"
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"frameworks": {
|
|
||||||
"net461": { }
|
|
||||||
},
|
|
||||||
|
|
||||||
"buildOptions": {
|
|
||||||
"emitEntryPoint": true,
|
|
||||||
"preserveCompilationContext": true
|
|
||||||
},
|
|
||||||
|
|
||||||
"runtimeOptions": {
|
|
||||||
"gcServer": false,
|
|
||||||
"gcConcurrent": true
|
|
||||||
},
|
|
||||||
|
|
||||||
"publishOptions": {
|
|
||||||
"include": [
|
|
||||||
"wwwroot",
|
|
||||||
"Views",
|
|
||||||
"settings.json",
|
|
||||||
"settings.Production.json",
|
|
||||||
"settings.Staging.json",
|
|
||||||
"web.config"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
"scripts": {
|
|
||||||
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"frameworks": {
|
||||||
|
"net461": {}
|
||||||
|
},
|
||||||
|
|
||||||
|
"buildOptions": {
|
||||||
|
"emitEntryPoint": true,
|
||||||
|
"preserveCompilationContext": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"runtimeOptions": {
|
||||||
|
"gcServer": false,
|
||||||
|
"gcConcurrent": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"publishOptions": {
|
||||||
|
"include": [
|
||||||
|
"wwwroot",
|
||||||
|
"Views",
|
||||||
|
"settings.json",
|
||||||
|
"settings.Production.json",
|
||||||
|
"settings.Staging.json",
|
||||||
|
"web.config"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"scripts": {
|
||||||
|
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,28 @@
|
|||||||
{
|
{
|
||||||
"globalSettings": {
|
"ApplicationInsights": {
|
||||||
"siteName": "bitwarden",
|
"InstrumentationKey": "5e6c8e7c-8a6d-4d4b-866e-4b80e5b9203e"
|
||||||
"baseVaultUri": "http://localhost:4001",
|
},
|
||||||
"jwtSigningKey": "THIS IS A SECRET. IT KEEPS YOUR TOKEN SAFE. :)",
|
"globalSettings": {
|
||||||
"sqlServer": {
|
"siteName": "bitwarden",
|
||||||
"connectionString": "SECRET"
|
"baseVaultUri": "http://localhost:4001",
|
||||||
},
|
"jwtSigningKey": "THIS IS A SECRET. IT KEEPS YOUR TOKEN SAFE. :)",
|
||||||
"mail": {
|
"sqlServer": {
|
||||||
"apiKey": "SECRET",
|
"connectionString": "SECRET"
|
||||||
"replyToEmail": "do-not-reply@bitwarden.com"
|
},
|
||||||
},
|
"mail": {
|
||||||
"loggr": {
|
"apiKey": "SECRET",
|
||||||
"logKey": "SECRET",
|
"replyToEmail": "do-not-reply@bitwarden.com"
|
||||||
"apiKey": "SECRET"
|
},
|
||||||
},
|
"loggr": {
|
||||||
"push": {
|
"logKey": "SECRET",
|
||||||
"apnsCertificateThumbprint": "SECRET",
|
"apiKey": "SECRET"
|
||||||
"apnsCertificatePassword": "SECRET",
|
},
|
||||||
"gcmSenderId": "SECRET",
|
"push": {
|
||||||
"gcmApiKey": "SECRET",
|
"apnsCertificateThumbprint": "SECRET",
|
||||||
"gcmAppPackageName": "com.x8bit.bitwarden"
|
"apnsCertificatePassword": "SECRET",
|
||||||
}
|
"gcmSenderId": "SECRET",
|
||||||
|
"gcmApiKey": "SECRET",
|
||||||
|
"gcmAppPackageName": "com.x8bit.bitwarden"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<system.webServer>
|
<system.webServer>
|
||||||
<handlers>
|
<handlers>
|
||||||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
|
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
|
||||||
</handlers>
|
</handlers>
|
||||||
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
|
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
|
||||||
</system.webServer>
|
</system.webServer>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -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("")]
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.AspNetCore.Identity": "1.0.0",
|
"Microsoft.AspNetCore.Identity": "1.0.0",
|
||||||
"Microsoft.AspNetCore.Authentication.JwtBearer": "1.0.0",
|
"Microsoft.AspNetCore.Authentication.JwtBearer": "1.0.0",
|
||||||
"OtpSharp": "1.3.0.4",
|
"OtpSharp": "1.3.0.4",
|
||||||
"Microsoft.AspNetCore.Mvc.Abstractions": "1.0.0",
|
"Microsoft.AspNetCore.Mvc.Abstractions": "1.0.0",
|
||||||
"Dapper": "1.42.0",
|
"Dapper": "1.42.0",
|
||||||
"DataTableProxy": "1.2.0",
|
"DataTableProxy": "1.2.0",
|
||||||
"Sendgrid": "6.3.4",
|
"Sendgrid": "6.3.4",
|
||||||
"StackExchange.Redis": "1.0.488",
|
"StackExchange.Redis": "1.0.488",
|
||||||
"PushSharp": "4.0.10"
|
"PushSharp": "4.0.10"
|
||||||
},
|
},
|
||||||
|
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"net461": {
|
"net461": {
|
||||||
"frameworkAssemblies": {
|
"frameworkAssemblies": {
|
||||||
"System.ComponentModel.DataAnnotations": "4.0.0.0",
|
"System.ComponentModel.DataAnnotations": "4.0.0.0",
|
||||||
"System.Data": "4.0.0.0"
|
"System.Data": "4.0.0.0"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user