Skip to content

Commit

Permalink
Updated ServerUrl and Api Key to work with local server instances. (#309
Browse files Browse the repository at this point in the history
)
  • Loading branch information
niemyjski authored May 31, 2023
1 parent 092ec02 commit 3ea304e
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions samples/Exceptionless.SampleAspNetCore/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Exceptionless": {
"ApiKey": "LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw",
"ServerUrl": "http://localhost:5000",
"ApiKey": "LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest",
"ServerUrl": "https://localhost:5201",
"DefaultData": {
"JSON_OBJECT": "{ \"Name\": \"Blake\" }",
"Boolean": true,
Expand Down
4 changes: 2 additions & 2 deletions samples/Exceptionless.SampleBlazorWebAssemblyApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;

ExceptionlessClient.Default.Configuration.ServerUrl = "http://localhost:5000";
ExceptionlessClient.Default.Startup("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw");
ExceptionlessClient.Default.Configuration.ServerUrl = "https://localhost:5201";
ExceptionlessClient.Default.Startup("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest");

var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
Expand Down
2 changes: 1 addition & 1 deletion samples/Exceptionless.SampleConsole/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using LogLevel = Exceptionless.Logging.LogLevel;

// example of setting an attribute value in config.
[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", ServerUrl = "http://localhost:5000")]
[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", ServerUrl = "https://localhost:5201")]
[assembly: ExceptionlessSetting("EnableWelcomeMessage", "True")]

namespace Exceptionless.SampleConsole {
Expand Down
4 changes: 2 additions & 2 deletions samples/Exceptionless.SampleHosting/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Exceptionless": {
"ApiKey": "LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw",
"ServerUrl": "http://localhost:5000",
"ApiKey": "LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest",
"ServerUrl": "https://localhost:5201",
"DefaultData": {
"JSON_OBJECT": "{ \"Name\": \"Blake\" }",
"Boolean": true,
Expand Down
4 changes: 2 additions & 2 deletions samples/Exceptionless.SampleLambda/Function.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public class Function
public async Task<string> FunctionHandler(string input, ILambdaContext context)
{
var client = new ExceptionlessClient(c => {
c.ApiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw";
c.ServerUrl = "http://localhost:5000";
c.ApiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest";
c.ServerUrl = "https://localhost:5201";
// read configuration values from environment variables
c.ReadFromEnvironmentalVariables();
Expand Down
4 changes: 2 additions & 2 deletions samples/Exceptionless.SampleLambdaAspNetCore/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Exceptionless": {
"ApiKey": "LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw",
"ServerUrl": "http://localhost:5000",
"ApiKey": "LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest",
"ServerUrl": "https://localhost:5201",
"ProcessQueueOnCompletedRequest": true,
"DefaultData": {
"JSON_OBJECT": "{ \"Name\": \"Blake\" }",
Expand Down
4 changes: 2 additions & 2 deletions samples/Exceptionless.SampleMvc/Web.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="Exceptionless:ApiKey" value="LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw" />
<add key="Exceptionless:ServerUrl" value="http://localhost:5000" />
<add key="Exceptionless:ApiKey" value="LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest" />
<add key="Exceptionless:ServerUrl" value="https://localhost:5201" />
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
Expand Down
2 changes: 1 addition & 1 deletion samples/Exceptionless.SampleWcf/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<section name="exceptionless" type="Exceptionless.ExceptionlessSection, Exceptionless"/>
</configSections>

<exceptionless apiKey="LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw" serverUrl="http://localhost:5000">
<exceptionless apiKey="LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest" serverUrl="https://localhost:5201">
<settings>
<add name="TraceLogLimit" value="25"/>
</settings>
Expand Down
4 changes: 2 additions & 2 deletions samples/Exceptionless.SampleWeb/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<configSections>
<section name="exceptionless" type="Exceptionless.ExceptionlessSection, Exceptionless" requirePermission="false"/>
</configSections>
<exceptionless apiKey="LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw" serverUrl="http://localhost:5000" tags="Tag1,Tag2">
<!--<exceptionless apiKey="LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw" serverUrl="http://localhost:5000" tags="Tag1,Tag2"
<exceptionless apiKey="LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest" serverUrl="https://localhost:5201" tags="Tag1,Tag2">
<!--<exceptionless apiKey="LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest" serverUrl="https://localhost:5201" tags="Tag1,Tag2"
storageSerializer="Exceptionless.MessagePack.MessagePackStorageSerializer, Exceptionless.MessagePack"
storagePath="|DataDirectory|\Logs">-->
<settings>
Expand Down
2 changes: 1 addition & 1 deletion samples/Exceptionless.SampleWebApi/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<configSections>
<section name="exceptionless" type="Exceptionless.ExceptionlessSection, Exceptionless" />
</configSections>
<exceptionless apiKey="LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw" serverUrl="http://localhost:5000" storagePath="|DataDirectory|\Queue">
<exceptionless apiKey="LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest" serverUrl="https://localhost:5201" storagePath="|DataDirectory|\Queue">
<settings>
<add name="TraceLogLimit" value="30" />
</settings>
Expand Down
2 changes: 1 addition & 1 deletion samples/Exceptionless.SampleWindows/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<section name="exceptionless" type="Exceptionless.ExceptionlessSection, Exceptionless"/>
</configSections>

<exceptionless apiKey="LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw" serverUrl="http://localhost:5000"/>
<exceptionless apiKey="LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest" serverUrl="https://localhost:5201"/>

<system.diagnostics>
<trace autoflush="true">
Expand Down
2 changes: 1 addition & 1 deletion samples/Exceptionless.SampleWindows/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Windows.Forms;
using Exceptionless.Configuration;

[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", ServerUrl = "http://localhost:5000")]
[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", ServerUrl = "https://localhost:5201")]

namespace Exceptionless.SampleWindows {
internal static class Program {
Expand Down
2 changes: 1 addition & 1 deletion samples/Exceptionless.SampleWpf/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
using Exceptionless.Configuration;

[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", ServerUrl = "http://localhost:5000")]
[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", ServerUrl = "https://localhost:5201")]
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private async Task RunAsync(ExceptionlessClient client) {
}

private ExceptionlessClient GetClient(Func<CertificateData, bool> validator, string serverUrl) {
return new ExceptionlessClient("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw") {
return new ExceptionlessClient("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest") {
Configuration = {
ServerUrl = serverUrl,
ServerCertificateValidationCallback = validator
Expand Down
22 changes: 11 additions & 11 deletions test/Exceptionless.Tests/Configuration/ConfigurationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using Xunit;
using Xunit.Abstractions;

[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", ServerUrl = "http://localhost:45000")]
[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", ServerUrl = "https://localhost:5201")]
[assembly: ExceptionlessSetting("testing", "configuration")]
namespace Exceptionless.Tests.Configuration {
public class ConfigurationTests {
Expand All @@ -26,9 +26,9 @@ public ConfigurationTests(ITestOutputHelper output) {

[Fact]
public void CanConfigureApiKeyFromClientConstructor() {
var client = new ExceptionlessClient("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw");
var client = new ExceptionlessClient("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest");
Assert.NotNull(client);
Assert.Equal("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", client.Configuration.ApiKey);
Assert.Equal("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", client.Configuration.ApiKey);
Assert.True(client.Configuration.IncludePrivateInformation);
Assert.True(client.Configuration.IncludeUserName);
Assert.True(client.Configuration.IncludeMachineName);
Expand Down Expand Up @@ -64,14 +64,14 @@ public void CanConfigureClientUsingActionMethod() {
const string version = "1.2.3";

var client = new ExceptionlessClient(c => {
c.ApiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw";
c.ServerUrl = "http://localhost:45000";
c.ApiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest";
c.ServerUrl = "https://localhost:5201";
c.SetVersion(version);
c.IncludeUserName = false;
});

Assert.Equal("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", client.Configuration.ApiKey);
Assert.Equal("http://localhost:45000", client.Configuration.ServerUrl);
Assert.Equal("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", client.Configuration.ApiKey);
Assert.Equal("https://localhost:5201", client.Configuration.ServerUrl);
Assert.Equal(version, client.Configuration.DefaultData[Event.KnownDataKeys.Version].ToString());

Assert.True(client.Configuration.IncludePrivateInformation);
Expand All @@ -91,8 +91,8 @@ public void CanReadFromAttributes() {
Assert.Empty(config.Settings);

config.ReadFromAttributes(typeof(ConfigurationTests).GetTypeInfo().Assembly);
Assert.Equal("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", config.ApiKey);
Assert.Equal("http://localhost:45000", config.ServerUrl);
Assert.Equal("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", config.ApiKey);
Assert.Equal("https://localhost:5201", config.ServerUrl);
Assert.Single(config.Settings);
Assert.Equal("configuration", config.Settings["testing"]);
}
Expand All @@ -101,7 +101,7 @@ public void CanReadFromAttributes() {
public void WillLockConfig() {
var client = new ExceptionlessClient();
client.Configuration.Resolver.Register<ISubmissionClient, InMemorySubmissionClient>();
client.Configuration.ApiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw";
client.Configuration.ApiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest";
client.SubmitEvent(new Event());
Assert.Throws<ArgumentException>(() => client.Configuration.ApiKey = "blah");
Assert.Throws<ArgumentException>(() => client.Configuration.ServerUrl = "blah");
Expand All @@ -110,7 +110,7 @@ public void WillLockConfig() {
[Fact]
public async Task CanUpdateSettingsFromServer() {
var config = new ExceptionlessConfiguration(DependencyResolver.Default) {
ApiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw",
ApiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest",
Settings = {
["LocalSetting"] = "1",
["LocalSettingToOverride"] = "1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void SingleInnerException() {
[Fact]
public async Task MultipleInnerException() {
var submissionClient = new InMemorySubmissionClient();
var client = new ExceptionlessClient("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw");
var client = new ExceptionlessClient("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest");
client.Configuration.Resolver.Register<ISubmissionClient>(submissionClient);

var plugin = new HandleAggregateExceptionsPlugin();
Expand Down
2 changes: 1 addition & 1 deletion test/Exceptionless.Tests/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<section name="exceptionless" type="Exceptionless.ExceptionlessSection, Exceptionless" />
</configSections>

<exceptionless apiKey="LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw" serverUrl="http://localhost:5000" enabled="true">
<exceptionless apiKey="LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest" serverUrl="https://localhost:5201" enabled="true">
<settings>
<add name="TraceLogLimit" value="30" />
</settings>
Expand Down

0 comments on commit 3ea304e

Please sign in to comment.