Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK: Nullable annotations for base classes & batch + shims to enable compiler features #3374

Merged
merged 4 commits into from
Jun 17, 2022
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
1 change: 1 addition & 0 deletions OpenTelemetry.sln
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{7CB2F02E
build\docker-compose.net6.0.yml = build\docker-compose.net6.0.yml
build\docker-compose.netcoreapp3.1.yml = build\docker-compose.netcoreapp3.1.yml
build\finalize-publicapi.ps1 = build\finalize-publicapi.ps1
build\GlobalAttrExclusions.txt = build\GlobalAttrExclusions.txt
build\opentelemetry-icon-color.png = build\opentelemetry-icon-color.png
build\OpenTelemetry.prod.loose.ruleset = build\OpenTelemetry.prod.loose.ruleset
build\OpenTelemetry.prod.ruleset = build\OpenTelemetry.prod.ruleset
Expand Down
1 change: 1 addition & 0 deletions build/Common.prod.props
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<PackageOutputPath Condition="$(Build_ArtifactStagingDirectory) != ''">$(Build_ArtifactStagingDirectory)</PackageOutputPath>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!--<MinVerVerbosity>detailed</MinVerVerbosity>-->
<ApiCompatExcludeAttributeList>$(RepoRoot)\build\GlobalAttrExclusions.txt</ApiCompatExcludeAttributeList>
</PropertyGroup>

<Target Name="AssemblyVersionTarget" AfterTargets="MinVer" Condition="'$(MinVerVersion)'!='' AND '$(BuildNumber)' != ''">
Expand Down
4 changes: 4 additions & 0 deletions build/GlobalAttrExclusions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// These attributes should be excluded from ApiCompat checks.
cijothomas marked this conversation as resolved.
Show resolved Hide resolved

T:System.Runtime.CompilerServices.CompilerGeneratedAttribute
T:System.Runtime.CompilerServices.NullableContextAttribute
42 changes: 21 additions & 21 deletions src/OpenTelemetry/.publicApi/net462/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#nullable enable
~abstract OpenTelemetry.BaseExporter<T>.Export(in OpenTelemetry.Batch<T> batch) -> OpenTelemetry.ExportResult
~abstract OpenTelemetry.BaseExportProcessor<T>.OnExport(T data) -> void
~OpenTelemetry.BaseExporter<T>
~OpenTelemetry.BaseExporter<T>.ParentProvider.get -> OpenTelemetry.BaseProvider
~OpenTelemetry.BaseExportProcessor<T>
~OpenTelemetry.BaseExportProcessor<T>.BaseExportProcessor(OpenTelemetry.BaseExporter<T> exporter) -> void
abstract OpenTelemetry.BaseExporter<T>.Export(in OpenTelemetry.Batch<T!> batch) -> OpenTelemetry.ExportResult
abstract OpenTelemetry.BaseExportProcessor<T>.OnExport(T! data) -> void
OpenTelemetry.BaseExporter<T>
OpenTelemetry.BaseExporter<T>.ParentProvider.get -> OpenTelemetry.BaseProvider?
OpenTelemetry.BaseExportProcessor<T>
OpenTelemetry.BaseExportProcessor<T>.BaseExportProcessor(OpenTelemetry.BaseExporter<T!>! exporter) -> void
OpenTelemetry.BaseProcessor<T>.ParentProvider.get -> OpenTelemetry.BaseProvider?
~OpenTelemetry.Batch<T>
~OpenTelemetry.Batch<T>.Batch(T[] items, int count) -> void
~OpenTelemetry.Batch<T>.Enumerator.Current.get -> T
OpenTelemetry.Batch<T>
OpenTelemetry.Batch<T>.Batch(T![]! items, int count) -> void
OpenTelemetry.Batch<T>.Enumerator.Current.get -> T!
~OpenTelemetry.Batch<T>.GetEnumerator() -> OpenTelemetry.Batch<T>.Enumerator
~OpenTelemetry.BatchActivityExportProcessor.BatchActivityExportProcessor(OpenTelemetry.BaseExporter<System.Diagnostics.Activity> exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void
~OpenTelemetry.BatchExportProcessor<T>
~OpenTelemetry.BatchExportProcessor<T>.BatchExportProcessor(OpenTelemetry.BaseExporter<T> exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void
OpenTelemetry.BatchExportProcessor<T>
OpenTelemetry.BatchExportProcessor<T>.BatchExportProcessor(OpenTelemetry.BaseExporter<T!>! exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void
~OpenTelemetry.BatchExportProcessorOptions<T>
~OpenTelemetry.CompositeProcessor<T>.AddProcessor(OpenTelemetry.BaseProcessor<T> processor) -> OpenTelemetry.CompositeProcessor<T>
~OpenTelemetry.CompositeProcessor<T>.CompositeProcessor(System.Collections.Generic.IEnumerable<OpenTelemetry.BaseProcessor<T>> processors) -> void
OpenTelemetry.CompositeProcessor<T>.AddProcessor(OpenTelemetry.BaseProcessor<T>! processor) -> OpenTelemetry.CompositeProcessor<T>!
OpenTelemetry.CompositeProcessor<T>.CompositeProcessor(System.Collections.Generic.IEnumerable<OpenTelemetry.BaseProcessor<T>!>! processors) -> void
~OpenTelemetry.Metrics.BaseExportingMetricReader.BaseExportingMetricReader(OpenTelemetry.BaseExporter<OpenTelemetry.Metrics.Metric> exporter) -> void
~OpenTelemetry.Metrics.ExplicitBucketHistogramConfiguration.Boundaries.get -> double[]
~OpenTelemetry.Metrics.ExplicitBucketHistogramConfiguration.Boundaries.set -> void
Expand Down Expand Up @@ -46,8 +46,8 @@ OpenTelemetry.BaseProcessor<T>.ParentProvider.get -> OpenTelemetry.BaseProvider?
~OpenTelemetry.Resources.ResourceBuilder.Build() -> OpenTelemetry.Resources.Resource
~OpenTelemetry.Resources.ResourceBuilder.Clear() -> OpenTelemetry.Resources.ResourceBuilder
~OpenTelemetry.SimpleActivityExportProcessor.SimpleActivityExportProcessor(OpenTelemetry.BaseExporter<System.Diagnostics.Activity> exporter) -> void
~OpenTelemetry.SimpleExportProcessor<T>
~OpenTelemetry.SimpleExportProcessor<T>.SimpleExportProcessor(OpenTelemetry.BaseExporter<T> exporter) -> void
OpenTelemetry.SimpleExportProcessor<T>
OpenTelemetry.SimpleExportProcessor<T>.SimpleExportProcessor(OpenTelemetry.BaseExporter<T!>! exporter) -> void
~OpenTelemetry.Trace.ParentBasedSampler.ParentBasedSampler(OpenTelemetry.Trace.Sampler rootSampler) -> void
~OpenTelemetry.Trace.ParentBasedSampler.ParentBasedSampler(OpenTelemetry.Trace.Sampler rootSampler, OpenTelemetry.Trace.Sampler remoteParentSampled = null, OpenTelemetry.Trace.Sampler remoteParentNotSampled = null, OpenTelemetry.Trace.Sampler localParentSampled = null, OpenTelemetry.Trace.Sampler localParentNotSampled = null) -> void
~OpenTelemetry.Trace.Sampler.Description.get -> string
Expand All @@ -60,19 +60,19 @@ OpenTelemetry.BaseProcessor<T>.ParentProvider.get -> OpenTelemetry.BaseProvider?
~OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>> attributes) -> void
~OpenTelemetry.Trace.TracerProviderBuilderBase.AddInstrumentation(string instrumentationName, string instrumentationVersion, System.Func<object> instrumentationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder
~OpenTelemetry.Trace.TracerProviderBuilderBase.Build() -> OpenTelemetry.Trace.TracerProvider
~override OpenTelemetry.BaseExportProcessor<T>.OnEnd(T data) -> void
override OpenTelemetry.BaseExportProcessor<T>.OnEnd(T! data) -> void
~override OpenTelemetry.BatchActivityExportProcessor.OnEnd(System.Diagnostics.Activity data) -> void
~override OpenTelemetry.BatchExportProcessor<T>.OnExport(T data) -> void
override OpenTelemetry.BatchExportProcessor<T>.OnExport(T! data) -> void
~override OpenTelemetry.Metrics.MeterProviderBuilderBase.AddInstrumentation<TInstrumentation>(System.Func<TInstrumentation> instrumentationFactory) -> OpenTelemetry.Metrics.MeterProviderBuilder
~override OpenTelemetry.Metrics.MeterProviderBuilderBase.AddMeter(params string[] names) -> OpenTelemetry.Metrics.MeterProviderBuilder
~override OpenTelemetry.SimpleActivityExportProcessor.OnEnd(System.Diagnostics.Activity data) -> void
~override OpenTelemetry.SimpleExportProcessor<T>.OnExport(T data) -> void
override OpenTelemetry.SimpleExportProcessor<T>.OnExport(T! data) -> void
~override OpenTelemetry.Trace.SamplingResult.Equals(object obj) -> bool
~override OpenTelemetry.Trace.TracerProviderBuilderBase.AddInstrumentation<TInstrumentation>(System.Func<TInstrumentation> instrumentationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder
~override OpenTelemetry.Trace.TracerProviderBuilderBase.AddLegacySource(string operationName) -> OpenTelemetry.Trace.TracerProviderBuilder
~override OpenTelemetry.Trace.TracerProviderBuilderBase.AddSource(params string[] names) -> OpenTelemetry.Trace.TracerProviderBuilder
~override sealed OpenTelemetry.BaseExportProcessor<T>.OnStart(T data) -> void
~readonly OpenTelemetry.BaseExportProcessor<T>.exporter -> OpenTelemetry.BaseExporter<T>
override sealed OpenTelemetry.BaseExportProcessor<T>.OnStart(T! data) -> void
readonly OpenTelemetry.BaseExportProcessor<T>.exporter -> OpenTelemetry.BaseExporter<T!>!
~readonly OpenTelemetry.Metrics.BaseExportingMetricReader.exporter -> OpenTelemetry.BaseExporter<OpenTelemetry.Metrics.Metric>
~static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.AddReader(this OpenTelemetry.Metrics.MeterProviderBuilder meterProviderBuilder, OpenTelemetry.Metrics.MetricReader reader) -> OpenTelemetry.Metrics.MeterProviderBuilder
~static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.AddView(this OpenTelemetry.Metrics.MeterProviderBuilder meterProviderBuilder, string instrumentName, OpenTelemetry.Metrics.MetricStreamConfiguration metricStreamConfiguration) -> OpenTelemetry.Metrics.MeterProviderBuilder
Expand Down Expand Up @@ -145,7 +145,7 @@ OpenTelemetry.ExportResult
OpenTelemetry.ExportResult.Failure = 1 -> OpenTelemetry.ExportResult
OpenTelemetry.ExportResult.Success = 0 -> OpenTelemetry.ExportResult
OpenTelemetry.Logs.LogRecord
OpenTelemetry.Logs.LogRecord.CategoryName.get -> string!
OpenTelemetry.Logs.LogRecord.CategoryName.get -> string?
OpenTelemetry.Logs.LogRecord.EventId.get -> Microsoft.Extensions.Logging.EventId
OpenTelemetry.Logs.LogRecord.Exception.get -> System.Exception?
OpenTelemetry.Logs.LogRecord.ForEachScope<TState>(System.Action<OpenTelemetry.Logs.LogRecordScope, TState>! callback, TState state) -> void
Expand Down
Loading