Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,21 @@ static void StackifyAPILogger_OnLogMessage(string data)
}
```

## Additional Settings

These settings are available to further customize what information is captured and transmitted to Stackify.

```xml
<appSettings>
<add key="Stackify.CaptureErrorHeaders" value="true" />
<add key="Stackify.CaptureServerVariables" value="false" />
<add key="Stackify.CaptureSessionVariables" value="false" />
<add key="Stackify.CaptureErrorCookies" value="false" />
<add key="Stackify.CaptureErrorUserName" value="true" />
<add key="Stackify.CaptureErrorPostdata" value="false" />
</appSettings>
```


## Errors and Logs

Expand Down
2 changes: 1 addition & 1 deletion Src/NLog.Targets.Stackify/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyKeyFileAttribute("..\\StackifyLib\\Netreo.snk")]
//[assembly: AssemblyKeyFile("..\\StackifyLib\\Netreo.snk")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
Expand Down
2 changes: 1 addition & 1 deletion Src/StackifyLib.AspNetCore/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[assembly: AssemblyCompany("Stackify")]
[assembly: AssemblyProduct("StackifyLib.AspNetCore")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyKeyFileAttribute("..\\StackifyLib\\Netreo.snk")]
//[assembly: AssemblyKeyFile("..\\StackifyLib\\Netreo.snk")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
Expand Down
2 changes: 1 addition & 1 deletion Src/StackifyLib.CoreLogger/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[assembly: AssemblyCompany("Stackify")]
[assembly: AssemblyProduct("StackifyLib.CoreLogger")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyKeyFileAttribute("..\\StackifyLib\\Netreo.snk")]
//[assembly: AssemblyKeyFile("..\\StackifyLib\\Netreo.snk")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
Expand Down
2 changes: 1 addition & 1 deletion Src/StackifyLib.ELMAH/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyKeyFileAttribute("..\\StackifyLib\\Netreo.snk")]
//[assembly: AssemblyKeyFile("..\\StackifyLib\\Netreo.snk")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[assembly: AssemblyCompany("Stackify")]
[assembly: AssemblyProduct("StackifyLib.StackifyTraceListener")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyKeyFileAttribute("..\\StackifyLib\\Netreo.snk")]
//[assembly: AssemblyKeyFile("..\\StackifyLib\\Netreo.snk")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
Expand Down
2 changes: 1 addition & 1 deletion Src/StackifyLib.log4net/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyKeyFileAttribute("..\\StackifyLib\\Netreo.snk")]
//[assembly: AssemblyKeyFile("..\\StackifyLib\\Netreo.snk")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
Expand Down
13 changes: 5 additions & 8 deletions Src/StackifyLib/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ public static void LoadSettings()

CaptureErrorCookies = Get("Stackify.CaptureErrorCookies", bool.FalseString).Equals(bool.TrueString, StringComparison.CurrentCultureIgnoreCase);

CaptureErrorUserName = Get("Stackify.CaptureErrorUserName", bool.TrueString).Equals(bool.TrueString, StringComparison.CurrentCultureIgnoreCase);

CaptureErrorPostdata = Get("Stackify.CaptureErrorPostdata", bool.FalseString).Equals(bool.TrueString, StringComparison.CurrentCultureIgnoreCase);

ApiKey = Get("Stackify.ApiKey", ApiKey ?? string.Empty);

AppName = Get("Stackify.AppName", AppName ?? string.Empty);
Expand Down Expand Up @@ -183,21 +187,14 @@ public static void LoadSettings()
public static bool CaptureErrorPostdata { get; set; }
public static bool CaptureErrorHeaders { get; set; } = true;
public static bool CaptureErrorCookies { get; set; }

public static bool CaptureErrorUserName { get; set; } = true;
public static string CaptureErrorSessionWhitelist { get; set; }

public static string CaptureErrorHeadersWhitelist { get; set; }

public static string CaptureErrorHeadersBlacklist { get; set; } = "cookie,authorization";

public static string CaptureErrorCookiesWhitelist { get; set; }

public static string CaptureErrorCookiesBlacklist { get; set; } = ".ASPXAUTH";

public static int Ec2InstanceMetadataUpdateThresholdMinutes { get; set; } = 60;

public static bool? IsEc2 { get; set; }

public static bool? ApiLog { get; set; }

public static int LoggingJsonMaxFields { get; set; } = 50;
Expand Down
2 changes: 1 addition & 1 deletion Src/StackifyLib/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[assembly: AssemblyCopyright("Copyright © 2018-2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyKeyFileAttribute("Netreo.snk")]
//[assembly: AssemblyKeyFile("Netreo.snk")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
Expand Down
4 changes: 2 additions & 2 deletions Src/StackifyLib/StackifyError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private void Init()
{
WebRequestDetail = new WebRequestDetail(this);

if (HttpContext.Current.User != null && HttpContext.Current.User.Identity != null)
if (Config.CaptureErrorUserName && HttpContext.Current.User != null && HttpContext.Current.User.Identity != null)
{
UserName = HttpContext.Current.User.Identity.Name;
}
Expand All @@ -163,7 +163,7 @@ private void Init()
#else
WebRequestDetail = new WebRequestDetail(this);
#endif

//Fire event
OnCaptureDetail?.Invoke(this);

Expand Down
11 changes: 10 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,16 @@ steps:
inputs:
targetType: inline
script: >
(Get-Content -path Src\StackifyLib\StackifyLib.csproj -Raw) -replace '<PackageId>StackifyLib</PackageId>','<PackageId>StackifyLib.signed</PackageId>' | Set-Content -Path Src\StackifyLib\StackifyLib.csproj
(Get-Content -path Src\StackifyLib\StackifyLib.csproj -Raw) -replace '<PackageId>StackifyLib</PackageId>','<PackageId>StackifyLib.signed</PackageId>' | Set-Content -Path Src\StackifyLib\StackifyLib.csproj -Encoding utf8

# note: the signing attribute here is commented out so we can build locally
- powershell: |
$filename = Get-ChildItem ".\src\*\AssemblyInfo.cs" -Recurse
$filename | %{
(gc $_) -replace ([regex]::Escape("//[assembly: AssemblyKeyFile")), "[assembly: AssemblyKeyFile" | Set-Content $_.FullName -Encoding utf8
}
displayName: Uncoment signing attribute

- task: PowerShell@2
displayName: 'Setup Code Signing'
inputs:
Expand Down