1
0
Форкнуть 0

Ilogger traces are prefixed with il. Update to stable 2.8 of base and web. Bump version

This commit is contained in:
Cijo Thomas 2018-10-09 10:13:25 -07:00
Родитель 6187c5847d
Коммит 47b152684e
4 изменённых файлов: 24 добавлений и 6 удалений

Просмотреть файл

@ -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:

Просмотреть файл

@ -16,11 +16,17 @@
/// </summary>
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<string, LogLevel, bool> filter;
private readonly ApplicationInsightsLoggerOptions options;
private readonly string sdkVersion = SdkVersionUtils.GetVersion();
private readonly string sdkVersion = SdkVersionUtils.GetVersion(VersionPrefix);
/// <summary>
/// Creates a new instance of <see cref="ApplicationInsightsLogger"/>

Просмотреть файл

@ -81,11 +81,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.8.0-beta2" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.8.0-beta2" />
<PackageReference Include="Microsoft.ApplicationInsights.PerfCounterCollector" Version="2.8.0-beta2" />
<PackageReference Include="Microsoft.ApplicationInsights.WindowsServer" Version="2.8.0-beta2" />
<PackageReference Include="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel" Version="2.8.0-beta2" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.8.0" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.8.0" />
<PackageReference Include="Microsoft.ApplicationInsights.PerfCounterCollector" Version="2.8.0" />
<PackageReference Include="Microsoft.ApplicationInsights.WindowsServer" Version="2.8.0" />
<PackageReference Include="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel" Version="2.8.0" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.2" />

Просмотреть файл

@ -19,6 +19,14 @@
return VersionPrefix + GetAssemblyVersion();
}
/// <summary>
/// Get the Assembly Version with given SDK prefix.
/// </summary>
internal static string GetVersion(string versionPrefix)
{
return versionPrefix + GetAssemblyVersion();
}
private static string GetAssemblyVersion()
{
return typeof(SdkVersionUtils).GetTypeInfo().Assembly.GetCustomAttributes<AssemblyInformationalVersionAttribute>()