Skip to content

Commit

Permalink
[Exporter.Geneva] Add changelog for OTLP protobuf metric exporter. (#…
Browse files Browse the repository at this point in the history
…1678)

Co-authored-by: Reiley Yang <reyang@microsoft.com>
  • Loading branch information
vishweshbankwar and reyang authored Apr 23, 2024
1 parent 10ff408 commit 8cce1c7
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
14 changes: 11 additions & 3 deletions src/OpenTelemetry.Exporter.Geneva/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@

## Unreleased

* Native AOT compatibility.
([#1666](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1666))

* Fix a bug in `GenevaMetricExporter` where the `MetricEtwDataTransport` singleton
is disposed.
([#1537](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1537))

* Update OpenTelemetry SDK version to `1.8.1`.
([#1668](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1668))

* Add OTLP protobuf encoding support for metric exporter in Windows
environment. Use `PrivatePreviewEnableOtlpProtobufEncoding=true` in the
connection string to opt-in.
([#1596](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1596),
[#1626](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1626),
[#1629](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1629),
[#1634](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1634))

* Native AOT compatibility.
([#1666](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1666))

## 1.7.0

Released 2023-Dec-11
Expand Down
15 changes: 15 additions & 0 deletions src/OpenTelemetry.Exporter.Geneva/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,21 @@ On Linux provide an `Endpoint` in addition to the `Account` and `Namespace`.
For example:
`Endpoint=unix:{UDS Path};Account={MetricAccount};Namespace={MetricNamespace}`.

Set `PrivatePreviewEnableOtlpProtobufEncoding=true` to opt-in to the
experimental feature for changing the underlying serialization format to binary
protobuf following the schema defined in [OTLP
specification](https://github.com/open-telemetry/opentelemetry-proto/blob/v1.1.0/opentelemetry/proto/metrics/v1/metrics.proto).

> [!NOTE]
> `PrivatePreviewEnableOtlpProtobufEncoding` is currently
> only supported in Windows environment. Exporting
> [Exemplar](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar)
> and
> [ExponentialHistogram](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#exponentialhistogram)
> are not supported for now.
> ([#1685](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/issues/1685),
> [#1378](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/issues/1378)).
#### `MetricExportIntervalMilliseconds` (optional)

Set the exporter's periodic time interval to export Metrics. The default value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ private void EmitMetrics(string attempt)
[InlineData(false, false)]
[InlineData(true, true)]
[InlineData(false, true)]
public void DisableMetricNameValidationTest(bool disableMetricNameValidation, bool enableOtlpProtobufexporter)
public void DisableMetricNameValidationTest(bool disableMetricNameValidation, bool enableOtlpProtobufEncoding)
{
var instrumentNameRegexProperty = GenevaMetricExporter.GetOpenTelemetryInstrumentNameRegexProperty();
var initialInstrumentNameRegexValue = instrumentNameRegexProperty.GetValue(null);
Expand All @@ -303,12 +303,18 @@ public void DisableMetricNameValidationTest(bool disableMetricNameValidation, bo
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
options.ConnectionString = $"Account=OTelMonitoringAccount;Namespace=OTelMetricNamespace;DisableMetricNameValidation={disableMetricNameValidation};PrivatePreviewOtlpProtobufMetricExporter={enableOtlpProtobufexporter}";
options.ConnectionString = $"Account=OTelMonitoringAccount;Namespace=OTelMetricNamespace;DisableMetricNameValidation={disableMetricNameValidation}";

if (enableOtlpProtobufEncoding)
{
options.ConnectionString += $";PrivatePreviewEnableOtlpProtobufEncoding={enableOtlpProtobufEncoding}";
}
}
else
{
// TODO: extend test for enableOtlpProtobufEncoding to linux when the support is added.
var path = GenerateTempFilePath();
options.ConnectionString = $"Endpoint=unix:{path};Account=OTelMonitoringAccount;Namespace=OTelMetricNamespace;DisableMetricNameValidation={disableMetricNameValidation};PrivatePreviewOtlpProtobufMetricExporter={enableOtlpProtobufexporter}";
options.ConnectionString = $"Endpoint=unix:{path};Account=OTelMonitoringAccount;Namespace=OTelMetricNamespace;DisableMetricNameValidation={disableMetricNameValidation}";

var endpoint = new UnixDomainSocketEndPoint(path);
server = new Socket(AddressFamily.Unix, SocketType.Stream, ProtocolType.IP);
Expand Down

0 comments on commit 8cce1c7

Please sign in to comment.