Skip to content

Commit

Permalink
Fix prerelease reference and bump OTel to 1.4.0-beta.3 (#774)
Browse files Browse the repository at this point in the history
* Fix prerelease reference and bump OTel to 1.4.0-beta.3
  • Loading branch information
Kielek authored Nov 17, 2022
1 parent 23dbc39 commit 108843c
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 19 deletions.
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

0 comments on commit 108843c

Please sign in to comment.