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
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@
for the details.
([#42374](https://github.com/Azure/azure-sdk-for-net/pull/42374))

* Added NET6 target framework.
([#42426](https://github.com/Azure/azure-sdk-for-net/pull/42426))

### Breaking Changes

### Bugs Fixed

* Will no longer emit `db.statement_type` as a part of SQL custom dimensions.
This attribute was removed from the SqlClient Instrumentation Library because it's not a part of the [semantic conventions](https://github.com/open-telemetry/semantic-conventions/blob/v1.24.0/docs/database/database-spans.md#call-level-attributes).

* Fix runtime crash with Microsoft.Bcl.AsyncInterfaces.
([#42426](https://github.com/Azure/azure-sdk-for-net/pull/42426))

### Other Changes

* Updated the code of vendored instrumentation library `OpenTelemetry.Instrumentation.SqlClient` from the OpenTelemetry .NET repository.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
<AssemblyTitle>AzureMonitor OpenTelemetry ASP.NET Core Distro</AssemblyTitle>
<Version>1.2.0-beta.2</Version>
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
<ApiCompatVersion>1.1.0</ApiCompatVersion>
<!-- TODO: Need to disable this because adding new target framwork. This needs to be reenabled when we release. -->
<!--<ApiCompatVersion>1.1.0</ApiCompatVersion>-->
<PackageTags>Azure Monitor OpenTelemetry Exporter Distro ApplicationInsights</PackageTags>
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks>
<TargetFrameworks>net6.0;$(RequiredTargetFrameworks)</TargetFrameworks>
<IncludeOperationsSharedSource>true</IncludeOperationsSharedSource>
<NoWarn>SA1636</NoWarn>
<!-- this is temporary. will remove in future PR. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,4 @@
<ProjectReference Include="..\..\src\Azure.Monitor.OpenTelemetry.AspNetCore.csproj" />
</ItemGroup>

<ItemGroup>
<!-- Workaround to fix CI build failure in macOS. This package is being used indirectly by Azure analyzers. -->
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" VersionOverride="8.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
<ProjectReference Include="..\..\src\Azure.Monitor.OpenTelemetry.AspNetCore.csproj" />
</ItemGroup>

<ItemGroup>
<!-- Workaround to fix CI build failure in macOS. This package is being used indirectly by Azure analyzers. -->
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" VersionOverride="8.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
<Compile Include="..\..\..\Azure.Monitor.OpenTelemetry.Exporter\tests\Azure.Monitor.OpenTelemetry.Exporter.Tests\CommonTestFramework\TestEventListener.cs" LinkBase="CommonTestFramework" />
</ItemGroup>

<ItemGroup>
<!-- Workaround to fix CI build failure in macOS. This package is being used indirectly by Azure analyzers. -->
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" VersionOverride="8.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@
* For "Committed Memory", we use [Process.PrivateMemorySize64](https://learn.microsoft.com/dotnet/api/system.diagnostics.process.privatememorysize64).
* For "CPU Total (%)", we use the change in [Process.TotalProcessorTime](https://learn.microsoft.com/dotnet/api/system.diagnostics.process.totalprocessortime) over a period of time. This value is normalized by dividing by the number of processors. The formula is `((change in ticks / period) / number of processors)`.

* Added NET6 target framework.
([#42426](https://github.com/Azure/azure-sdk-for-net/pull/42426))

### Breaking Changes

### Bugs Fixed

* Fix runtime crash with Microsoft.Bcl.AsyncInterfaces.
([#42426](https://github.com/Azure/azure-sdk-for-net/pull/42426))

### Other Changes

## 1.0.0-beta.2 (2024-02-09)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<AssemblyTitle>AzureMonitor OpenTelemetry Live Metrics</AssemblyTitle>
<Version>1.0.0-beta.3</Version>
<PackageTags>Azure Monitor OpenTelemetry live Metrics ApplicationInsights</PackageTags>
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks>
<TargetFrameworks>net6.0;$(RequiredTargetFrameworks)</TargetFrameworks>
<IncludeOperationsSharedSource>true</IncludeOperationsSharedSource>
<Nullable>enable</Nullable>
<DefineConstants>$(DefineConstants);LIVE_METRICS_EXPORTER;</DefineConstants>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public IEnumerable<DocumentIngress> ReadAllAndClear()
{
// There is no need to decrement the count since we are clearing the queue. After this operation, the instance will not be used anymore.
// The method 'Add' is not called while this method is running; therefore, the count will remain unchanged.
while (_documents.TryDequeue(out DocumentIngress item))
while (_documents.TryDequeue(out DocumentIngress? item))
{
yield return item;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,27 +104,27 @@ internal static Request ConvertToRequest(Activity activity)
}
else if (tag.Key == SemanticConventions.AttributeUrlScheme)
{
urlScheme = tag.Value.ToString();
urlScheme = tag.Value.ToString()!;
}
else if (tag.Key == SemanticConventions.AttributeServerAddress)
{
serverAddress = tag.Value.ToString();
serverAddress = tag.Value.ToString()!;
}
else if (tag.Key == SemanticConventions.AttributeServerPort)
{
serverPort = tag.Value.ToString();
serverPort = tag.Value.ToString()!;
}
else if (tag.Key == SemanticConventions.AttributeUrlPath)
{
urlPath = tag.Value.ToString();
urlPath = tag.Value.ToString()!;
}
else if (tag.Key == SemanticConventions.AttributeUrlQuery)
{
urlQuery = tag.Value.ToString();
urlQuery = tag.Value.ToString()!;
}
else if (tag.Key == SemanticConventions.AttributeHttpResponseStatusCode)
{
httpResponseStatusCode = tag.Value.ToString();
httpResponseStatusCode = tag.Value.ToString()!;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ internal class DerivedMetric<TTelemetry>

private static readonly MethodInfo DoubleParseMethodInfo = typeof(double).GetMethod(
"Parse",
new[] { typeof(string), typeof(IFormatProvider) });
new[] { typeof(string), typeof(IFormatProvider) })!;

private static readonly MethodInfo ObjectToStringMethodInfo = typeof(object).GetMethod(
"ToString",
BindingFlags.Public | BindingFlags.Instance);
BindingFlags.Public | BindingFlags.Instance)!;

private static readonly MethodInfo DoubleToStringMethodInfo = typeof(double).GetMethod(
"ToString",
new[] { typeof(IFormatProvider) });
new[] { typeof(IFormatProvider) })!;

private readonly DerivedMetricInfo info;

Expand Down Expand Up @@ -110,7 +110,7 @@ public double Project(TTelemetry document)

public override string ToString()
{
return this.info.ToString();
return this.info.ToString()!;
}

private void CreateFilters(out CollectionConfigurationError[] errors)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private void CreateFilters(out CollectionConfigurationError[] errors)
string.Format(CultureInfo.InvariantCulture, "Failed to create a filter {0}.", filterInfo),
e,
Tuple.Create("FilterFieldName", filterInfo.FieldName),
Tuple.Create("FilterPredicate", filterInfo.Predicate.ToString()),
Tuple.Create("FilterPredicate", filterInfo.Predicate?.ToString() ?? "null"),
Tuple.Create("FilterComparand", filterInfo.Comparand)));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public override void OnEnd(Activity activity)
}
else if (tag.Key == SemanticConventions.AttributeExceptionType)
{
exceptionType = tag.Value.ToString();
exceptionType = tag.Value.ToString()!;
continue;
}
else if (tag.Key == SemanticConventions.AttributeExceptionMessage)
{
exceptionMessage = tag.Value.ToString();
exceptionMessage = tag.Value.ToString()!;
continue;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,4 @@
<ProjectReference Include="..\..\src\Azure.Monitor.OpenTelemetry.LiveMetrics.csproj" />
</ItemGroup>

<ItemGroup>
<!-- Workaround to fix CI build failure in macOS. This package is being used indirectly by Azure analyzers. -->
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" VersionOverride="8.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
<ProjectReference Include="..\..\src\Azure.Monitor.OpenTelemetry.LiveMetrics.csproj" />
</ItemGroup>

<ItemGroup>
<!-- Workaround to fix CI build failure in macOS. This package is being used indirectly by Azure analyzers. -->
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" VersionOverride="8.0.0" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\..\..\Azure.Monitor.OpenTelemetry.Exporter\tests\Azure.Monitor.OpenTelemetry.Exporter.Tests\CommonTestFramework\EventSourceTestHelper.cs" LinkBase="CommonTestFramework" />
<Compile Include="..\..\..\Azure.Monitor.OpenTelemetry.Exporter\tests\Azure.Monitor.OpenTelemetry.Exporter.Tests\CommonTestFramework\TestEventListener.cs" LinkBase="CommonTestFramework" />
Expand Down