Skip to content
This repository has been archived by the owner on Apr 13, 2020. It is now read-only.

Commit

Permalink
Solve build issue and upgrade version
Browse files Browse the repository at this point in the history
  • Loading branch information
unaizorrilla committed May 19, 2018
1 parent 50a56ee commit 7140bd4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 28 deletions.
4 changes: 2 additions & 2 deletions build/dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</PropertyGroup>

<PropertyGroup Label="BeatPulse Package Versions">
<BeatPulsePackageVersion>1.5.0</BeatPulsePackageVersion>
<BeatPulsePackageVersion>1.6.0</BeatPulsePackageVersion>
<BeatPulseAzureStoragePackageVersion>1.4.0</BeatPulseAzureStoragePackageVersion>
<BeatPulseDocumentDbPackageVersion>1.4.0</BeatPulseDocumentDbPackageVersion>
<BeatPulseMongoDbPackageVersion>1.4.0</BeatPulseMongoDbPackageVersion>
Expand All @@ -52,7 +52,7 @@
<BeatpulseRedisPackageVersion>1.4.0</BeatpulseRedisPackageVersion>
<BeatPulseSqlitePackageVersion>1.4.0</BeatPulseSqlitePackageVersion>
<BeatPulseSqlServerPackageVersion>1.4.0</BeatPulseSqlServerPackageVersion>
<BeatPulseUIPackageVersion>1.5.0</BeatPulseUIPackageVersion>
<BeatPulseUIPackageVersion>1.6.0</BeatPulseUIPackageVersion>
<BeatPulseKafkaVersion>1.4.0</BeatPulseKafkaVersion>
<BeatPulseRabbitMQPackageVersion>1.4.0</BeatPulseRabbitMQPackageVersion>
<BeatPulseIdSvrVersion>1.4.0</BeatPulseIdSvrVersion>
Expand Down
2 changes: 1 addition & 1 deletion samples/Trackers/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"TelemetryChannel": {
"DeveloperMode": false
},
"InstrumentationKey": "[PUT YOUR AI KEY HERE]"
"InstrumentationKey": "1dd2c7ca-2090-4f08-8dc9-6cbd203a75b9" //"[PUT YOUR AI KEY HERE]"
},
"Logging": {
"IncludeScopes": false,
Expand Down
5 changes: 5 additions & 0 deletions src/BeatPulse.ApplicationInsightsTracker/AITracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.Extensibility;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Threading.Tasks;

Expand Down Expand Up @@ -40,6 +41,10 @@ public Task Track(LivenessResult livenessResult)

_telemetryClient.TrackEvent(EVENT_NAME, properties, metrics);

Debug.WriteLine(TelemetryConfiguration.Active.InstrumentationKey);
Debug.WriteLine(TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode);


return Task.CompletedTask;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,7 @@ namespace BeatPulse.ApplicationInsightsTracker
public class beat_pulse_context_should
{
[Fact]
public void register_applicationinsights_tracker_with_instrumentationkey()
{
var webHostBuilder = new WebHostBuilder()
.UseBeatPulse()
.UseStartup<DefaultStartup>()
.ConfigureServices(svc =>
{
svc.AddBeatPulse(context =>
{
context.AddApplicationInsightsTracker("instrumentationkey");
});
});

var beatPulseContext = new TestServer(webHostBuilder)
.Host
.Services
.GetService<BeatPulseContext>();

beatPulseContext.AllTrackers
.Where(hc => hc.GetType() == typeof(AITracker))
.Should().HaveCount(1);
}

[Fact]
public void register_applicationinsights_tracker_without_instrumentationkey()
public void register_applicationinsights_tracker()
{
var webHostBuilder = new WebHostBuilder()
.UseBeatPulse()
Expand Down

0 comments on commit 7140bd4

Please sign in to comment.