This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.ServiceModel; | |
using System.ServiceModel.Channels; | |
using System.ServiceModel.Description; | |
using System.ServiceModel.Dispatcher; | |
using System.Text; | |
using System.Threading.Tasks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-WebTestByURL { | |
[CmdletBinding()] | |
param | |
( | |
[Parameter(Mandatory=$True, | |
ValueFromPipeline=$True, | |
ValueFromPipelineByPropertyName=$True, | |
HelpMessage='The Azure subscription id to search.')] | |
[Alias('SubId')] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.ApplicationInsights.Channel; | |
using Microsoft.ApplicationInsights.Extensibility; | |
using System; | |
public class NoAzureBlobLoggingCalls : Microsoft.ApplicationInsights.Extensibility.ITelemetryProcessor | |
{ | |
private ITelemetryProcessor Next { get; set; } | |
private bool parsed = false; | |
public const string AzureBlob = "Azure blob"; | |
public const string AccountName = "kmshdprodlogs"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.VisualStudio.TestTools.WebTesting; | |
using System.ComponentModel; | |
namespace CustomPlugin | |
{ | |
[DisplayName("Replace Encoded Slash")] | |
[Description("Replaces %2F with %252F to avoid the doubleslash (//) escape.")] | |
public class FixFilter : WebTestRequestPlugin | |
{ | |
public FixFilter() { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.ApplicationInsights.Channel; | |
using Microsoft.ApplicationInsights.Extensibility; | |
using System; | |
public class NotMyHostNameFilter : Microsoft.ApplicationInsights.Extensibility.ITelemetryProcessor | |
{ | |
private ITelemetryProcessor Next { get; set; } | |
private bool parsed = false; | |
public string ExceptionToFilter { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Web; | |
using Microsoft.ApplicationInsights.Channel; | |
public class GetUserInitializer : | |
Microsoft.ApplicationInsights.Extensibility.ITelemetryInitializer | |
{ | |
public void Initialize(ITelemetry telemetry) | |
{ | |
if (telemetry is Microsoft.ApplicationInsights.DataContracts.RequestTelemetry) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal static class RequestTrackingConstants | |
{ | |
/// <summary> | |
/// Name of the HttpContext item containing RequestTelemetry object. | |
/// </summary> | |
internal const string RequestTelemetryItemName = "Microsoft.ApplicationInsights.RequestTelemetry"; | |
internal const string EndRequestCallFlag = "Microsoft.ApplicationInsights.EndRequestCallFlag"; | |
/// <summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void EnableQuickPulse() | |
{ | |
var qpmod = new Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule(); | |
qpmod.Initialize(actConfig); | |
Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryModules.Instance.Modules.Add(qpmod); | |
actConfig.TelemetryProcessorChainBuilder.Use((next) => | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Constants stolen from | |
// https://github.com/Microsoft/ApplicationInsights-dotnet-server/blob/v2.2.0/Src/Web/Web.Shared.Net/Implementation/RequestTrackingConstants.cs | |
internal static class RequestTrackingConstants | |
{ | |
/// <summary> | |
/// Name of the HttpContext item containing RequestTelemetry object. | |
/// </summary> | |
internal const string RequestTelemetryItemName = "Microsoft.ApplicationInsights.RequestTelemetry"; | |
internal const string EndRequestCallFlag = "Microsoft.ApplicationInsights.EndRequestCallFlag"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MvcApplication : System.Web.HttpApplication | |
{ | |
protected void Application_Start() | |
{ | |
#if DEBUG | |
Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration.Active.DisableTelemetry = true; | |
#endif | |
} | |
} |
NewerOlder