diff --git a/CHANGELOG.md b/CHANGELOG.md index a57eb7b..45fc752 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Version 2.5.0 +- Traces logged via ILogger is marked with SDK version prefix ilc (.net core) or ilf (.net framework). +- Update Web/Base SDK version dependency to 2.8.0 + ## Version 2.5.0-beta2 - ComVisible attribute is set to false for the project for compliance reasons. Applicable if using additional Sinks to forward telemetry to: diff --git a/src/Microsoft.ApplicationInsights.AspNetCore/Logging/Implementation/ApplicationInsightsLogger.cs b/src/Microsoft.ApplicationInsights.AspNetCore/Logging/Implementation/ApplicationInsightsLogger.cs index 3d8c337..c03e3f8 100644 --- a/src/Microsoft.ApplicationInsights.AspNetCore/Logging/Implementation/ApplicationInsightsLogger.cs +++ b/src/Microsoft.ApplicationInsights.AspNetCore/Logging/Implementation/ApplicationInsightsLogger.cs @@ -16,11 +16,17 @@ /// internal class ApplicationInsightsLogger : ILogger { +#if NET451 || NET46 + public const string VersionPrefix = "ilf:"; +#else + public const string VersionPrefix = "ilc:"; +#endif + private readonly string categoryName; private readonly TelemetryClient telemetryClient; private readonly Func filter; private readonly ApplicationInsightsLoggerOptions options; - private readonly string sdkVersion = SdkVersionUtils.GetVersion(); + private readonly string sdkVersion = SdkVersionUtils.GetVersion(VersionPrefix); /// /// Creates a new instance of diff --git a/src/Microsoft.ApplicationInsights.AspNetCore/Microsoft.ApplicationInsights.AspNetCore.csproj b/src/Microsoft.ApplicationInsights.AspNetCore/Microsoft.ApplicationInsights.AspNetCore.csproj index 0ff1a32..1eae8cc 100644 --- a/src/Microsoft.ApplicationInsights.AspNetCore/Microsoft.ApplicationInsights.AspNetCore.csproj +++ b/src/Microsoft.ApplicationInsights.AspNetCore/Microsoft.ApplicationInsights.AspNetCore.csproj @@ -81,11 +81,11 @@ - - - - - + + + + + diff --git a/src/Microsoft.ApplicationInsights.AspNetCore/SdkVersionUtils.cs b/src/Microsoft.ApplicationInsights.AspNetCore/SdkVersionUtils.cs index d57890a..2af666d 100644 --- a/src/Microsoft.ApplicationInsights.AspNetCore/SdkVersionUtils.cs +++ b/src/Microsoft.ApplicationInsights.AspNetCore/SdkVersionUtils.cs @@ -19,6 +19,14 @@ return VersionPrefix + GetAssemblyVersion(); } + /// + /// Get the Assembly Version with given SDK prefix. + /// + internal static string GetVersion(string versionPrefix) + { + return versionPrefix + GetAssemblyVersion(); + } + private static string GetAssemblyVersion() { return typeof(SdkVersionUtils).GetTypeInfo().Assembly.GetCustomAttributes()