diff --git a/src/OpenTelemetry/.publicApi/net462/PublicAPI.Shipped.txt b/src/OpenTelemetry/.publicApi/net462/PublicAPI.Shipped.txt index 5cb58ce6d58..a601fdd2439 100644 --- a/src/OpenTelemetry/.publicApi/net462/PublicAPI.Shipped.txt +++ b/src/OpenTelemetry/.publicApi/net462/PublicAPI.Shipped.txt @@ -10,10 +10,10 @@ OpenTelemetry.Batch OpenTelemetry.Batch.Batch(T![]! items, int count) -> void OpenTelemetry.Batch.Enumerator.Current.get -> T! ~OpenTelemetry.Batch.GetEnumerator() -> OpenTelemetry.Batch.Enumerator -~OpenTelemetry.BatchActivityExportProcessor.BatchActivityExportProcessor(OpenTelemetry.BaseExporter exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void +OpenTelemetry.BatchActivityExportProcessor.BatchActivityExportProcessor(OpenTelemetry.BaseExporter! exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void OpenTelemetry.BatchExportProcessor OpenTelemetry.BatchExportProcessor.BatchExportProcessor(OpenTelemetry.BaseExporter! exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void -~OpenTelemetry.BatchExportProcessorOptions +OpenTelemetry.BatchExportProcessorOptions OpenTelemetry.CompositeProcessor.AddProcessor(OpenTelemetry.BaseProcessor! processor) -> OpenTelemetry.CompositeProcessor! OpenTelemetry.CompositeProcessor.CompositeProcessor(System.Collections.Generic.IEnumerable!>! processors) -> void ~OpenTelemetry.Metrics.BaseExportingMetricReader.BaseExportingMetricReader(OpenTelemetry.BaseExporter exporter) -> void @@ -37,37 +37,37 @@ OpenTelemetry.Metrics.MetricReaderOptions.PeriodicExportingMetricReaderOptions.s ~OpenTelemetry.Metrics.MetricStreamConfiguration.TagKeys.get -> string[] ~OpenTelemetry.Metrics.MetricStreamConfiguration.TagKeys.set -> void ~OpenTelemetry.Metrics.PeriodicExportingMetricReader.PeriodicExportingMetricReader(OpenTelemetry.BaseExporter exporter, int exportIntervalMilliseconds = 60000, int exportTimeoutMilliseconds = 30000) -> void -~OpenTelemetry.ReadOnlyTagCollection.Enumerator.Current.get -> System.Collections.Generic.KeyValuePair -~OpenTelemetry.Resources.IResourceDetector.Detect() -> OpenTelemetry.Resources.Resource -~OpenTelemetry.Resources.Resource.Attributes.get -> System.Collections.Generic.IEnumerable> -~OpenTelemetry.Resources.Resource.Merge(OpenTelemetry.Resources.Resource other) -> OpenTelemetry.Resources.Resource -~OpenTelemetry.Resources.Resource.Resource(System.Collections.Generic.IEnumerable> attributes) -> void +OpenTelemetry.ReadOnlyTagCollection.Enumerator.Current.get -> System.Collections.Generic.KeyValuePair +OpenTelemetry.Resources.IResourceDetector.Detect() -> OpenTelemetry.Resources.Resource! +OpenTelemetry.Resources.Resource.Attributes.get -> System.Collections.Generic.IEnumerable>! +OpenTelemetry.Resources.Resource.Merge(OpenTelemetry.Resources.Resource! other) -> OpenTelemetry.Resources.Resource! +OpenTelemetry.Resources.Resource.Resource(System.Collections.Generic.IEnumerable>! attributes) -> void OpenTelemetry.Resources.ResourceBuilder.AddDetector(OpenTelemetry.Resources.IResourceDetector! resourceDetector) -> OpenTelemetry.Resources.ResourceBuilder! OpenTelemetry.Resources.ResourceBuilder.Build() -> OpenTelemetry.Resources.Resource! OpenTelemetry.Resources.ResourceBuilder.Clear() -> OpenTelemetry.Resources.ResourceBuilder! -~OpenTelemetry.SimpleActivityExportProcessor.SimpleActivityExportProcessor(OpenTelemetry.BaseExporter exporter) -> void +OpenTelemetry.SimpleActivityExportProcessor.SimpleActivityExportProcessor(OpenTelemetry.BaseExporter! exporter) -> void OpenTelemetry.SimpleExportProcessor OpenTelemetry.SimpleExportProcessor.SimpleExportProcessor(OpenTelemetry.BaseExporter! 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 -~OpenTelemetry.Trace.Sampler.Description.set -> void -~OpenTelemetry.Trace.SamplingParameters.Links.get -> System.Collections.Generic.IEnumerable -~OpenTelemetry.Trace.SamplingParameters.Name.get -> string -~OpenTelemetry.Trace.SamplingParameters.SamplingParameters(System.Diagnostics.ActivityContext parentContext, System.Diagnostics.ActivityTraceId traceId, string name, System.Diagnostics.ActivityKind kind, System.Collections.Generic.IEnumerable> tags = null, System.Collections.Generic.IEnumerable links = null) -> void -~OpenTelemetry.Trace.SamplingParameters.Tags.get -> System.Collections.Generic.IEnumerable> -~OpenTelemetry.Trace.SamplingResult.Attributes.get -> System.Collections.Generic.IEnumerable> -~OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable> attributes) -> 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! +OpenTelemetry.Trace.Sampler.Description.set -> void +OpenTelemetry.Trace.SamplingParameters.Links.get -> System.Collections.Generic.IEnumerable? +OpenTelemetry.Trace.SamplingParameters.Name.get -> string! +OpenTelemetry.Trace.SamplingParameters.SamplingParameters(System.Diagnostics.ActivityContext parentContext, System.Diagnostics.ActivityTraceId traceId, string! name, System.Diagnostics.ActivityKind kind, System.Collections.Generic.IEnumerable>? tags = null, System.Collections.Generic.IEnumerable? links = null) -> void +OpenTelemetry.Trace.SamplingParameters.Tags.get -> System.Collections.Generic.IEnumerable>? +OpenTelemetry.Trace.SamplingResult.Attributes.get -> System.Collections.Generic.IEnumerable>! +OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable>! attributes) -> void OpenTelemetry.Trace.TracerProviderBuilderBase.AddInstrumentation(string! instrumentationName, string! instrumentationVersion, System.Func! instrumentationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder! OpenTelemetry.Trace.TracerProviderBuilderBase.Build() -> OpenTelemetry.Trace.TracerProvider! override OpenTelemetry.BaseExportProcessor.OnEnd(T! data) -> void -~override OpenTelemetry.BatchActivityExportProcessor.OnEnd(System.Diagnostics.Activity data) -> void +override OpenTelemetry.BatchActivityExportProcessor.OnEnd(System.Diagnostics.Activity! data) -> void override OpenTelemetry.BatchExportProcessor.OnExport(T! data) -> void ~override OpenTelemetry.Metrics.MeterProviderBuilderBase.AddInstrumentation(System.Func! 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.SimpleActivityExportProcessor.OnEnd(System.Diagnostics.Activity! data) -> void override OpenTelemetry.SimpleExportProcessor.OnExport(T! data) -> void -~override OpenTelemetry.Trace.SamplingResult.Equals(object obj) -> bool +override OpenTelemetry.Trace.SamplingResult.Equals(object? obj) -> bool ~override OpenTelemetry.Trace.TracerProviderBuilderBase.AddInstrumentation(System.Func! 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! @@ -85,9 +85,9 @@ static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.SetResourceBuilder(t ~static OpenTelemetry.Metrics.MeterProviderExtensions.ForceFlush(this OpenTelemetry.Metrics.MeterProvider provider, int timeoutMilliseconds = -1) -> bool ~static OpenTelemetry.Metrics.MeterProviderExtensions.Shutdown(this OpenTelemetry.Metrics.MeterProvider provider, int timeoutMilliseconds = -1) -> bool ~static OpenTelemetry.Metrics.MetricStreamConfiguration.Drop.get -> OpenTelemetry.Metrics.MetricStreamConfiguration -~static OpenTelemetry.ProviderExtensions.GetDefaultResource(this OpenTelemetry.BaseProvider baseProvider) -> OpenTelemetry.Resources.Resource -~static OpenTelemetry.ProviderExtensions.GetResource(this OpenTelemetry.BaseProvider baseProvider) -> OpenTelemetry.Resources.Resource -~static OpenTelemetry.Resources.Resource.Empty.get -> OpenTelemetry.Resources.Resource +static OpenTelemetry.ProviderExtensions.GetDefaultResource(this OpenTelemetry.BaseProvider! baseProvider) -> OpenTelemetry.Resources.Resource! +static OpenTelemetry.ProviderExtensions.GetResource(this OpenTelemetry.BaseProvider! baseProvider) -> OpenTelemetry.Resources.Resource! +static OpenTelemetry.Resources.Resource.Empty.get -> OpenTelemetry.Resources.Resource! static OpenTelemetry.Resources.ResourceBuilder.CreateDefault() -> OpenTelemetry.Resources.ResourceBuilder! static OpenTelemetry.Resources.ResourceBuilder.CreateEmpty() -> OpenTelemetry.Resources.ResourceBuilder! static OpenTelemetry.Resources.ResourceBuilderExtensions.AddAttributes(this OpenTelemetry.Resources.ResourceBuilder! resourceBuilder, System.Collections.Generic.IEnumerable>! attributes) -> OpenTelemetry.Resources.ResourceBuilder! @@ -97,7 +97,7 @@ static OpenTelemetry.Resources.ResourceBuilderExtensions.AddTelemetrySdk(this Op static OpenTelemetry.Sdk.CreateMeterProviderBuilder() -> OpenTelemetry.Metrics.MeterProviderBuilder! static OpenTelemetry.Sdk.CreateTracerProviderBuilder() -> OpenTelemetry.Trace.TracerProviderBuilder! static OpenTelemetry.Sdk.SetDefaultTextMapPropagator(OpenTelemetry.Context.Propagation.TextMapPropagator! textMapPropagator) -> void -~static OpenTelemetry.SuppressInstrumentationScope.Begin(bool value = true) -> System.IDisposable +static OpenTelemetry.SuppressInstrumentationScope.Begin(bool value = true) -> System.IDisposable! static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddProcessor(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, OpenTelemetry.BaseProcessor! processor) -> OpenTelemetry.Trace.TracerProviderBuilder! static OpenTelemetry.Trace.TracerProviderBuilderExtensions.Build(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder) -> OpenTelemetry.Trace.TracerProvider? static OpenTelemetry.Trace.TracerProviderBuilderExtensions.SetErrorStatusOnException(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, bool enabled = true) -> OpenTelemetry.Trace.TracerProviderBuilder! diff --git a/src/OpenTelemetry/.publicApi/net462/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/net462/PublicAPI.Unshipped.txt index 3eda3ba51a9..dc2cac75890 100644 --- a/src/OpenTelemetry/.publicApi/net462/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry/.publicApi/net462/PublicAPI.Unshipped.txt @@ -27,9 +27,9 @@ static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.ConfigureBuilder(thi static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.ConfigureServices(this OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder, System.Action! configure) -> OpenTelemetry.Metrics.MeterProviderBuilder! static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddExporter(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, OpenTelemetry.ExportProcessorType exportProcessorType, OpenTelemetry.BaseExporter! exporter, string? name, System.Action? configure) -> OpenTelemetry.Trace.TracerProviderBuilder! static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddExporter(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, OpenTelemetry.ExportProcessorType exportProcessorType, string? name, System.Action? configure) -> OpenTelemetry.Trace.TracerProviderBuilder! -~OpenTelemetry.Trace.SamplingResult.TraceStateString.get -> string -~OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, string traceStateString) -> void -~OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable> attributes, string traceStateString) -> void +OpenTelemetry.Trace.SamplingResult.TraceStateString.get -> string? +OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, string! traceStateString) -> void +OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable>? attributes, string? traceStateString) -> void *REMOVED*static Microsoft.Extensions.Logging.OpenTelemetryLoggingExtensions.AddOpenTelemetry(this Microsoft.Extensions.Logging.ILoggingBuilder! builder, System.Action? configure = null) -> Microsoft.Extensions.Logging.ILoggingBuilder! OpenTelemetry.Trace.ExportActivityProcessorOptions OpenTelemetry.Trace.ExportActivityProcessorOptions.BatchExportProcessorOptions.get -> OpenTelemetry.Trace.BatchExportActivityProcessorOptions! diff --git a/src/OpenTelemetry/.publicApi/net6.0/PublicAPI.Shipped.txt b/src/OpenTelemetry/.publicApi/net6.0/PublicAPI.Shipped.txt index 5cb58ce6d58..a601fdd2439 100644 --- a/src/OpenTelemetry/.publicApi/net6.0/PublicAPI.Shipped.txt +++ b/src/OpenTelemetry/.publicApi/net6.0/PublicAPI.Shipped.txt @@ -10,10 +10,10 @@ OpenTelemetry.Batch OpenTelemetry.Batch.Batch(T![]! items, int count) -> void OpenTelemetry.Batch.Enumerator.Current.get -> T! ~OpenTelemetry.Batch.GetEnumerator() -> OpenTelemetry.Batch.Enumerator -~OpenTelemetry.BatchActivityExportProcessor.BatchActivityExportProcessor(OpenTelemetry.BaseExporter exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void +OpenTelemetry.BatchActivityExportProcessor.BatchActivityExportProcessor(OpenTelemetry.BaseExporter! exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void OpenTelemetry.BatchExportProcessor OpenTelemetry.BatchExportProcessor.BatchExportProcessor(OpenTelemetry.BaseExporter! exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void -~OpenTelemetry.BatchExportProcessorOptions +OpenTelemetry.BatchExportProcessorOptions OpenTelemetry.CompositeProcessor.AddProcessor(OpenTelemetry.BaseProcessor! processor) -> OpenTelemetry.CompositeProcessor! OpenTelemetry.CompositeProcessor.CompositeProcessor(System.Collections.Generic.IEnumerable!>! processors) -> void ~OpenTelemetry.Metrics.BaseExportingMetricReader.BaseExportingMetricReader(OpenTelemetry.BaseExporter exporter) -> void @@ -37,37 +37,37 @@ OpenTelemetry.Metrics.MetricReaderOptions.PeriodicExportingMetricReaderOptions.s ~OpenTelemetry.Metrics.MetricStreamConfiguration.TagKeys.get -> string[] ~OpenTelemetry.Metrics.MetricStreamConfiguration.TagKeys.set -> void ~OpenTelemetry.Metrics.PeriodicExportingMetricReader.PeriodicExportingMetricReader(OpenTelemetry.BaseExporter exporter, int exportIntervalMilliseconds = 60000, int exportTimeoutMilliseconds = 30000) -> void -~OpenTelemetry.ReadOnlyTagCollection.Enumerator.Current.get -> System.Collections.Generic.KeyValuePair -~OpenTelemetry.Resources.IResourceDetector.Detect() -> OpenTelemetry.Resources.Resource -~OpenTelemetry.Resources.Resource.Attributes.get -> System.Collections.Generic.IEnumerable> -~OpenTelemetry.Resources.Resource.Merge(OpenTelemetry.Resources.Resource other) -> OpenTelemetry.Resources.Resource -~OpenTelemetry.Resources.Resource.Resource(System.Collections.Generic.IEnumerable> attributes) -> void +OpenTelemetry.ReadOnlyTagCollection.Enumerator.Current.get -> System.Collections.Generic.KeyValuePair +OpenTelemetry.Resources.IResourceDetector.Detect() -> OpenTelemetry.Resources.Resource! +OpenTelemetry.Resources.Resource.Attributes.get -> System.Collections.Generic.IEnumerable>! +OpenTelemetry.Resources.Resource.Merge(OpenTelemetry.Resources.Resource! other) -> OpenTelemetry.Resources.Resource! +OpenTelemetry.Resources.Resource.Resource(System.Collections.Generic.IEnumerable>! attributes) -> void OpenTelemetry.Resources.ResourceBuilder.AddDetector(OpenTelemetry.Resources.IResourceDetector! resourceDetector) -> OpenTelemetry.Resources.ResourceBuilder! OpenTelemetry.Resources.ResourceBuilder.Build() -> OpenTelemetry.Resources.Resource! OpenTelemetry.Resources.ResourceBuilder.Clear() -> OpenTelemetry.Resources.ResourceBuilder! -~OpenTelemetry.SimpleActivityExportProcessor.SimpleActivityExportProcessor(OpenTelemetry.BaseExporter exporter) -> void +OpenTelemetry.SimpleActivityExportProcessor.SimpleActivityExportProcessor(OpenTelemetry.BaseExporter! exporter) -> void OpenTelemetry.SimpleExportProcessor OpenTelemetry.SimpleExportProcessor.SimpleExportProcessor(OpenTelemetry.BaseExporter! 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 -~OpenTelemetry.Trace.Sampler.Description.set -> void -~OpenTelemetry.Trace.SamplingParameters.Links.get -> System.Collections.Generic.IEnumerable -~OpenTelemetry.Trace.SamplingParameters.Name.get -> string -~OpenTelemetry.Trace.SamplingParameters.SamplingParameters(System.Diagnostics.ActivityContext parentContext, System.Diagnostics.ActivityTraceId traceId, string name, System.Diagnostics.ActivityKind kind, System.Collections.Generic.IEnumerable> tags = null, System.Collections.Generic.IEnumerable links = null) -> void -~OpenTelemetry.Trace.SamplingParameters.Tags.get -> System.Collections.Generic.IEnumerable> -~OpenTelemetry.Trace.SamplingResult.Attributes.get -> System.Collections.Generic.IEnumerable> -~OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable> attributes) -> 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! +OpenTelemetry.Trace.Sampler.Description.set -> void +OpenTelemetry.Trace.SamplingParameters.Links.get -> System.Collections.Generic.IEnumerable? +OpenTelemetry.Trace.SamplingParameters.Name.get -> string! +OpenTelemetry.Trace.SamplingParameters.SamplingParameters(System.Diagnostics.ActivityContext parentContext, System.Diagnostics.ActivityTraceId traceId, string! name, System.Diagnostics.ActivityKind kind, System.Collections.Generic.IEnumerable>? tags = null, System.Collections.Generic.IEnumerable? links = null) -> void +OpenTelemetry.Trace.SamplingParameters.Tags.get -> System.Collections.Generic.IEnumerable>? +OpenTelemetry.Trace.SamplingResult.Attributes.get -> System.Collections.Generic.IEnumerable>! +OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable>! attributes) -> void OpenTelemetry.Trace.TracerProviderBuilderBase.AddInstrumentation(string! instrumentationName, string! instrumentationVersion, System.Func! instrumentationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder! OpenTelemetry.Trace.TracerProviderBuilderBase.Build() -> OpenTelemetry.Trace.TracerProvider! override OpenTelemetry.BaseExportProcessor.OnEnd(T! data) -> void -~override OpenTelemetry.BatchActivityExportProcessor.OnEnd(System.Diagnostics.Activity data) -> void +override OpenTelemetry.BatchActivityExportProcessor.OnEnd(System.Diagnostics.Activity! data) -> void override OpenTelemetry.BatchExportProcessor.OnExport(T! data) -> void ~override OpenTelemetry.Metrics.MeterProviderBuilderBase.AddInstrumentation(System.Func! 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.SimpleActivityExportProcessor.OnEnd(System.Diagnostics.Activity! data) -> void override OpenTelemetry.SimpleExportProcessor.OnExport(T! data) -> void -~override OpenTelemetry.Trace.SamplingResult.Equals(object obj) -> bool +override OpenTelemetry.Trace.SamplingResult.Equals(object? obj) -> bool ~override OpenTelemetry.Trace.TracerProviderBuilderBase.AddInstrumentation(System.Func! 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! @@ -85,9 +85,9 @@ static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.SetResourceBuilder(t ~static OpenTelemetry.Metrics.MeterProviderExtensions.ForceFlush(this OpenTelemetry.Metrics.MeterProvider provider, int timeoutMilliseconds = -1) -> bool ~static OpenTelemetry.Metrics.MeterProviderExtensions.Shutdown(this OpenTelemetry.Metrics.MeterProvider provider, int timeoutMilliseconds = -1) -> bool ~static OpenTelemetry.Metrics.MetricStreamConfiguration.Drop.get -> OpenTelemetry.Metrics.MetricStreamConfiguration -~static OpenTelemetry.ProviderExtensions.GetDefaultResource(this OpenTelemetry.BaseProvider baseProvider) -> OpenTelemetry.Resources.Resource -~static OpenTelemetry.ProviderExtensions.GetResource(this OpenTelemetry.BaseProvider baseProvider) -> OpenTelemetry.Resources.Resource -~static OpenTelemetry.Resources.Resource.Empty.get -> OpenTelemetry.Resources.Resource +static OpenTelemetry.ProviderExtensions.GetDefaultResource(this OpenTelemetry.BaseProvider! baseProvider) -> OpenTelemetry.Resources.Resource! +static OpenTelemetry.ProviderExtensions.GetResource(this OpenTelemetry.BaseProvider! baseProvider) -> OpenTelemetry.Resources.Resource! +static OpenTelemetry.Resources.Resource.Empty.get -> OpenTelemetry.Resources.Resource! static OpenTelemetry.Resources.ResourceBuilder.CreateDefault() -> OpenTelemetry.Resources.ResourceBuilder! static OpenTelemetry.Resources.ResourceBuilder.CreateEmpty() -> OpenTelemetry.Resources.ResourceBuilder! static OpenTelemetry.Resources.ResourceBuilderExtensions.AddAttributes(this OpenTelemetry.Resources.ResourceBuilder! resourceBuilder, System.Collections.Generic.IEnumerable>! attributes) -> OpenTelemetry.Resources.ResourceBuilder! @@ -97,7 +97,7 @@ static OpenTelemetry.Resources.ResourceBuilderExtensions.AddTelemetrySdk(this Op static OpenTelemetry.Sdk.CreateMeterProviderBuilder() -> OpenTelemetry.Metrics.MeterProviderBuilder! static OpenTelemetry.Sdk.CreateTracerProviderBuilder() -> OpenTelemetry.Trace.TracerProviderBuilder! static OpenTelemetry.Sdk.SetDefaultTextMapPropagator(OpenTelemetry.Context.Propagation.TextMapPropagator! textMapPropagator) -> void -~static OpenTelemetry.SuppressInstrumentationScope.Begin(bool value = true) -> System.IDisposable +static OpenTelemetry.SuppressInstrumentationScope.Begin(bool value = true) -> System.IDisposable! static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddProcessor(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, OpenTelemetry.BaseProcessor! processor) -> OpenTelemetry.Trace.TracerProviderBuilder! static OpenTelemetry.Trace.TracerProviderBuilderExtensions.Build(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder) -> OpenTelemetry.Trace.TracerProvider? static OpenTelemetry.Trace.TracerProviderBuilderExtensions.SetErrorStatusOnException(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, bool enabled = true) -> OpenTelemetry.Trace.TracerProviderBuilder! diff --git a/src/OpenTelemetry/.publicApi/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/net6.0/PublicAPI.Unshipped.txt index 3eda3ba51a9..dc2cac75890 100644 --- a/src/OpenTelemetry/.publicApi/net6.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry/.publicApi/net6.0/PublicAPI.Unshipped.txt @@ -27,9 +27,9 @@ static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.ConfigureBuilder(thi static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.ConfigureServices(this OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder, System.Action! configure) -> OpenTelemetry.Metrics.MeterProviderBuilder! static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddExporter(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, OpenTelemetry.ExportProcessorType exportProcessorType, OpenTelemetry.BaseExporter! exporter, string? name, System.Action? configure) -> OpenTelemetry.Trace.TracerProviderBuilder! static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddExporter(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, OpenTelemetry.ExportProcessorType exportProcessorType, string? name, System.Action? configure) -> OpenTelemetry.Trace.TracerProviderBuilder! -~OpenTelemetry.Trace.SamplingResult.TraceStateString.get -> string -~OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, string traceStateString) -> void -~OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable> attributes, string traceStateString) -> void +OpenTelemetry.Trace.SamplingResult.TraceStateString.get -> string? +OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, string! traceStateString) -> void +OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable>? attributes, string? traceStateString) -> void *REMOVED*static Microsoft.Extensions.Logging.OpenTelemetryLoggingExtensions.AddOpenTelemetry(this Microsoft.Extensions.Logging.ILoggingBuilder! builder, System.Action? configure = null) -> Microsoft.Extensions.Logging.ILoggingBuilder! OpenTelemetry.Trace.ExportActivityProcessorOptions OpenTelemetry.Trace.ExportActivityProcessorOptions.BatchExportProcessorOptions.get -> OpenTelemetry.Trace.BatchExportActivityProcessorOptions! diff --git a/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Shipped.txt b/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Shipped.txt index 5cb58ce6d58..a601fdd2439 100644 --- a/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Shipped.txt +++ b/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Shipped.txt @@ -10,10 +10,10 @@ OpenTelemetry.Batch OpenTelemetry.Batch.Batch(T![]! items, int count) -> void OpenTelemetry.Batch.Enumerator.Current.get -> T! ~OpenTelemetry.Batch.GetEnumerator() -> OpenTelemetry.Batch.Enumerator -~OpenTelemetry.BatchActivityExportProcessor.BatchActivityExportProcessor(OpenTelemetry.BaseExporter exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void +OpenTelemetry.BatchActivityExportProcessor.BatchActivityExportProcessor(OpenTelemetry.BaseExporter! exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void OpenTelemetry.BatchExportProcessor OpenTelemetry.BatchExportProcessor.BatchExportProcessor(OpenTelemetry.BaseExporter! exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void -~OpenTelemetry.BatchExportProcessorOptions +OpenTelemetry.BatchExportProcessorOptions OpenTelemetry.CompositeProcessor.AddProcessor(OpenTelemetry.BaseProcessor! processor) -> OpenTelemetry.CompositeProcessor! OpenTelemetry.CompositeProcessor.CompositeProcessor(System.Collections.Generic.IEnumerable!>! processors) -> void ~OpenTelemetry.Metrics.BaseExportingMetricReader.BaseExportingMetricReader(OpenTelemetry.BaseExporter exporter) -> void @@ -37,37 +37,37 @@ OpenTelemetry.Metrics.MetricReaderOptions.PeriodicExportingMetricReaderOptions.s ~OpenTelemetry.Metrics.MetricStreamConfiguration.TagKeys.get -> string[] ~OpenTelemetry.Metrics.MetricStreamConfiguration.TagKeys.set -> void ~OpenTelemetry.Metrics.PeriodicExportingMetricReader.PeriodicExportingMetricReader(OpenTelemetry.BaseExporter exporter, int exportIntervalMilliseconds = 60000, int exportTimeoutMilliseconds = 30000) -> void -~OpenTelemetry.ReadOnlyTagCollection.Enumerator.Current.get -> System.Collections.Generic.KeyValuePair -~OpenTelemetry.Resources.IResourceDetector.Detect() -> OpenTelemetry.Resources.Resource -~OpenTelemetry.Resources.Resource.Attributes.get -> System.Collections.Generic.IEnumerable> -~OpenTelemetry.Resources.Resource.Merge(OpenTelemetry.Resources.Resource other) -> OpenTelemetry.Resources.Resource -~OpenTelemetry.Resources.Resource.Resource(System.Collections.Generic.IEnumerable> attributes) -> void +OpenTelemetry.ReadOnlyTagCollection.Enumerator.Current.get -> System.Collections.Generic.KeyValuePair +OpenTelemetry.Resources.IResourceDetector.Detect() -> OpenTelemetry.Resources.Resource! +OpenTelemetry.Resources.Resource.Attributes.get -> System.Collections.Generic.IEnumerable>! +OpenTelemetry.Resources.Resource.Merge(OpenTelemetry.Resources.Resource! other) -> OpenTelemetry.Resources.Resource! +OpenTelemetry.Resources.Resource.Resource(System.Collections.Generic.IEnumerable>! attributes) -> void OpenTelemetry.Resources.ResourceBuilder.AddDetector(OpenTelemetry.Resources.IResourceDetector! resourceDetector) -> OpenTelemetry.Resources.ResourceBuilder! OpenTelemetry.Resources.ResourceBuilder.Build() -> OpenTelemetry.Resources.Resource! OpenTelemetry.Resources.ResourceBuilder.Clear() -> OpenTelemetry.Resources.ResourceBuilder! -~OpenTelemetry.SimpleActivityExportProcessor.SimpleActivityExportProcessor(OpenTelemetry.BaseExporter exporter) -> void +OpenTelemetry.SimpleActivityExportProcessor.SimpleActivityExportProcessor(OpenTelemetry.BaseExporter! exporter) -> void OpenTelemetry.SimpleExportProcessor OpenTelemetry.SimpleExportProcessor.SimpleExportProcessor(OpenTelemetry.BaseExporter! 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 -~OpenTelemetry.Trace.Sampler.Description.set -> void -~OpenTelemetry.Trace.SamplingParameters.Links.get -> System.Collections.Generic.IEnumerable -~OpenTelemetry.Trace.SamplingParameters.Name.get -> string -~OpenTelemetry.Trace.SamplingParameters.SamplingParameters(System.Diagnostics.ActivityContext parentContext, System.Diagnostics.ActivityTraceId traceId, string name, System.Diagnostics.ActivityKind kind, System.Collections.Generic.IEnumerable> tags = null, System.Collections.Generic.IEnumerable links = null) -> void -~OpenTelemetry.Trace.SamplingParameters.Tags.get -> System.Collections.Generic.IEnumerable> -~OpenTelemetry.Trace.SamplingResult.Attributes.get -> System.Collections.Generic.IEnumerable> -~OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable> attributes) -> 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! +OpenTelemetry.Trace.Sampler.Description.set -> void +OpenTelemetry.Trace.SamplingParameters.Links.get -> System.Collections.Generic.IEnumerable? +OpenTelemetry.Trace.SamplingParameters.Name.get -> string! +OpenTelemetry.Trace.SamplingParameters.SamplingParameters(System.Diagnostics.ActivityContext parentContext, System.Diagnostics.ActivityTraceId traceId, string! name, System.Diagnostics.ActivityKind kind, System.Collections.Generic.IEnumerable>? tags = null, System.Collections.Generic.IEnumerable? links = null) -> void +OpenTelemetry.Trace.SamplingParameters.Tags.get -> System.Collections.Generic.IEnumerable>? +OpenTelemetry.Trace.SamplingResult.Attributes.get -> System.Collections.Generic.IEnumerable>! +OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable>! attributes) -> void OpenTelemetry.Trace.TracerProviderBuilderBase.AddInstrumentation(string! instrumentationName, string! instrumentationVersion, System.Func! instrumentationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder! OpenTelemetry.Trace.TracerProviderBuilderBase.Build() -> OpenTelemetry.Trace.TracerProvider! override OpenTelemetry.BaseExportProcessor.OnEnd(T! data) -> void -~override OpenTelemetry.BatchActivityExportProcessor.OnEnd(System.Diagnostics.Activity data) -> void +override OpenTelemetry.BatchActivityExportProcessor.OnEnd(System.Diagnostics.Activity! data) -> void override OpenTelemetry.BatchExportProcessor.OnExport(T! data) -> void ~override OpenTelemetry.Metrics.MeterProviderBuilderBase.AddInstrumentation(System.Func! 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.SimpleActivityExportProcessor.OnEnd(System.Diagnostics.Activity! data) -> void override OpenTelemetry.SimpleExportProcessor.OnExport(T! data) -> void -~override OpenTelemetry.Trace.SamplingResult.Equals(object obj) -> bool +override OpenTelemetry.Trace.SamplingResult.Equals(object? obj) -> bool ~override OpenTelemetry.Trace.TracerProviderBuilderBase.AddInstrumentation(System.Func! 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! @@ -85,9 +85,9 @@ static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.SetResourceBuilder(t ~static OpenTelemetry.Metrics.MeterProviderExtensions.ForceFlush(this OpenTelemetry.Metrics.MeterProvider provider, int timeoutMilliseconds = -1) -> bool ~static OpenTelemetry.Metrics.MeterProviderExtensions.Shutdown(this OpenTelemetry.Metrics.MeterProvider provider, int timeoutMilliseconds = -1) -> bool ~static OpenTelemetry.Metrics.MetricStreamConfiguration.Drop.get -> OpenTelemetry.Metrics.MetricStreamConfiguration -~static OpenTelemetry.ProviderExtensions.GetDefaultResource(this OpenTelemetry.BaseProvider baseProvider) -> OpenTelemetry.Resources.Resource -~static OpenTelemetry.ProviderExtensions.GetResource(this OpenTelemetry.BaseProvider baseProvider) -> OpenTelemetry.Resources.Resource -~static OpenTelemetry.Resources.Resource.Empty.get -> OpenTelemetry.Resources.Resource +static OpenTelemetry.ProviderExtensions.GetDefaultResource(this OpenTelemetry.BaseProvider! baseProvider) -> OpenTelemetry.Resources.Resource! +static OpenTelemetry.ProviderExtensions.GetResource(this OpenTelemetry.BaseProvider! baseProvider) -> OpenTelemetry.Resources.Resource! +static OpenTelemetry.Resources.Resource.Empty.get -> OpenTelemetry.Resources.Resource! static OpenTelemetry.Resources.ResourceBuilder.CreateDefault() -> OpenTelemetry.Resources.ResourceBuilder! static OpenTelemetry.Resources.ResourceBuilder.CreateEmpty() -> OpenTelemetry.Resources.ResourceBuilder! static OpenTelemetry.Resources.ResourceBuilderExtensions.AddAttributes(this OpenTelemetry.Resources.ResourceBuilder! resourceBuilder, System.Collections.Generic.IEnumerable>! attributes) -> OpenTelemetry.Resources.ResourceBuilder! @@ -97,7 +97,7 @@ static OpenTelemetry.Resources.ResourceBuilderExtensions.AddTelemetrySdk(this Op static OpenTelemetry.Sdk.CreateMeterProviderBuilder() -> OpenTelemetry.Metrics.MeterProviderBuilder! static OpenTelemetry.Sdk.CreateTracerProviderBuilder() -> OpenTelemetry.Trace.TracerProviderBuilder! static OpenTelemetry.Sdk.SetDefaultTextMapPropagator(OpenTelemetry.Context.Propagation.TextMapPropagator! textMapPropagator) -> void -~static OpenTelemetry.SuppressInstrumentationScope.Begin(bool value = true) -> System.IDisposable +static OpenTelemetry.SuppressInstrumentationScope.Begin(bool value = true) -> System.IDisposable! static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddProcessor(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, OpenTelemetry.BaseProcessor! processor) -> OpenTelemetry.Trace.TracerProviderBuilder! static OpenTelemetry.Trace.TracerProviderBuilderExtensions.Build(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder) -> OpenTelemetry.Trace.TracerProvider? static OpenTelemetry.Trace.TracerProviderBuilderExtensions.SetErrorStatusOnException(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, bool enabled = true) -> OpenTelemetry.Trace.TracerProviderBuilder! diff --git a/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt index 3eda3ba51a9..dc2cac75890 100644 --- a/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt @@ -27,9 +27,9 @@ static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.ConfigureBuilder(thi static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.ConfigureServices(this OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder, System.Action! configure) -> OpenTelemetry.Metrics.MeterProviderBuilder! static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddExporter(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, OpenTelemetry.ExportProcessorType exportProcessorType, OpenTelemetry.BaseExporter! exporter, string? name, System.Action? configure) -> OpenTelemetry.Trace.TracerProviderBuilder! static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddExporter(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, OpenTelemetry.ExportProcessorType exportProcessorType, string? name, System.Action? configure) -> OpenTelemetry.Trace.TracerProviderBuilder! -~OpenTelemetry.Trace.SamplingResult.TraceStateString.get -> string -~OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, string traceStateString) -> void -~OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable> attributes, string traceStateString) -> void +OpenTelemetry.Trace.SamplingResult.TraceStateString.get -> string? +OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, string! traceStateString) -> void +OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable>? attributes, string? traceStateString) -> void *REMOVED*static Microsoft.Extensions.Logging.OpenTelemetryLoggingExtensions.AddOpenTelemetry(this Microsoft.Extensions.Logging.ILoggingBuilder! builder, System.Action? configure = null) -> Microsoft.Extensions.Logging.ILoggingBuilder! OpenTelemetry.Trace.ExportActivityProcessorOptions OpenTelemetry.Trace.ExportActivityProcessorOptions.BatchExportProcessorOptions.get -> OpenTelemetry.Trace.BatchExportActivityProcessorOptions! diff --git a/src/OpenTelemetry/.publicApi/netstandard2.1/PublicAPI.Shipped.txt b/src/OpenTelemetry/.publicApi/netstandard2.1/PublicAPI.Shipped.txt index 5cb58ce6d58..a601fdd2439 100644 --- a/src/OpenTelemetry/.publicApi/netstandard2.1/PublicAPI.Shipped.txt +++ b/src/OpenTelemetry/.publicApi/netstandard2.1/PublicAPI.Shipped.txt @@ -10,10 +10,10 @@ OpenTelemetry.Batch OpenTelemetry.Batch.Batch(T![]! items, int count) -> void OpenTelemetry.Batch.Enumerator.Current.get -> T! ~OpenTelemetry.Batch.GetEnumerator() -> OpenTelemetry.Batch.Enumerator -~OpenTelemetry.BatchActivityExportProcessor.BatchActivityExportProcessor(OpenTelemetry.BaseExporter exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void +OpenTelemetry.BatchActivityExportProcessor.BatchActivityExportProcessor(OpenTelemetry.BaseExporter! exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void OpenTelemetry.BatchExportProcessor OpenTelemetry.BatchExportProcessor.BatchExportProcessor(OpenTelemetry.BaseExporter! exporter, int maxQueueSize = 2048, int scheduledDelayMilliseconds = 5000, int exporterTimeoutMilliseconds = 30000, int maxExportBatchSize = 512) -> void -~OpenTelemetry.BatchExportProcessorOptions +OpenTelemetry.BatchExportProcessorOptions OpenTelemetry.CompositeProcessor.AddProcessor(OpenTelemetry.BaseProcessor! processor) -> OpenTelemetry.CompositeProcessor! OpenTelemetry.CompositeProcessor.CompositeProcessor(System.Collections.Generic.IEnumerable!>! processors) -> void ~OpenTelemetry.Metrics.BaseExportingMetricReader.BaseExportingMetricReader(OpenTelemetry.BaseExporter exporter) -> void @@ -37,37 +37,37 @@ OpenTelemetry.Metrics.MetricReaderOptions.PeriodicExportingMetricReaderOptions.s ~OpenTelemetry.Metrics.MetricStreamConfiguration.TagKeys.get -> string[] ~OpenTelemetry.Metrics.MetricStreamConfiguration.TagKeys.set -> void ~OpenTelemetry.Metrics.PeriodicExportingMetricReader.PeriodicExportingMetricReader(OpenTelemetry.BaseExporter exporter, int exportIntervalMilliseconds = 60000, int exportTimeoutMilliseconds = 30000) -> void -~OpenTelemetry.ReadOnlyTagCollection.Enumerator.Current.get -> System.Collections.Generic.KeyValuePair -~OpenTelemetry.Resources.IResourceDetector.Detect() -> OpenTelemetry.Resources.Resource -~OpenTelemetry.Resources.Resource.Attributes.get -> System.Collections.Generic.IEnumerable> -~OpenTelemetry.Resources.Resource.Merge(OpenTelemetry.Resources.Resource other) -> OpenTelemetry.Resources.Resource -~OpenTelemetry.Resources.Resource.Resource(System.Collections.Generic.IEnumerable> attributes) -> void +OpenTelemetry.ReadOnlyTagCollection.Enumerator.Current.get -> System.Collections.Generic.KeyValuePair +OpenTelemetry.Resources.IResourceDetector.Detect() -> OpenTelemetry.Resources.Resource! +OpenTelemetry.Resources.Resource.Attributes.get -> System.Collections.Generic.IEnumerable>! +OpenTelemetry.Resources.Resource.Merge(OpenTelemetry.Resources.Resource! other) -> OpenTelemetry.Resources.Resource! +OpenTelemetry.Resources.Resource.Resource(System.Collections.Generic.IEnumerable>! attributes) -> void OpenTelemetry.Resources.ResourceBuilder.AddDetector(OpenTelemetry.Resources.IResourceDetector! resourceDetector) -> OpenTelemetry.Resources.ResourceBuilder! OpenTelemetry.Resources.ResourceBuilder.Build() -> OpenTelemetry.Resources.Resource! OpenTelemetry.Resources.ResourceBuilder.Clear() -> OpenTelemetry.Resources.ResourceBuilder! -~OpenTelemetry.SimpleActivityExportProcessor.SimpleActivityExportProcessor(OpenTelemetry.BaseExporter exporter) -> void +OpenTelemetry.SimpleActivityExportProcessor.SimpleActivityExportProcessor(OpenTelemetry.BaseExporter! exporter) -> void OpenTelemetry.SimpleExportProcessor OpenTelemetry.SimpleExportProcessor.SimpleExportProcessor(OpenTelemetry.BaseExporter! 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 -~OpenTelemetry.Trace.Sampler.Description.set -> void -~OpenTelemetry.Trace.SamplingParameters.Links.get -> System.Collections.Generic.IEnumerable -~OpenTelemetry.Trace.SamplingParameters.Name.get -> string -~OpenTelemetry.Trace.SamplingParameters.SamplingParameters(System.Diagnostics.ActivityContext parentContext, System.Diagnostics.ActivityTraceId traceId, string name, System.Diagnostics.ActivityKind kind, System.Collections.Generic.IEnumerable> tags = null, System.Collections.Generic.IEnumerable links = null) -> void -~OpenTelemetry.Trace.SamplingParameters.Tags.get -> System.Collections.Generic.IEnumerable> -~OpenTelemetry.Trace.SamplingResult.Attributes.get -> System.Collections.Generic.IEnumerable> -~OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable> attributes) -> 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! +OpenTelemetry.Trace.Sampler.Description.set -> void +OpenTelemetry.Trace.SamplingParameters.Links.get -> System.Collections.Generic.IEnumerable? +OpenTelemetry.Trace.SamplingParameters.Name.get -> string! +OpenTelemetry.Trace.SamplingParameters.SamplingParameters(System.Diagnostics.ActivityContext parentContext, System.Diagnostics.ActivityTraceId traceId, string! name, System.Diagnostics.ActivityKind kind, System.Collections.Generic.IEnumerable>? tags = null, System.Collections.Generic.IEnumerable? links = null) -> void +OpenTelemetry.Trace.SamplingParameters.Tags.get -> System.Collections.Generic.IEnumerable>? +OpenTelemetry.Trace.SamplingResult.Attributes.get -> System.Collections.Generic.IEnumerable>! +OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable>! attributes) -> void OpenTelemetry.Trace.TracerProviderBuilderBase.AddInstrumentation(string! instrumentationName, string! instrumentationVersion, System.Func! instrumentationFactory) -> OpenTelemetry.Trace.TracerProviderBuilder! OpenTelemetry.Trace.TracerProviderBuilderBase.Build() -> OpenTelemetry.Trace.TracerProvider! override OpenTelemetry.BaseExportProcessor.OnEnd(T! data) -> void -~override OpenTelemetry.BatchActivityExportProcessor.OnEnd(System.Diagnostics.Activity data) -> void +override OpenTelemetry.BatchActivityExportProcessor.OnEnd(System.Diagnostics.Activity! data) -> void override OpenTelemetry.BatchExportProcessor.OnExport(T! data) -> void ~override OpenTelemetry.Metrics.MeterProviderBuilderBase.AddInstrumentation(System.Func! 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.SimpleActivityExportProcessor.OnEnd(System.Diagnostics.Activity! data) -> void override OpenTelemetry.SimpleExportProcessor.OnExport(T! data) -> void -~override OpenTelemetry.Trace.SamplingResult.Equals(object obj) -> bool +override OpenTelemetry.Trace.SamplingResult.Equals(object? obj) -> bool ~override OpenTelemetry.Trace.TracerProviderBuilderBase.AddInstrumentation(System.Func! 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! @@ -85,9 +85,9 @@ static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.SetResourceBuilder(t ~static OpenTelemetry.Metrics.MeterProviderExtensions.ForceFlush(this OpenTelemetry.Metrics.MeterProvider provider, int timeoutMilliseconds = -1) -> bool ~static OpenTelemetry.Metrics.MeterProviderExtensions.Shutdown(this OpenTelemetry.Metrics.MeterProvider provider, int timeoutMilliseconds = -1) -> bool ~static OpenTelemetry.Metrics.MetricStreamConfiguration.Drop.get -> OpenTelemetry.Metrics.MetricStreamConfiguration -~static OpenTelemetry.ProviderExtensions.GetDefaultResource(this OpenTelemetry.BaseProvider baseProvider) -> OpenTelemetry.Resources.Resource -~static OpenTelemetry.ProviderExtensions.GetResource(this OpenTelemetry.BaseProvider baseProvider) -> OpenTelemetry.Resources.Resource -~static OpenTelemetry.Resources.Resource.Empty.get -> OpenTelemetry.Resources.Resource +static OpenTelemetry.ProviderExtensions.GetDefaultResource(this OpenTelemetry.BaseProvider! baseProvider) -> OpenTelemetry.Resources.Resource! +static OpenTelemetry.ProviderExtensions.GetResource(this OpenTelemetry.BaseProvider! baseProvider) -> OpenTelemetry.Resources.Resource! +static OpenTelemetry.Resources.Resource.Empty.get -> OpenTelemetry.Resources.Resource! static OpenTelemetry.Resources.ResourceBuilder.CreateDefault() -> OpenTelemetry.Resources.ResourceBuilder! static OpenTelemetry.Resources.ResourceBuilder.CreateEmpty() -> OpenTelemetry.Resources.ResourceBuilder! static OpenTelemetry.Resources.ResourceBuilderExtensions.AddAttributes(this OpenTelemetry.Resources.ResourceBuilder! resourceBuilder, System.Collections.Generic.IEnumerable>! attributes) -> OpenTelemetry.Resources.ResourceBuilder! @@ -97,7 +97,7 @@ static OpenTelemetry.Resources.ResourceBuilderExtensions.AddTelemetrySdk(this Op static OpenTelemetry.Sdk.CreateMeterProviderBuilder() -> OpenTelemetry.Metrics.MeterProviderBuilder! static OpenTelemetry.Sdk.CreateTracerProviderBuilder() -> OpenTelemetry.Trace.TracerProviderBuilder! static OpenTelemetry.Sdk.SetDefaultTextMapPropagator(OpenTelemetry.Context.Propagation.TextMapPropagator! textMapPropagator) -> void -~static OpenTelemetry.SuppressInstrumentationScope.Begin(bool value = true) -> System.IDisposable +static OpenTelemetry.SuppressInstrumentationScope.Begin(bool value = true) -> System.IDisposable! static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddProcessor(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, OpenTelemetry.BaseProcessor! processor) -> OpenTelemetry.Trace.TracerProviderBuilder! static OpenTelemetry.Trace.TracerProviderBuilderExtensions.Build(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder) -> OpenTelemetry.Trace.TracerProvider? static OpenTelemetry.Trace.TracerProviderBuilderExtensions.SetErrorStatusOnException(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, bool enabled = true) -> OpenTelemetry.Trace.TracerProviderBuilder! diff --git a/src/OpenTelemetry/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt index 3eda3ba51a9..dc2cac75890 100644 --- a/src/OpenTelemetry/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt @@ -27,9 +27,9 @@ static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.ConfigureBuilder(thi static OpenTelemetry.Metrics.MeterProviderBuilderExtensions.ConfigureServices(this OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder, System.Action! configure) -> OpenTelemetry.Metrics.MeterProviderBuilder! static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddExporter(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, OpenTelemetry.ExportProcessorType exportProcessorType, OpenTelemetry.BaseExporter! exporter, string? name, System.Action? configure) -> OpenTelemetry.Trace.TracerProviderBuilder! static OpenTelemetry.Trace.TracerProviderBuilderExtensions.AddExporter(this OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder, OpenTelemetry.ExportProcessorType exportProcessorType, string? name, System.Action? configure) -> OpenTelemetry.Trace.TracerProviderBuilder! -~OpenTelemetry.Trace.SamplingResult.TraceStateString.get -> string -~OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, string traceStateString) -> void -~OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable> attributes, string traceStateString) -> void +OpenTelemetry.Trace.SamplingResult.TraceStateString.get -> string? +OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, string! traceStateString) -> void +OpenTelemetry.Trace.SamplingResult.SamplingResult(OpenTelemetry.Trace.SamplingDecision decision, System.Collections.Generic.IEnumerable>? attributes, string? traceStateString) -> void *REMOVED*static Microsoft.Extensions.Logging.OpenTelemetryLoggingExtensions.AddOpenTelemetry(this Microsoft.Extensions.Logging.ILoggingBuilder! builder, System.Action? configure = null) -> Microsoft.Extensions.Logging.ILoggingBuilder! OpenTelemetry.Trace.ExportActivityProcessorOptions OpenTelemetry.Trace.ExportActivityProcessorOptions.BatchExportProcessorOptions.get -> OpenTelemetry.Trace.BatchExportActivityProcessorOptions! diff --git a/src/OpenTelemetry/BatchExportProcessorOptions.cs b/src/OpenTelemetry/BatchExportProcessorOptions.cs index 90abda8abbb..827d90cb5b8 100644 --- a/src/OpenTelemetry/BatchExportProcessorOptions.cs +++ b/src/OpenTelemetry/BatchExportProcessorOptions.cs @@ -14,6 +14,8 @@ // limitations under the License. // +#nullable enable + namespace OpenTelemetry { public class BatchExportProcessorOptions diff --git a/src/OpenTelemetry/ProviderExtensions.cs b/src/OpenTelemetry/ProviderExtensions.cs index c110fa9020b..0ce5752c1e7 100644 --- a/src/OpenTelemetry/ProviderExtensions.cs +++ b/src/OpenTelemetry/ProviderExtensions.cs @@ -14,6 +14,8 @@ // limitations under the License. // +#nullable enable + using System; using OpenTelemetry.Logs; using OpenTelemetry.Metrics; @@ -62,7 +64,7 @@ public static Resource GetDefaultResource(this BaseProvider baseProvider) return builder.Build(); } - internal static IServiceProvider GetServiceProvider(this BaseProvider baseProvider) + internal static IServiceProvider? GetServiceProvider(this BaseProvider baseProvider) { if (baseProvider is TracerProviderSdk tracerProviderSdk) { @@ -76,7 +78,7 @@ internal static IServiceProvider GetServiceProvider(this BaseProvider baseProvid return null; } - internal static Action GetObservableInstrumentCollectCallback(this BaseProvider baseProvider) + internal static Action? GetObservableInstrumentCollectCallback(this BaseProvider baseProvider) { if (baseProvider is MeterProviderSdk meterProviderSdk) { diff --git a/src/OpenTelemetry/ReadOnlyTagCollection.cs b/src/OpenTelemetry/ReadOnlyTagCollection.cs index fdbfeeaa7de..27cdaabbaaf 100644 --- a/src/OpenTelemetry/ReadOnlyTagCollection.cs +++ b/src/OpenTelemetry/ReadOnlyTagCollection.cs @@ -14,7 +14,11 @@ // limitations under the License. // +#nullable enable + +using System; using System.Collections.Generic; +using System.Diagnostics; namespace OpenTelemetry { @@ -28,16 +32,18 @@ public readonly struct ReadOnlyTagCollection private readonly string[] keys; private readonly object[] values; - internal ReadOnlyTagCollection(string[] keys, object[] values) + internal ReadOnlyTagCollection(string[]? keys, object[]? values) { - this.keys = keys; - this.values = values; + this.keys = keys ?? Array.Empty(); + this.values = values ?? Array.Empty(); + + Debug.Assert(this.keys.Length == this.values.Length, "Array length mismatch"); } /// /// Gets the number of tags in the collection. /// - public int Count => this.keys?.Length ?? 0; + public int Count => this.keys.Length; /// /// Returns an enumerator that iterates through the tags. diff --git a/src/OpenTelemetry/Resources/IResourceDetector.cs b/src/OpenTelemetry/Resources/IResourceDetector.cs index a55459807db..df3fdf427d5 100644 --- a/src/OpenTelemetry/Resources/IResourceDetector.cs +++ b/src/OpenTelemetry/Resources/IResourceDetector.cs @@ -14,6 +14,8 @@ // limitations under the License. // +#nullable enable + namespace OpenTelemetry.Resources { /// diff --git a/src/OpenTelemetry/Resources/OtelEnvResourceDetector.cs b/src/OpenTelemetry/Resources/OtelEnvResourceDetector.cs index 06ca1d44875..b0e893618dc 100644 --- a/src/OpenTelemetry/Resources/OtelEnvResourceDetector.cs +++ b/src/OpenTelemetry/Resources/OtelEnvResourceDetector.cs @@ -14,6 +14,8 @@ // limitations under the License. // +#nullable enable + using System.Collections.Generic; using Microsoft.Extensions.Configuration; using OpenTelemetry.Internal; @@ -37,9 +39,9 @@ public Resource Detect() { var resource = Resource.Empty; - if (this.configuration.TryGetStringValue(EnvVarKey, out string envResourceAttributeValue)) + if (this.configuration.TryGetStringValue(EnvVarKey, out string? envResourceAttributeValue)) { - var attributes = ParseResourceAttributes(envResourceAttributeValue); + var attributes = ParseResourceAttributes(envResourceAttributeValue!); resource = new Resource(attributes); } diff --git a/src/OpenTelemetry/Resources/OtelServiceNameEnvVarDetector.cs b/src/OpenTelemetry/Resources/OtelServiceNameEnvVarDetector.cs index 1cca514a026..9b48f113956 100644 --- a/src/OpenTelemetry/Resources/OtelServiceNameEnvVarDetector.cs +++ b/src/OpenTelemetry/Resources/OtelServiceNameEnvVarDetector.cs @@ -14,6 +14,8 @@ // limitations under the License. // +#nullable enable + using System.Collections.Generic; using Microsoft.Extensions.Configuration; using OpenTelemetry.Internal; @@ -35,11 +37,11 @@ public Resource Detect() { var resource = Resource.Empty; - if (this.configuration.TryGetStringValue(EnvVarKey, out string envResourceAttributeValue)) + if (this.configuration.TryGetStringValue(EnvVarKey, out string? envResourceAttributeValue)) { resource = new Resource(new Dictionary { - [ResourceSemanticConventions.AttributeServiceName] = envResourceAttributeValue, + [ResourceSemanticConventions.AttributeServiceName] = envResourceAttributeValue!, }); } diff --git a/src/OpenTelemetry/Resources/Resource.cs b/src/OpenTelemetry/Resources/Resource.cs index ef2f0459879..f6e82e2ffa4 100644 --- a/src/OpenTelemetry/Resources/Resource.cs +++ b/src/OpenTelemetry/Resources/Resource.cs @@ -14,6 +14,8 @@ // limitations under the License. // +#nullable enable + using System; using System.Collections.Generic; using System.Globalization; diff --git a/src/OpenTelemetry/SuppressInstrumentationScope.cs b/src/OpenTelemetry/SuppressInstrumentationScope.cs index 6c155df5c3c..014c0743bdc 100644 --- a/src/OpenTelemetry/SuppressInstrumentationScope.cs +++ b/src/OpenTelemetry/SuppressInstrumentationScope.cs @@ -14,6 +14,8 @@ // limitations under the License. // +#nullable enable + using System; using System.Runtime.CompilerServices; using OpenTelemetry.Context; diff --git a/src/OpenTelemetry/Trace/AlwaysOffSampler.cs b/src/OpenTelemetry/Trace/AlwaysOffSampler.cs index 9615a7de283..30fd0768d00 100644 --- a/src/OpenTelemetry/Trace/AlwaysOffSampler.cs +++ b/src/OpenTelemetry/Trace/AlwaysOffSampler.cs @@ -14,6 +14,8 @@ // limitations under the License. // +#nullable enable + namespace OpenTelemetry.Trace { /// diff --git a/src/OpenTelemetry/Trace/AlwaysOnSampler.cs b/src/OpenTelemetry/Trace/AlwaysOnSampler.cs index aa1edda0037..bee15b682bd 100644 --- a/src/OpenTelemetry/Trace/AlwaysOnSampler.cs +++ b/src/OpenTelemetry/Trace/AlwaysOnSampler.cs @@ -14,6 +14,8 @@ // limitations under the License. // +#nullable enable + namespace OpenTelemetry.Trace { /// diff --git a/src/OpenTelemetry/Trace/BatchActivityExportProcessor.cs b/src/OpenTelemetry/Trace/BatchActivityExportProcessor.cs index be62c8d015c..089b848815f 100644 --- a/src/OpenTelemetry/Trace/BatchActivityExportProcessor.cs +++ b/src/OpenTelemetry/Trace/BatchActivityExportProcessor.cs @@ -14,6 +14,8 @@ // limitations under the License. // +#nullable enable + using System.Diagnostics; namespace OpenTelemetry diff --git a/src/OpenTelemetry/Trace/ExceptionProcessor.cs b/src/OpenTelemetry/Trace/ExceptionProcessor.cs index e8e1e9d6c6c..bbfd09712f1 100644 --- a/src/OpenTelemetry/Trace/ExceptionProcessor.cs +++ b/src/OpenTelemetry/Trace/ExceptionProcessor.cs @@ -14,6 +14,8 @@ // limitations under the License. // +#nullable enable + using System; using System.Diagnostics; using System.Linq.Expressions; @@ -33,7 +35,8 @@ public ExceptionProcessor() try { var flags = BindingFlags.Static | BindingFlags.Public; - var method = typeof(Marshal).GetMethod("GetExceptionPointers", flags, null, new Type[] { }, null); + var method = typeof(Marshal).GetMethod("GetExceptionPointers", flags, null, Type.EmptyTypes, null) + ?? throw new InvalidOperationException("Marshal.GetExceptionPointers method could not be resolved reflectively."); var lambda = Expression.Lambda>(Expression.Call(method)); this.fnGetExceptionPointers = lambda.Compile(); } diff --git a/src/OpenTelemetry/Trace/ParentBasedSampler.cs b/src/OpenTelemetry/Trace/ParentBasedSampler.cs index deb9d0eb3ec..26c5c564173 100644 --- a/src/OpenTelemetry/Trace/ParentBasedSampler.cs +++ b/src/OpenTelemetry/Trace/ParentBasedSampler.cs @@ -14,6 +14,8 @@ // limitations under the License. // +#nullable enable + using System.Diagnostics; using OpenTelemetry.Internal; @@ -81,10 +83,10 @@ public ParentBasedSampler(Sampler rootSampler) /// public ParentBasedSampler( Sampler rootSampler, - Sampler remoteParentSampled = null, - Sampler remoteParentNotSampled = null, - Sampler localParentSampled = null, - Sampler localParentNotSampled = null) + Sampler? remoteParentSampled = null, + Sampler? remoteParentNotSampled = null, + Sampler? localParentSampled = null, + Sampler? localParentNotSampled = null) : this(rootSampler) { this.remoteParentSampled = remoteParentSampled ?? new AlwaysOnSampler(); diff --git a/src/OpenTelemetry/Trace/Sampler.cs b/src/OpenTelemetry/Trace/Sampler.cs index ba66c7e7226..331a090fc6c 100644 --- a/src/OpenTelemetry/Trace/Sampler.cs +++ b/src/OpenTelemetry/Trace/Sampler.cs @@ -13,6 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. // + +#nullable enable + using System.Diagnostics; namespace OpenTelemetry.Trace diff --git a/src/OpenTelemetry/Trace/SamplingDecision.cs b/src/OpenTelemetry/Trace/SamplingDecision.cs index a8f072845d6..514afc909e7 100644 --- a/src/OpenTelemetry/Trace/SamplingDecision.cs +++ b/src/OpenTelemetry/Trace/SamplingDecision.cs @@ -14,6 +14,8 @@ // limitations under the License. // +#nullable enable + namespace OpenTelemetry.Trace { /// diff --git a/src/OpenTelemetry/Trace/SamplingParameters.cs b/src/OpenTelemetry/Trace/SamplingParameters.cs index defa5319b6c..089c1ee63a1 100644 --- a/src/OpenTelemetry/Trace/SamplingParameters.cs +++ b/src/OpenTelemetry/Trace/SamplingParameters.cs @@ -14,6 +14,8 @@ // limitations under the License. // +#nullable enable + using System.Collections.Generic; using System.Diagnostics; @@ -42,15 +44,19 @@ public SamplingParameters( ActivityTraceId traceId, string name, ActivityKind kind, - IEnumerable> tags = null, - IEnumerable links = null) + IEnumerable>? tags = null, + IEnumerable? links = null) { this.ParentContext = parentContext; this.TraceId = traceId; - this.Name = name; this.Kind = kind; this.Tags = tags; this.Links = links; + + // Note: myActivitySource.StartActivity(name: null) is currently + // allowed even though OTel spec says span name is required. See: + // https://github.com/open-telemetry/opentelemetry-dotnet/issues/3802 + this.Name = name ?? string.Empty; } /// @@ -81,11 +87,11 @@ public SamplingParameters( /// Gets the tags to be associated to the span/activity to be created. /// These are the tags provided at the time of Activity creation. /// - public IEnumerable> Tags { get; } + public IEnumerable>? Tags { get; } /// /// Gets the links to be added to the activity to be created. /// - public IEnumerable Links { get; } + public IEnumerable? Links { get; } } } diff --git a/src/OpenTelemetry/Trace/SamplingResult.cs b/src/OpenTelemetry/Trace/SamplingResult.cs index ccdaa5c9d94..fe8ca36184a 100644 --- a/src/OpenTelemetry/Trace/SamplingResult.cs +++ b/src/OpenTelemetry/Trace/SamplingResult.cs @@ -14,6 +14,9 @@ // limitations under the License. // +#nullable enable + +using System; using System.Collections.Generic; using System.Linq; @@ -22,17 +25,15 @@ namespace OpenTelemetry.Trace /// /// Sampling result. /// - public readonly struct SamplingResult : System.IEquatable + public readonly struct SamplingResult : IEquatable { /// /// Initializes a new instance of the struct. /// /// indicates whether an activity object is recorded and sampled. public SamplingResult(SamplingDecision decision) + : this(decision, attributes: null, traceStateString: null) { - this.Decision = decision; - this.Attributes = Enumerable.Empty>(); - this.TraceStateString = null; } /// @@ -40,10 +41,8 @@ public SamplingResult(SamplingDecision decision) /// /// True if sampled, false otherwise. public SamplingResult(bool isSampled) + : this(decision: isSampled ? SamplingDecision.RecordAndSample : SamplingDecision.Drop, attributes: null, traceStateString: null) { - this.Decision = isSampled ? SamplingDecision.RecordAndSample : SamplingDecision.Drop; - this.Attributes = Enumerable.Empty>(); - this.TraceStateString = null; } /// @@ -53,14 +52,8 @@ public SamplingResult(bool isSampled) /// Attributes associated with the sampling decision. Attributes list passed to /// this method must be immutable. Mutations of the collection and/or attribute values may lead to unexpected behavior. public SamplingResult(SamplingDecision decision, IEnumerable> attributes) + : this(decision, attributes, traceStateString: null) { - this.Decision = decision; - - // Note: Decision object takes ownership of the collection. - // Current implementation has no means to ensure the collection will not be modified by the caller. - // If this behavior will be abused we must switch to cloning of the collection. - this.Attributes = attributes; - this.TraceStateString = null; } /// @@ -69,10 +62,8 @@ public SamplingResult(SamplingDecision decision, IEnumerableindicates whether an activity object is recorded and sampled. /// traceStateString associated with the created Activity. public SamplingResult(SamplingDecision decision, string traceStateString) + : this(decision, attributes: null, traceStateString) { - this.Decision = decision; - this.Attributes = Enumerable.Empty>(); - this.TraceStateString = traceStateString; } /// @@ -82,14 +73,14 @@ public SamplingResult(SamplingDecision decision, string traceStateString) /// attributes associated with the sampling decision. Attributes list passed to /// this method must be immutable. Mutations of the collection and/or attribute values may lead to unexpected behavior. /// traceStateString associated with the created Activity. - public SamplingResult(SamplingDecision decision, IEnumerable> attributes, string traceStateString) + public SamplingResult(SamplingDecision decision, IEnumerable>? attributes, string? traceStateString) { this.Decision = decision; // Note: Decision object takes ownership of the collection. // Current implementation has no means to ensure the collection will not be modified by the caller. // If this behavior will be abused we must switch to cloning of the collection. - this.Attributes = attributes; + this.Attributes = attributes ?? Enumerable.Empty>(); this.TraceStateString = traceStateString; } @@ -107,7 +98,7 @@ public SamplingResult(SamplingDecision decision, IEnumerable /// Gets the tracestate. /// - public string TraceStateString { get; } + public string? TraceStateString { get; } /// /// Compare two for equality. @@ -124,16 +115,8 @@ public SamplingResult(SamplingDecision decision, IEnumerable !decision1.Equals(decision2); /// - public override bool Equals(object obj) - { - if (obj is not SamplingResult) - { - return false; - } - - var that = (SamplingResult)obj; - return this.Decision == that.Decision && this.Attributes == that.Attributes && this.TraceStateString == that.TraceStateString; - } + public override bool Equals(object? obj) + => obj is SamplingResult other && this.Equals(other); /// public override int GetHashCode() @@ -148,7 +131,9 @@ public override int GetHashCode() /// public bool Equals(SamplingResult other) { - return this.Decision == other.Decision && this.Attributes.SequenceEqual(other.Attributes) && this.TraceStateString == other.TraceStateString; + return this.Decision == other.Decision + && this.Attributes.SequenceEqual(other.Attributes) + && this.TraceStateString == other.TraceStateString; } } } diff --git a/src/OpenTelemetry/Trace/SimpleActivityExportProcessor.cs b/src/OpenTelemetry/Trace/SimpleActivityExportProcessor.cs index ac9a4a20c7f..7a9215f2156 100644 --- a/src/OpenTelemetry/Trace/SimpleActivityExportProcessor.cs +++ b/src/OpenTelemetry/Trace/SimpleActivityExportProcessor.cs @@ -14,6 +14,8 @@ // limitations under the License. // +#nullable enable + using System.Diagnostics; namespace OpenTelemetry diff --git a/src/OpenTelemetry/Trace/TraceIdRatioBasedSampler.cs b/src/OpenTelemetry/Trace/TraceIdRatioBasedSampler.cs index d1c9d364a85..20e00b5b66d 100644 --- a/src/OpenTelemetry/Trace/TraceIdRatioBasedSampler.cs +++ b/src/OpenTelemetry/Trace/TraceIdRatioBasedSampler.cs @@ -14,6 +14,8 @@ // limitations under the License. // +#nullable enable + using System; using System.Globalization; using OpenTelemetry.Internal;