Remove unused files (#2637)

This commit is contained in:
Cijo Thomas 2021-11-17 19:53:03 -08:00 committed by GitHub
parent 98d32c163f
commit 1be29c85cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 3 additions and 467 deletions

View File

@ -21,7 +21,6 @@ using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using Google.Protobuf;
using Google.Protobuf.Collections;
using OpenTelemetry.Metrics;
using OtlpCollector = Opentelemetry.Proto.Collector.Metrics.V1;
@ -285,6 +284,7 @@ namespace OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation
}
}
/*
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static OtlpMetrics.Exemplar ToOtlpExemplar(this IExemplar exemplar)
{
@ -330,6 +330,7 @@ namespace OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation
return otlpExemplar;
}
*/
private static Action<RepeatedField<OtlpMetrics.Metric>, int> CreateRepeatedFieldOfMetricSetCountAction()
{

View File

@ -29,9 +29,6 @@ OpenTelemetry.Metrics.BatchMetricPoint.Enumerator.Enumerator() -> void
OpenTelemetry.Metrics.BatchMetricPoint.Enumerator.MoveNext() -> bool
OpenTelemetry.Metrics.BatchMetricPoint.Enumerator.Reset() -> void
OpenTelemetry.Metrics.BatchMetricPoint.GetEnumerator() -> OpenTelemetry.Metrics.BatchMetricPoint.Enumerator
OpenTelemetry.Metrics.DataValue
OpenTelemetry.Metrics.DataValue.DataValue() -> void
OpenTelemetry.Metrics.DataValue.Value.get -> object
OpenTelemetry.Metrics.ExportModes
OpenTelemetry.Metrics.ExportModes.Pull = 2 -> OpenTelemetry.Metrics.ExportModes
OpenTelemetry.Metrics.ExportModes.Push = 1 -> OpenTelemetry.Metrics.ExportModes
@ -42,16 +39,6 @@ OpenTelemetry.Metrics.HistogramConfiguration
OpenTelemetry.Metrics.HistogramConfiguration.BucketBounds.get -> double[]
OpenTelemetry.Metrics.HistogramConfiguration.BucketBounds.set -> void
OpenTelemetry.Metrics.HistogramConfiguration.HistogramConfiguration() -> void
OpenTelemetry.Metrics.IDataPoint
OpenTelemetry.Metrics.IDataPoint.Tags.get -> System.Collections.Generic.KeyValuePair<string, object>[]
OpenTelemetry.Metrics.IDataPoint.Timestamp.get -> System.DateTimeOffset
OpenTelemetry.Metrics.IDataValue
OpenTelemetry.Metrics.IDataValue.Value.get -> object
OpenTelemetry.Metrics.IExemplar
OpenTelemetry.Metrics.IExemplar.FilteredTags.get -> System.Collections.Generic.KeyValuePair<string, object>[]
OpenTelemetry.Metrics.IExemplar.SpanId.get -> System.Diagnostics.ActivitySpanId
OpenTelemetry.Metrics.IExemplar.Timestamp.get -> System.DateTimeOffset
OpenTelemetry.Metrics.IExemplar.TraceId.get -> System.Diagnostics.ActivityTraceId
OpenTelemetry.Metrics.IPullMetricExporter
OpenTelemetry.Metrics.IPullMetricExporter.Collect.get -> System.Func<int, bool>
OpenTelemetry.Metrics.IPullMetricExporter.Collect.set -> void
@ -142,4 +129,4 @@ virtual OpenTelemetry.Metrics.MetricReader.Dispose(bool disposing) -> void
virtual OpenTelemetry.Metrics.MetricReader.OnCollect(int timeoutMilliseconds) -> bool
virtual OpenTelemetry.Metrics.MetricReader.OnShutdown(int timeoutMilliseconds) -> bool
virtual OpenTelemetry.Metrics.MetricStreamConfiguration.Aggregation.get -> OpenTelemetry.Metrics.Aggregation
virtual OpenTelemetry.Metrics.MetricStreamConfiguration.Aggregation.set -> void
virtual OpenTelemetry.Metrics.MetricStreamConfiguration.Aggregation.set -> void

View File

@ -29,9 +29,6 @@ OpenTelemetry.Metrics.BatchMetricPoint.Enumerator.Enumerator() -> void
OpenTelemetry.Metrics.BatchMetricPoint.Enumerator.MoveNext() -> bool
OpenTelemetry.Metrics.BatchMetricPoint.Enumerator.Reset() -> void
OpenTelemetry.Metrics.BatchMetricPoint.GetEnumerator() -> OpenTelemetry.Metrics.BatchMetricPoint.Enumerator
OpenTelemetry.Metrics.DataValue
OpenTelemetry.Metrics.DataValue.DataValue() -> void
OpenTelemetry.Metrics.DataValue.Value.get -> object
OpenTelemetry.Metrics.ExportModes
OpenTelemetry.Metrics.ExportModes.Pull = 2 -> OpenTelemetry.Metrics.ExportModes
OpenTelemetry.Metrics.ExportModes.Push = 1 -> OpenTelemetry.Metrics.ExportModes
@ -42,16 +39,6 @@ OpenTelemetry.Metrics.HistogramConfiguration
OpenTelemetry.Metrics.HistogramConfiguration.BucketBounds.get -> double[]
OpenTelemetry.Metrics.HistogramConfiguration.BucketBounds.set -> void
OpenTelemetry.Metrics.HistogramConfiguration.HistogramConfiguration() -> void
OpenTelemetry.Metrics.IDataPoint
OpenTelemetry.Metrics.IDataPoint.Tags.get -> System.Collections.Generic.KeyValuePair<string, object>[]
OpenTelemetry.Metrics.IDataPoint.Timestamp.get -> System.DateTimeOffset
OpenTelemetry.Metrics.IDataValue
OpenTelemetry.Metrics.IDataValue.Value.get -> object
OpenTelemetry.Metrics.IExemplar
OpenTelemetry.Metrics.IExemplar.FilteredTags.get -> System.Collections.Generic.KeyValuePair<string, object>[]
OpenTelemetry.Metrics.IExemplar.SpanId.get -> System.Diagnostics.ActivitySpanId
OpenTelemetry.Metrics.IExemplar.Timestamp.get -> System.DateTimeOffset
OpenTelemetry.Metrics.IExemplar.TraceId.get -> System.Diagnostics.ActivityTraceId
OpenTelemetry.Metrics.IPullMetricExporter
OpenTelemetry.Metrics.IPullMetricExporter.Collect.get -> System.Func<int, bool>
OpenTelemetry.Metrics.IPullMetricExporter.Collect.set -> void

View File

@ -1,70 +0,0 @@
// <copyright file="DataPoint.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
using System;
using System.Collections.Generic;
namespace OpenTelemetry.Metrics
{
internal readonly struct DataPoint : IDataPoint
{
private static readonly KeyValuePair<string, object>[] EmptyTag = new KeyValuePair<string, object>[0];
private readonly IDataValue value;
internal DataPoint(DateTimeOffset timestamp, long value, KeyValuePair<string, object>[] tags)
{
this.Timestamp = timestamp;
this.Tags = tags;
this.value = new DataValue<long>(value);
}
internal DataPoint(DateTimeOffset timestamp, double value, KeyValuePair<string, object>[] tags)
{
this.Timestamp = timestamp;
this.Tags = tags;
this.value = new DataValue<double>(value);
}
internal DataPoint(DateTimeOffset timestamp, IDataValue value, KeyValuePair<string, object>[] tags)
{
this.Timestamp = timestamp;
this.Tags = tags;
this.value = value;
}
internal DataPoint(DateTimeOffset timestamp, long value)
: this(timestamp, value, DataPoint.EmptyTag)
{
}
internal DataPoint(DateTimeOffset timestamp, double value)
: this(timestamp, value, DataPoint.EmptyTag)
{
}
internal DataPoint(DateTimeOffset timestamp, IDataValue value)
: this(timestamp, value, DataPoint.EmptyTag)
{
}
public DateTimeOffset Timestamp { get; }
public readonly KeyValuePair<string, object>[] Tags { get; }
public object Value => this.value.Value;
}
}

View File

@ -1,59 +0,0 @@
// <copyright file="DataPoint{T}.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
using System;
using System.Collections.Generic;
namespace OpenTelemetry.Metrics
{
internal readonly struct DataPoint<T> : IDataPoint
where T : struct
{
private static readonly KeyValuePair<string, object>[] EmptyTag = new KeyValuePair<string, object>[0];
private readonly IDataValue value;
internal DataPoint(DateTimeOffset timestamp, T value, KeyValuePair<string, object>[] tags)
{
this.Timestamp = timestamp;
this.Tags = tags;
this.value = new DataValue<T>(value);
}
internal DataPoint(DateTimeOffset timestamp, IDataValue value, KeyValuePair<string, object>[] tags)
{
this.Timestamp = timestamp;
this.Tags = tags;
this.value = value;
}
internal DataPoint(DateTimeOffset timestamp, T value)
: this(timestamp, value, DataPoint<T>.EmptyTag)
{
}
internal DataPoint(DateTimeOffset timestamp, IDataValue value)
: this(timestamp, value, DataPoint<T>.EmptyTag)
{
}
public DateTimeOffset Timestamp { get; }
public readonly KeyValuePair<string, object>[] Tags { get; }
public object Value => this.value.Value;
}
}

View File

@ -1,46 +0,0 @@
// <copyright file="DataValue.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
namespace OpenTelemetry.Metrics
{
public readonly struct DataValue : IDataValue
{
private readonly IDataValue value;
internal DataValue(int value)
{
// Promote to long
this.value = new DataValue<long>(value);
}
internal DataValue(long value)
{
this.value = new DataValue<long>(value);
}
internal DataValue(double value)
{
this.value = new DataValue<double>(value);
}
internal DataValue(IDataValue value)
{
this.value = value;
}
public object Value => this.value.Value;
}
}

View File

@ -1,31 +0,0 @@
// <copyright file="DataValue{T}.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
namespace OpenTelemetry.Metrics
{
internal readonly struct DataValue<T> : IDataValue
where T : struct
{
private readonly T value;
internal DataValue(T value)
{
this.value = value;
}
public object Value => (object)this.value;
}
}

View File

@ -1,81 +0,0 @@
// <copyright file="Exemplar.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace OpenTelemetry.Metrics
{
internal readonly struct Exemplar : IExemplar
{
private static readonly KeyValuePair<string, object>[] EmptyTag = new KeyValuePair<string, object>[0];
private readonly IDataValue value;
internal Exemplar(DateTimeOffset timestamp, long value, ActivityTraceId traceId, ActivitySpanId spanId, KeyValuePair<string, object>[] filteredTags)
{
this.Timestamp = timestamp;
this.FilteredTags = filteredTags;
this.SpanId = spanId;
this.TraceId = traceId;
this.value = new DataValue<long>(value);
}
internal Exemplar(DateTimeOffset timestamp, double value, ActivityTraceId traceId, ActivitySpanId spanId, KeyValuePair<string, object>[] filteredTags)
{
this.Timestamp = timestamp;
this.FilteredTags = filteredTags;
this.SpanId = spanId;
this.TraceId = traceId;
this.value = new DataValue<double>(value);
}
internal Exemplar(DateTimeOffset timestamp, IDataValue value, ActivityTraceId traceId, ActivitySpanId spanId, KeyValuePair<string, object>[] filteredTags)
{
this.Timestamp = timestamp;
this.FilteredTags = filteredTags;
this.SpanId = spanId;
this.TraceId = traceId;
this.value = value;
}
internal Exemplar(DateTimeOffset timestamp, long value)
: this(timestamp, value, default, default, Exemplar.EmptyTag)
{
}
internal Exemplar(DateTimeOffset timestamp, double value)
: this(timestamp, value, default, default, Exemplar.EmptyTag)
{
}
internal Exemplar(DateTimeOffset timestamp, IDataValue value)
: this(timestamp, value, default, default, Exemplar.EmptyTag)
{
}
public DateTimeOffset Timestamp { get; }
public readonly KeyValuePair<string, object>[] FilteredTags { get; }
public readonly ActivityTraceId TraceId { get; }
public readonly ActivitySpanId SpanId { get; }
public object Value => this.value.Value;
}
}

View File

@ -1,68 +0,0 @@
// <copyright file="Exemplar{T}.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace OpenTelemetry.Metrics
{
internal readonly struct Exemplar<T> : IExemplar
where T : struct
{
private static readonly KeyValuePair<string, object>[] EmptyTag = new KeyValuePair<string, object>[0];
private readonly IDataValue value;
internal Exemplar(DateTimeOffset timestamp, T value, ActivityTraceId traceId, ActivitySpanId spanId, KeyValuePair<string, object>[] filteredTags)
{
this.Timestamp = timestamp;
this.FilteredTags = filteredTags;
this.SpanId = spanId;
this.TraceId = traceId;
this.value = new DataValue<T>(value);
}
internal Exemplar(DateTimeOffset timestamp, IDataValue value, ActivityTraceId traceId, ActivitySpanId spanId, KeyValuePair<string, object>[] filteredTags)
{
this.Timestamp = timestamp;
this.FilteredTags = filteredTags;
this.SpanId = spanId;
this.TraceId = traceId;
this.value = value;
}
internal Exemplar(DateTimeOffset timestamp, T value)
: this(timestamp, value, default, default, Exemplar<T>.EmptyTag)
{
}
internal Exemplar(DateTimeOffset timestamp, IDataValue value)
: this(timestamp, value, default, default, Exemplar<T>.EmptyTag)
{
}
public DateTimeOffset Timestamp { get; }
public readonly KeyValuePair<string, object>[] FilteredTags { get; }
public readonly ActivityTraceId TraceId { get; }
public readonly ActivitySpanId SpanId { get; }
public object Value => this.value.Value;
}
}

View File

@ -1,28 +0,0 @@
// <copyright file="IDataPoint.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
using System;
using System.Collections.Generic;
namespace OpenTelemetry.Metrics
{
public interface IDataPoint : IDataValue
{
DateTimeOffset Timestamp { get; }
KeyValuePair<string, object>[] Tags { get; }
}
}

View File

@ -1,23 +0,0 @@
// <copyright file="IDataValue.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
namespace OpenTelemetry.Metrics
{
public interface IDataValue
{
object Value { get; }
}
}

View File

@ -1,33 +0,0 @@
// <copyright file="IExemplar.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace OpenTelemetry.Metrics
{
public interface IExemplar : IDataValue
{
DateTimeOffset Timestamp { get; }
KeyValuePair<string, object>[] FilteredTags { get; }
ActivityTraceId TraceId { get; }
ActivitySpanId SpanId { get; }
}
}