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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- [The JavaScript in `Microsoft.ApplicationInsights.AspNetCore` has been updated to version 10.](https://github.com/microsoft/ApplicationInsights-dotnet/pull/3078)

## Version 3.0.0-beta2
### Added
- [Automatic configuration binding from "ApplicationInsights" section in appsettings.json for both AspNetCore and WorkerService packages with configuration precedence: environment variables > explicit configuration > appsettings.json](https://github.com/microsoft/ApplicationInsights-dotnet/pull/3064)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
}
}

var snippet = Snippet.Replace("instrumentationKey: \"INSTRUMENTATION_KEY\"", insertConfig);
var snippet = Snippet.Replace("connectionString: \"YOUR_CONNECTION_STRING\"", insertConfig);

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net481)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net481)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net481)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net481)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net481)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net481)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net480)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net480)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net480)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net480)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net480)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net480)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net472)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net472)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net472)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net472)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net472)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net472)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net8.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net8.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net8.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net8.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net8.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net8.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net462)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net462)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net462)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net462)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net462)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net462)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net10.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net10.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net10.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net10.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net10.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net10.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net9.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net9.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net9.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net9.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net9.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)

Check warning on line 112 in NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/JavaScriptSnippet.cs

View workflow job for this annotation

GitHub Actions / build-test-SHIM (windows-latest, net9.0)

