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
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>An OpenTelemetry .NET exporter that exports to Azure Monitor</Description>
<AssemblyTitle>AzureMonitor OpenTelemetry Exporter</AssemblyTitle>
Expand All @@ -9,6 +9,13 @@
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks>
<IncludeOperationsSharedSource>true</IncludeOperationsSharedSource>
<AotCompatOptOut>true</AotCompatOptOut>
<EnableConfigurationBindingGenerator>true</EnableConfigurationBindingGenerator>
Comment thread
eerhardt marked this conversation as resolved.
<!-- The configuration binding source generator emits SYSLIB1100/SYSLIB1101 for options
properties that cannot be bound from configuration (for example, the Credential
(TokenCredential) and Transport properties used by Azure.Core.ClientOptions). These
warnings are expected and safe to suppress since those properties are never set via
IConfiguration. -->
<NoWarn>$(NoWarn);SYSLIB1100;SYSLIB1101</NoWarn>
<DefineConstants>$(DefineConstants);AZURE_MONITOR_EXPORTER;</DefineConstants>
<IncludeAutorestDependency>true</IncludeAutorestDependency>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Licensed under the MIT License.

using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using Azure.Monitor.OpenTelemetry.Exporter.Internals.Diagnostics;
using Azure.Monitor.OpenTelemetry.Exporter.Internals.Platform;
Expand Down Expand Up @@ -128,12 +127,5 @@ private static void ConfigureSamplingOptions(string? samplerType, string? sample
AzureMonitorExporterEventSource.Log.ConfigureFailed(ex);
}
}

[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Binding options is a known source of trim warnings; this is a deliberate usage.")]
[UnconditionalSuppressMessage("AOT", "IL3050", Justification = "Binding options is a known source of AOT warnings; this is a deliberate usage.")]
private static void BindIConfigurationOptions(IConfiguration configuration, AzureMonitorExporterOptions options)
{
configuration.GetSection(AzureMonitorExporterSectionFromConfig).Bind(options);
}
}
}
Loading