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

Fix prerelease reference and bump OTel to 1.4.0-beta.3 #774

Merged
merged 6 commits into from
Nov 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
2 changes: 1 addition & 1 deletion build/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<MicrosoftPublicApiAnalyzersPkgVer>[3.3.3]</MicrosoftPublicApiAnalyzersPkgVer>
<MicrosoftSourceLinkGitHubPkgVer>[1.1.1,2.0)</MicrosoftSourceLinkGitHubPkgVer>
<OpenTelemetryCoreLatestVersion>[1.3.1,2.0)</OpenTelemetryCoreLatestVersion>
<OpenTelemetryCoreLatestPrereleaseVersion>[1.4.0-beta.2]</OpenTelemetryCoreLatestPrereleaseVersion>
<OpenTelemetryCoreLatestPrereleaseVersion>[1.4.0-beta.3]</OpenTelemetryCoreLatestPrereleaseVersion>
<StackExchangeRedisPkgVer>[2.1.58,3.0)</StackExchangeRedisPkgVer>
<StyleCopAnalyzersPkgVer>[1.2.0-beta.435,2.0)</StyleCopAnalyzersPkgVer>
</PropertyGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/OpenTelemetry.Exporter.Geneva/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

* Update OpenTelemetry to 1.4.0-beta.3 ([#774](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/774))

## 1.4.0-beta.4

Released 2022-Oct-28
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ public override ExportResult Export(in Batch<Metric> batch)
var count = Convert.ToUInt32(metricPoint.GetHistogramCount());
MetricData min = ulongZero;
MetricData max = ulongZero;
if (metricPoint.HasMinMax())
if (metricPoint.TryGetHistogramMinMaxValues(out var minValue, out var maxValue))
{
min = new MetricData { UInt64Value = Convert.ToUInt64(metricPoint.GetHistogramMin()) };
max = new MetricData { UInt64Value = Convert.ToUInt64(metricPoint.GetHistogramMax()) };
min = new MetricData { UInt64Value = Convert.ToUInt64(minValue) };
max = new MetricData { UInt64Value = Convert.ToUInt64(maxValue) };
}

var bodyLength = this.SerializeHistogramMetric(
Expand Down
2 changes: 2 additions & 0 deletions src/OpenTelemetry.Extensions/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

* Update OpenTelemetry to 1.4.0-beta.3 ([#774](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/774))

## 1.0.0-beta.3

Released 2022-Nov-09
Expand Down
2 changes: 2 additions & 0 deletions src/OpenTelemetry.Instrumentation.Process/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

* Update OpenTelemetry API to 1.4.0-beta.3 ([#774](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/774))

## 1.0.0-alpha.1

Released 2022-Nov-14
Expand Down
2 changes: 1 addition & 1 deletion src/OpenTelemetry.Instrumentation.Runtime/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Unreleased

* Update OTel API version to `1.4.0-beta.2`.
* Update OpenTelemetry API to 1.4.0-beta.3 ([#774](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/774))

* Change ObservableGauge to ObservableUpDownCounter for the below metrics (which
better fit UpDownCounter semantics as they are additive.)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,10 @@ private MetricPoint GenerateHistogramMetricItemWith3Dimensions(out MetricData su
min = new MetricData { UInt64Value = 0 };
max = new MetricData { UInt64Value = 0 };

if (metricPoint.HasMinMax())
if (metricPoint.TryGetHistogramMinMaxValues(out var minValue, out var maxValue))
{
min = new MetricData { UInt64Value = Convert.ToUInt64(metricPoint.GetHistogramMin()) };
max = new MetricData { UInt64Value = Convert.ToUInt64(metricPoint.GetHistogramMax()) };
min = new MetricData { UInt64Value = Convert.ToUInt64(minValue) };
max = new MetricData { UInt64Value = Convert.ToUInt64(maxValue) };
}

return metricPoint;
Expand Down Expand Up @@ -379,10 +379,10 @@ private MetricPoint GenerateHistogramMetricItemWith4Dimensions(out MetricData su
min = new MetricData { UInt64Value = 0 };
max = new MetricData { UInt64Value = 0 };

if (metricPoint.HasMinMax())
if (metricPoint.TryGetHistogramMinMaxValues(out var minValue, out var maxValue))
{
min = new MetricData { UInt64Value = Convert.ToUInt64(metricPoint.GetHistogramMin()) };
max = new MetricData { UInt64Value = Convert.ToUInt64(metricPoint.GetHistogramMax()) };
min = new MetricData { UInt64Value = Convert.ToUInt64(minValue) };
max = new MetricData { UInt64Value = Convert.ToUInt64(maxValue) };
}

return metricPoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -730,18 +730,13 @@ private void CheckSerializationForSingleMetricPoint(Metric metric, GenevaMetricE
var sum = new MetricData { UInt64Value = Convert.ToUInt64(metricPoint.GetHistogramSum()) };
var count = Convert.ToUInt32(metricPoint.GetHistogramCount());

ulong minValue = 0;
ulong maxValue = 0;
var min = new MetricData { UInt64Value = 0 };
var max = new MetricData { UInt64Value = 0 };

if (metricPoint.HasMinMax())
if (metricPoint.TryGetHistogramMinMaxValues(out var minValue, out var maxValue))
{
minValue = Convert.ToUInt64(metricPoint.GetHistogramMin());
maxValue = Convert.ToUInt64(metricPoint.GetHistogramMax());

min = new MetricData { UInt64Value = minValue };
max = new MetricData { UInt64Value = maxValue };
min = new MetricData { UInt64Value = Convert.ToUInt64(minValue) };
max = new MetricData { UInt64Value = Convert.ToUInt64(maxValue) };
}

var bodyLength = exporter.SerializeHistogramMetric(
Expand Down