'string.Replace(string, string?)' has a method overload that takes a 'StringComparison' parameter. Replace this call in 'Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get' with a call to 'string.Replace(string, string?, System.StringComparison)' for clarity of intent. (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307)
// Return snippet
return string.Concat(snippet, insertAuthUserContext);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,12 @@
<value>appInsights.setAuthenticatedUserContext("{0}");</value>
</data>
<data name="JavaScriptSnippet" xml:space="preserve">
<value>!function(T,l,y){var S=T.location,k="script",D="instrumentationKey",C="ingestionendpoint",I="disableExceptionTracking",E="ai.device.",b="toLowerCase",w="crossOrigin",N="POST",e="appInsightsSDK",t=y.name||"appInsights";(y.name||T[e])&amp;&amp;(T[e]=t);var n=T[t]||function(d){var g=!1,f=!1,m={initialize:!0,queue:[],sv:"5",version:2,config:d};function v(e,t){var n={},a="Browser";return n[E+"id"]=a[b](),n[E+"type"]=a,n["ai.operation.name"]=S&amp;&amp;S.pathname||"_unknown_",n["ai.internal.sdkVersion"]="javascript:snippet_"+(m.sv||m.version),{time:function(){var e=new Date;function t(e){var t=""+e;return 1===t.length&amp;&amp;(t="0"+t),t}return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}(),iKey:e,name:"Microsoft.ApplicationInsights."+e.replace(/-/g,"")+"."+t,sampleRate:100,tags:n,data:{baseData:{ver:2}}}}var h=d.url||y.src;if(h){function a(e){var t,n,a,i,r,o,s,c,u,p,l;g=!0,m.queue=[],f||(f=!0,t=h,s=function(){var e={},t=d.connectionString;if(t)for(var n=t.split(";"),a=0;a&lt;n.length;a++){var i=n[a].split("=");2===i.length&amp;&amp;(e[i[0][b]()]=i[1])}if(!e[C]){var r=e.endpointsuffix,o=r?e.location:null;e[C]="https://"+(o?o+".":"")+"dc."+(r||"services.visualstudio.com")}return e}(),c=s[D]||d[D]||"",u=s[C],p=u?u+"/v2/track":d.endpointUrl,(l=[]).push((n="SDK LOAD Failure: Failed to load Application Insights SDK script (See stack for details)",a=t,i=p,(o=(r=v(c,"Exception")).data).baseType="ExceptionData",o.baseData.exceptions=[{typeName:"SDKLoadFailed",message:n.replace(/\./g,"-"),hasFullStack:!1,stack:n+"\nSnippet failed to load ["+a+"] -- Telemetry is disabled\nHelp Link: https://go.microsoft.com/fwlink/?linkid=2128109\nHost: "+(S&amp;&amp;S.pathname||"_unknown_")+"\nEndpoint: "+i,parsedStack:[]}],r)),l.push(function(e,t,n,a){var i=v(c,"Message"),r=i.data;r.baseType="MessageData";var o=r.baseData;return o.message='AI (Internal): 99 message:"'+("SDK LOAD Failure: Failed to load Application Insights SDK script (See stack for details) ("+n+")").replace(/\"/g,"")+'"',o.properties={endpoint:a},i}(0,0,t,p)),function(e,t){if(JSON){var n=T.fetch;if(n&amp;&amp;!y.useXhr)n(t,{method:N,body:JSON.stringify(e),mode:"cors"});else if(XMLHttpRequest){var a=new XMLHttpRequest;a.open(N,t),a.setRequestHeader("Content-type","application/json"),a.send(JSON.stringify(e))}}}(l,p))}function i(e,t){f||setTimeout(function(){!t&amp;&amp;m.core||a()},500)}var e=function(){var n=l.createElement(k);n.src=h;var e=y[w];return!e&amp;&amp;""!==e||"undefined"==n[w]||(n[w]=e),n.onload=i,n.onerror=a,n.onreadystatechange=function(e,t){"loaded"!==n.readyState&amp;&amp;"complete"!==n.readyState||i(0,t)},n}();y.ld&lt;0?l.getElementsByTagName("head")[0].appendChild(e):setTimeout(function(){l.getElementsByTagName(k)[0].parentNode.appendChild(e)},y.ld||0)}try{m.cookie=l.cookie}catch(p){}function t(e){for(;e.length;)!function(t){m[t]=function(){var e=arguments;g||m.queue.push(function(){m[t].apply(m,e)})}}(e.pop())}var n="track",r="TrackPage",o="TrackEvent";t([n+"Event",n+"PageView",n+"Exception",n+"Trace",n+"DependencyData",n+"Metric",n+"PageViewPerformance","start"+r,"stop"+r,"start"+o,"stop"+o,"addTelemetryInitializer","setAuthenticatedUserContext","clearAuthenticatedUserContext","flush"]),m.SeverityLevel={Verbose:0,Information:1,Warning:2,Error:3,Critical:4};var s=(d.extensionConfig||{}).ApplicationInsightsAnalytics||{};if(!0!==d[I]&amp;&amp;!0!==s[I]){var c="onerror";t(["_"+c]);var u=T[c];T[c]=function(e,t,n,a,i){var r=u&amp;&amp;u(e,t,n,a,i);return!0!==r&amp;&amp;m["_"+c]({message:e,url:t,lineNumber:n,columnNumber:a,error:i}),r},d.autoExceptionInstrumented=!0}return m}(y.cfg);function a(){y.onInit&amp;&amp;y.onInit(n)}(T[t]=n).queue&amp;&amp;0===n.queue.length?(n.queue.push(a),n.trackPageView({})):a()}(window,document,{
src: "https://js.monitor.azure.com/scripts/b/ai.2.min.js", // The SDK URL Source
crossOrigin: "anonymous",
cfg: { // Application Insights Configuration
instrumentationKey: "INSTRUMENTATION_KEY"
}});</value>
<value>!(function (cfg){var k,x,D,E,L,C,b,U,O,A,e,t="track",n="TrackPage",i="TrackEvent",I=[t+"Event",t+"Exception",t+"PageView",t+"PageViewPerformance","addTelemetryInitializer",t+"Trace",t+"DependencyData",t+"Metric","start"+n,"stop"+n,"start"+i,"stop"+i,"setAuthenticatedUserContext","clearAuthenticatedUserContext","flush"];function a(){cfg.onInit&amp;&amp;cfg.onInit(e)}k=window,x=document,D=k.location,E="script",L="ingestionendpoint",C="disableExceptionTracking",b="crossOrigin",U="POST",O=cfg.pn||"aiPolicy",t="appInsightsSDK",A=cfg.name||"appInsights",(cfg.name||k[t])&amp;&amp;(k[t]=A),e=k[A]||function(u){var n=u.url||cfg.src,s=!1,p=!1,l={initialize:!0,queue:[],sv:"10",config:u,version:2,extensions:void 0};function d(e){var t,n,i,a,r,o,c,s;!0!==cfg.dle&amp;&amp;(o=(t=function(){var e,t={},n=u.connectionString;if("string"==typeof n&amp;&amp;n)for(var i=n.split(";"),a=0;a&lt;i.length;a++){var r=i[a].split("=");2===r.length&amp;&amp;(t[r[0].toLowerCase()]=r[1])}return t[L]||(e=(n=t.endpointsuffix)?t.location:null,t[L]="https://"+(e?e+".":"")+"dc."+(n||"services.visualstudio.com")),t}()).instrumentationkey||u.instrumentationKey||"",t=(t=(t=t[L])&amp;&amp;"/"===t.slice(-1)?t.slice(0,-1):t)?t+"/v2/track":u.endpointUrl,t=u.userOverrideEndpointUrl||t,(n=[]).push((i="SDK LOAD Failure: Failed to load Application Insights SDK script (See stack for details)",a=e,c=t,(s=(r=f(o,"Exception")).data).baseType="ExceptionData",s.baseData.exceptions=[{typeName:"SDKLoadFailed",message:i.replace(/\./g,"-"),hasFullStack:!1,stack:i+"\nSnippet failed to load ["+a+"] -- Telemetry is disabled\nHelp Link: https://go.microsoft.com/fwlink/?linkid=2128109\nHost: "+(D&amp;&amp;D.pathname||"_unknown_")+"\nEndpoint: "+c,parsedStack:[]}],r)),n.push((s=e,i=t,(c=(a=f(o,"Message")).data).baseType="MessageData",(r=c.baseData).message='AI (Internal): 99 message:"'+("SDK LOAD Failure: Failed to load Application Insights SDK script (See stack for details) ("+s+")").replace(/\"/g,"")+'"',r.properties={endpoint:i},a)),e=n,o=t,JSON&amp;&amp;((c=k.fetch)&amp;&amp;!cfg.useXhr?c(o,{method:U,body:JSON.stringify(e),mode:"cors"}):XMLHttpRequest&amp;&amp;((s=new XMLHttpRequest).open(U,o),s.setRequestHeader("Content-type","application/json"),s.send(JSON.stringify(e)))))}function f(e,t){return e=e,t=t,i=l.sv,a=l.version,r=D,(o={})["ai.device."+"id"]="browser",o["ai.device.type"]="Browser",o["ai.operation.name"]=r&amp;&amp;r.pathname||"_unknown_",o["ai.internal.sdkVersion"]="javascript:snippet_"+(i||a),{time:(r=new Date).getUTCFullYear()+"-"+n(1+r.getUTCMonth())+"-"+n(r.getUTCDate())+"T"+n(r.getUTCHours())+":"+n(r.getUTCMinutes())+":"+n(r.getUTCSeconds())+"."+(r.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z",iKey:e,name:"Microsoft.ApplicationInsights."+e.replace(/-/g,"")+"."+t,sampleRate:100,tags:o,data:{baseData:{ver:2}},ver:undefined,seq:"1",aiDataContract:undefined};function n(e){e=""+e;return 1===e.length?"0"+e:e}var i,a,r,o}var i,a,t,r,g=-1,h=0,m=["js.monitor.azure.com","js.cdn.applicationinsights.io","js.cdn.monitor.azure.com","js0.cdn.applicationinsights.io","js0.cdn.monitor.azure.com","js2.cdn.applicationinsights.io","js2.cdn.monitor.azure.com","az416426.vo.msecnd.net"],o=function(){return c(n,null)};function c(t,r){if((n=navigator)&amp;&amp;(~(n=(n.userAgent||"").toLowerCase()).indexOf("msie")||~n.indexOf("trident/"))&amp;&amp;~t.indexOf("ai.3")&amp;&amp;(t=t.replace(/(\/)(ai\.3\.)([^\d]*)$/,function(e,t,n){return t+"ai.2"+n})),!1!==cfg.cr)for(var e=0;e&lt;m.length;e++)if(0&lt;t.indexOf(m[e])){g=e;break}var n,o=function(e){var a;l.queue=[],p||(0&lt;=g&amp;&amp;h+1&lt;m.length?(a=(g+h+1)%m.length,i(t.replace(/^(.*\/\/)([\w\.]*)(\/.*)$/,function(e,t,n,i){return t+m[a]+i})),h+=1):(s=p=!0,d(t)))},c=function(e,t){p||setTimeout(function(){t&amp;&amp;!l.core&amp;&amp;o()},500),s=!1},i=function(e){var n,i=x.createElement(E),e=(cfg.pl?cfg.ttp&amp;&amp;cfg.ttp.createScript?i.src=cfg.ttp.createScriptURL(e):i.src=(null==(n=window.trustedTypes)?void 0:n.createPolicy(O,{createScriptURL:function(e){try{var t=new URL(e);if(t.host&amp;&amp;"js.monitor.azure.com"===t.host)return e;a(e)}catch(n){a(e)}}})).createScriptURL(e):i.src=e,cfg.nt&amp;&amp;i.setAttribute("nonce",cfg.nt),r&amp;&amp;(i.integrity=r),i.setAttribute("data-ai-name",A),cfg[b]);function a(e){d("AI policy blocked URL: "+e)}return!e&amp;&amp;""!==e||"undefined"==i[b]||(i[b]=e),i.onload=c,i.onerror=o,i.onreadystatechange=function(e,t){"loaded"!==i.readyState&amp;&amp;"complete"!==i.readyState||c(0,t)},cfg.ld&amp;&amp;cfg.ld&lt;0?x.getElementsByTagName("head")[0].appendChild(i):setTimeout(function(){x.getElementsByTagName(E)[0].parentNode.appendChild(i)},cfg.ld||0),i};i(t)}cfg.sri&amp;&amp;(i=n.match(/^((http[s]?:\/\/.*\/)\w+(\.\d+){1,5})\.(([\w]+\.){0,2}js)$/))&amp;&amp;6===i.length?(T="".concat(i[1],".integrity.json"),a="@".concat(i[4]),S=window.fetch,t=function(e){if(!e.ext||!e.ext[a]||!e.ext[a].file)throw Error("Error Loading JSON response");var t=e.ext[a].integrity||null;c(n=i[2]+e.ext[a].file,t)},S&amp;&amp;!cfg.useXhr?S(T,{method:"GET",mode:"cors"}).then(function(e){return e.json()["catch"](function(){return{}})}).then(t)["catch"](o):XMLHttpRequest&amp;&amp;((r=new XMLHttpRequest).open("GET",T),r.onreadystatechange=function(){if(r.readyState===XMLHttpRequest.DONE)if(200===r.status)try{t(JSON.parse(r.responseText))}catch(e){o()}else o()},r.send())):n&amp;&amp;o();try{l.cookie=x.cookie}catch(w){}function e(e){for(;e.length;)!function(t){l[t]=function(){var e=arguments;s||l.queue.push(function(){l[t].apply(l,e)})}}(e.pop())}e(I);var v,y,S=!(l.SeverityLevel={Verbose:0,Information:1,Warning:2,Error:3,Critical:4}),T=(u.extensionConfig||{}).ApplicationInsightsAnalytics||{};return(S=!0!==u[C]&amp;&amp;!0!==T[C]||S)&amp;&amp;(e(["_"+(v="onerror")]),y=k[v],k[v]=function(e,t,n,i,a){var r=y&amp;&amp;y(e,t,n,i,a);return!0!==r&amp;&amp;l["_"+v]({message:e,url:t,lineNumber:n,columnNumber:i,error:a,evt:k.event}),r},u.autoExceptionInstrumented=!0),l}(cfg.cfg),(k[A]=e).queue&amp;&amp;0===e.queue.length?(e.queue.push(a),e.trackPageView({})):a();})({
src: "https://js.monitor.azure.com/scripts/b/ai.3.gbl.min.js",
crossOrigin: "anonymous", // When supplied this will add the provided value as the cross origin attribute on the script tag
cfg: { // Application Insights Configuration
connectionString: "YOUR_CONNECTION_STRING"
}
});</value>
</data>
</root>
Loading