From 36e48ffc0dad5fe7e52fd71370e878cdb3ff312a Mon Sep 17 00:00:00 2001 From: Vishwesh Bankwar Date: Wed, 7 Jun 2023 08:16:14 -0700 Subject: [PATCH 01/11] Move extension from logs to main otlp package --- .../AspNetCore/Examples.AspNetCore.csproj | 1 - examples/Console/Examples.Console.csproj | 1 - .../OtlpLogExporterHelperExtensions.cs | 82 +++++++++++++++++++ ...xporter.OpenTelemetryProtocol.Tests.csproj | 1 - 4 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpLogExporterHelperExtensions.cs diff --git a/examples/AspNetCore/Examples.AspNetCore.csproj b/examples/AspNetCore/Examples.AspNetCore.csproj index 15bfde25865..fe6b61f8962 100644 --- a/examples/AspNetCore/Examples.AspNetCore.csproj +++ b/examples/AspNetCore/Examples.AspNetCore.csproj @@ -13,7 +13,6 @@ - diff --git a/examples/Console/Examples.Console.csproj b/examples/Console/Examples.Console.csproj index 032b1a7220b..02438fb885e 100644 --- a/examples/Console/Examples.Console.csproj +++ b/examples/Console/Examples.Console.csproj @@ -37,6 +37,5 @@ - diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpLogExporterHelperExtensions.cs b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpLogExporterHelperExtensions.cs new file mode 100644 index 00000000000..b57ed1f8c16 --- /dev/null +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpLogExporterHelperExtensions.cs @@ -0,0 +1,82 @@ +// +// 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. +// + +using System.Diagnostics; +using OpenTelemetry.Exporter; + +namespace OpenTelemetry.Logs +{ + /// + /// Extension methods to simplify registering of the OpenTelemetry Protocol (OTLP) exporter. + /// + public static class OtlpLogExporterHelperExtensions + { + /// + /// Adds OTLP Exporter as a configuration to the OpenTelemetry ILoggingBuilder. + /// + /// + /// options to use. + /// The instance of to chain the calls. + public static OpenTelemetryLoggerOptions AddOtlpExporter(this OpenTelemetryLoggerOptions loggerOptions) + => AddOtlpExporterInternal(loggerOptions, configure: null); + + /// + /// Adds OTLP Exporter as a configuration to the OpenTelemetry ILoggingBuilder. + /// + /// options to use. + /// Callback action for configuring . + /// The instance of to chain the calls. + public static OpenTelemetryLoggerOptions AddOtlpExporter( + this OpenTelemetryLoggerOptions loggerOptions, + Action configure) + => AddOtlpExporterInternal(loggerOptions, configure); + + private static OpenTelemetryLoggerOptions AddOtlpExporterInternal( + OpenTelemetryLoggerOptions loggerOptions, + Action configure) + { + var exporterOptions = new OtlpExporterOptions(); + + // TODO: We are using span/activity batch environment variable keys + // here when we should be using the ones for logs. + var defaultBatchOptions = exporterOptions.BatchExportProcessorOptions; + + Debug.Assert(defaultBatchOptions != null, "defaultBatchOptions was null"); + + configure?.Invoke(exporterOptions); + + var otlpExporter = new OtlpLogExporter(exporterOptions); + + if (exporterOptions.ExportProcessorType == ExportProcessorType.Simple) + { + loggerOptions.AddProcessor(new SimpleLogRecordExportProcessor(otlpExporter)); + } + else + { + var batchOptions = exporterOptions.BatchExportProcessorOptions ?? defaultBatchOptions; + + loggerOptions.AddProcessor(new BatchLogRecordExportProcessor( + otlpExporter, + batchOptions.MaxQueueSize, + batchOptions.ScheduledDelayMilliseconds, + batchOptions.ExporterTimeoutMilliseconds, + batchOptions.MaxExportBatchSize)); + } + + return loggerOptions; + } + } +} diff --git a/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj b/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj index 73d0c08cf4f..6949715aac0 100644 --- a/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj +++ b/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj @@ -36,7 +36,6 @@ - From 6bdd9398ba1c85ccbca20a2d7338dddf921c44cf Mon Sep 17 00:00:00 2001 From: Vishwesh Bankwar Date: Wed, 7 Jun 2023 08:21:19 -0700 Subject: [PATCH 02/11] public API --- .../.publicApi/net462/PublicAPI.Unshipped.txt | 3 +++ .../.publicApi/net6.0/PublicAPI.Unshipped.txt | 3 +++ .../.publicApi/netstandard2.0/PublicAPI.Unshipped.txt | 3 +++ .../.publicApi/netstandard2.1/PublicAPI.Unshipped.txt | 3 +++ 4 files changed, 12 insertions(+) diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/net462/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/net462/PublicAPI.Unshipped.txt index e69de29bb2d..e3204a2b2b9 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/net462/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/net462/PublicAPI.Unshipped.txt @@ -0,0 +1,3 @@ +OpenTelemetry.Logs.OtlpLogExporterHelperExtensions +static OpenTelemetry.Logs.OtlpLogExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions +static OpenTelemetry.Logs.OtlpLogExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions, System.Action configure) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions \ No newline at end of file diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/net6.0/PublicAPI.Unshipped.txt index e69de29bb2d..e3204a2b2b9 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/net6.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/net6.0/PublicAPI.Unshipped.txt @@ -0,0 +1,3 @@ +OpenTelemetry.Logs.OtlpLogExporterHelperExtensions +static OpenTelemetry.Logs.OtlpLogExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions +static OpenTelemetry.Logs.OtlpLogExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions, System.Action configure) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions \ No newline at end of file diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt index e69de29bb2d..e3204a2b2b9 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt @@ -0,0 +1,3 @@ +OpenTelemetry.Logs.OtlpLogExporterHelperExtensions +static OpenTelemetry.Logs.OtlpLogExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions +static OpenTelemetry.Logs.OtlpLogExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions, System.Action configure) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions \ No newline at end of file diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt index e69de29bb2d..e3204a2b2b9 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt @@ -0,0 +1,3 @@ +OpenTelemetry.Logs.OtlpLogExporterHelperExtensions +static OpenTelemetry.Logs.OtlpLogExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions +static OpenTelemetry.Logs.OtlpLogExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions, System.Action configure) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions \ No newline at end of file From f3bae7079fb962c3f0720969b186e6bb30e8043b Mon Sep 17 00:00:00 2001 From: Vishwesh Bankwar Date: Wed, 7 Jun 2023 16:53:34 -0700 Subject: [PATCH 03/11] move changelog --- .../CHANGELOG.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md index 5104c3aa90f..4f1321449e4 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md @@ -19,6 +19,28 @@ Released 2023-May-25 This also reintroduces the `System.Reflection.Emit.Lightweight` dependency. ([#4407](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4407)) +* The `OpenTelemetryLoggerOptions.AddOtlpExporter` extension no longer + automatically sets `OpenTelemetryLoggerOptions.ParseStateValues` to `true`. + The OpenTelemetry SDK now automatically sets `Attributes` (aka `StateValues`) + for the common cases where `ParseStateValues` was previously required. + `ParseStateValues` can be set to `true` manually by users to enable parsing of + custom states which do not implement `IReadOnlyList` / `IEnumerable` + interfaces. + ([#4334](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4334)) + +* Updated to use the new `LogRecord.Attributes` field as `LogRecord.StateValues` + is now marked obsolete. There is no impact to transmitted data (`StateValues` + and `Attributes` are equivalent). + ([#4334](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4334)) + +* Fixed issue where the + [observed time](https://github.com/open-telemetry/opentelemetry-proto/blob/395c8422fe90080314c7d9b4114d701a0c049e1f/opentelemetry/proto/logs/v1/logs.proto#L138) + field of the OTLP log record was not set. It is now correctly set to equal + the + [time](https://github.com/open-telemetry/opentelemetry-proto/blob/395c8422fe90080314c7d9b4114d701a0c049e1f/opentelemetry/proto/logs/v1/logs.proto#L121) + field. + ([#4444](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4444)) + ## 1.5.0-alpha.2 Released 2023-Mar-31 @@ -130,6 +152,11 @@ Released 2022-Sep-29 `AddOtlpExporter` extension to allow for more fine-grained options management ([#3653](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3653)) +* `OtlpExporterOptions` can now be bound to `IConfiguation` and + `HttpClientFactory` may be used to manage the `HttpClient` instance used when + `HttpProtobuf` is configured + ([#3640](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3640)) + ## 1.4.0-alpha.2 Released 2022-Aug-18 From d00866752d855b057b2f24c401b0e06982906914 Mon Sep 17 00:00:00 2001 From: Vishwesh Bankwar Date: Wed, 7 Jun 2023 16:54:49 -0700 Subject: [PATCH 04/11] remove .logs project --- .../.publicApi/net462/PublicAPI.Shipped.txt | 0 .../.publicApi/net462/PublicAPI.Unshipped.txt | 3 - .../netstandard2.0/PublicAPI.Shipped.txt | 0 .../netstandard2.0/PublicAPI.Unshipped.txt | 3 - .../netstandard2.1/PublicAPI.Shipped.txt | 0 .../netstandard2.1/PublicAPI.Unshipped.txt | 3 - .../AssemblyInfo.cs | 31 ----- .../CHANGELOG.md | 109 ------------------ ...Exporter.OpenTelemetryProtocol.Logs.csproj | 23 ---- .../OtlpLogExporterHelperExtensions.cs | 82 ------------- .../README.md | 11 -- .../OtlpLogExporterHelperExtensions.cs | 97 ++++++++-------- 12 files changed, 48 insertions(+), 314 deletions(-) delete mode 100644 src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/net462/PublicAPI.Shipped.txt delete mode 100644 src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/net462/PublicAPI.Unshipped.txt delete mode 100644 src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/netstandard2.0/PublicAPI.Shipped.txt delete mode 100644 src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt delete mode 100644 src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/netstandard2.1/PublicAPI.Shipped.txt delete mode 100644 src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt delete mode 100644 src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/AssemblyInfo.cs delete mode 100644 src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/CHANGELOG.md delete mode 100644 src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs.csproj delete mode 100644 src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/OtlpLogExporterHelperExtensions.cs delete mode 100644 src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/README.md diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/net462/PublicAPI.Shipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/net462/PublicAPI.Shipped.txt deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/net462/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/net462/PublicAPI.Unshipped.txt deleted file mode 100644 index 07a63e57297..00000000000 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/net462/PublicAPI.Unshipped.txt +++ /dev/null @@ -1,3 +0,0 @@ -OpenTelemetry.Logs.OtlpLogExporterHelperExtensions -static OpenTelemetry.Logs.OtlpLogExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions -static OpenTelemetry.Logs.OtlpLogExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions, System.Action configure) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/netstandard2.0/PublicAPI.Shipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/netstandard2.0/PublicAPI.Shipped.txt deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt deleted file mode 100644 index 07a63e57297..00000000000 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt +++ /dev/null @@ -1,3 +0,0 @@ -OpenTelemetry.Logs.OtlpLogExporterHelperExtensions -static OpenTelemetry.Logs.OtlpLogExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions -static OpenTelemetry.Logs.OtlpLogExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions, System.Action configure) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/netstandard2.1/PublicAPI.Shipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/netstandard2.1/PublicAPI.Shipped.txt deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt deleted file mode 100644 index 07a63e57297..00000000000 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/.publicApi/netstandard2.1/PublicAPI.Unshipped.txt +++ /dev/null @@ -1,3 +0,0 @@ -OpenTelemetry.Logs.OtlpLogExporterHelperExtensions -static OpenTelemetry.Logs.OtlpLogExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions -static OpenTelemetry.Logs.OtlpLogExporterHelperExtensions.AddOtlpExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions loggerOptions, System.Action configure) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/AssemblyInfo.cs b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/AssemblyInfo.cs deleted file mode 100644 index 8e90458d1fc..00000000000 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/AssemblyInfo.cs +++ /dev/null @@ -1,31 +0,0 @@ -// -// 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. -// - -using System.Runtime.CompilerServices; - -#if SIGNED -[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010051c1562a090fb0c9f391012a32198b5e5d9a60e9b80fa2d7b434c9e5ccb7259bd606e66f9660676afc6692b8cdc6793d190904551d2103b7b22fa636dcbb8208839785ba402ea08fc00c8f1500ccef28bbf599aa64ffb1e1d5dc1bf3420a3777badfe697856e9d52070a50c3ea5821c80bef17ca3acffa28f89dd413f096f898")] -[assembly: InternalsVisibleTo("Benchmarks, PublicKey=002400000480000094000000060200000024000052534131000400000100010051c1562a090fb0c9f391012a32198b5e5d9a60e9b80fa2d7b434c9e5ccb7259bd606e66f9660676afc6692b8cdc6793d190904551d2103b7b22fa636dcbb8208839785ba402ea08fc00c8f1500ccef28bbf599aa64ffb1e1d5dc1bf3420a3777badfe697856e9d52070a50c3ea5821c80bef17ca3acffa28f89dd413f096f898")] - -// Used by Moq. -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] -#else -[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests")] -[assembly: InternalsVisibleTo("Benchmarks")] - -// Used by Moq. -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] -#endif diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/CHANGELOG.md b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/CHANGELOG.md deleted file mode 100644 index 224fbb7f489..00000000000 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/CHANGELOG.md +++ /dev/null @@ -1,109 +0,0 @@ -# Changelog - -## Unreleased - -## 1.5.0-rc.1 - -Released 2023-May-25 - -* The `OpenTelemetryLoggerOptions.AddOtlpExporter` extension no longer - automatically sets `OpenTelemetryLoggerOptions.ParseStateValues` to `true`. - The OpenTelemetry SDK now automatically sets `Attributes` (aka `StateValues`) - for the common cases where `ParseStateValues` was previously required. - `ParseStateValues` can be set to `true` manually by users to enable parsing of - custom states which do not implement `IReadOnlyList` / `IEnumerable` - interfaces. - ([#4334](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4334)) - -* Updated to use the new `LogRecord.Attributes` field as `LogRecord.StateValues` - is now marked obsolete. There is no impact to transmitted data (`StateValues` - and `Attributes` are equivalent). - ([#4334](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4334)) - -* Fixed issue where the - [observed time](https://github.com/open-telemetry/opentelemetry-proto/blob/395c8422fe90080314c7d9b4114d701a0c049e1f/opentelemetry/proto/logs/v1/logs.proto#L138) - field of the OTLP log record was not set. It is now correctly set to equal - the - [time](https://github.com/open-telemetry/opentelemetry-proto/blob/395c8422fe90080314c7d9b4114d701a0c049e1f/opentelemetry/proto/logs/v1/logs.proto#L121) - field. - ([#4444](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4444)) - -## 1.5.0-alpha.2 - -Released 2023-Mar-31 - -## 1.5.0-alpha.1 - -Released 2023-Mar-07 - -## 1.4.0-rc.4 - -Released 2023-Feb-10 - -## 1.4.0-rc.3 - -Released 2023-Feb-01 - -## 1.4.0-rc.2 - -Released 2023-Jan-09 - -## 1.4.0-rc.1 - -Released 2022-Dec-12 - -## 1.4.0-beta.3 - -Released 2022-Nov-07 - -## 1.4.0-beta.2 - -Released 2022-Oct-17 - -## 1.4.0-beta.1 - -Released 2022-Sep-29 - -* `OtlpExporterOptions` can now be bound to `IConfiguation` and - `HttpClientFactory` may be used to manage the `HttpClient` instance used when - `HttpProtobuf` is configured - ([#3640](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3640)) - -## 1.4.0-alpha.2 - -Released 2022-Aug-18 - -## 1.4.0-alpha.1 - -Released 2022-Aug-02 - -## 1.3.0-rc.2 - -Released 2022-June-1 - -## 1.0.0-rc9.3 - -Released 2022-Apr-15 - -* Removes .NET Framework 4.6.1. The minimum .NET Framework - version supported is .NET 4.6.2. ([#3190](https://github.com/open-telemetry/opentelemetry-dotnet/issues/3190)) - -## 1.0.0-rc9.2 - -Released 2022-Apr-12 - -## 1.0.0-rc9.1 - -Released 2022-Mar-30 - -## 1.0.0-rc10 (broken. use 1.0.0-rc9.1 and newer) - -Released 2022-Mar-04 - -## 1.0.0-rc9 - -Released 2022-Feb-02 - -## 1.0.0-rc8 - -Released 2021-Oct-08 diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs.csproj b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs.csproj deleted file mode 100644 index 01ea7a3ad92..00000000000 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - netstandard2.1;netstandard2.0;net462 - OpenTelemetry protocol exporter for OpenTelemetry .NET - $(PackageTags);OTLP - core- - - - disable - - - - - false - - - - - - - diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/OtlpLogExporterHelperExtensions.cs b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/OtlpLogExporterHelperExtensions.cs deleted file mode 100644 index b57ed1f8c16..00000000000 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/OtlpLogExporterHelperExtensions.cs +++ /dev/null @@ -1,82 +0,0 @@ -// -// 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. -// - -using System.Diagnostics; -using OpenTelemetry.Exporter; - -namespace OpenTelemetry.Logs -{ - /// - /// Extension methods to simplify registering of the OpenTelemetry Protocol (OTLP) exporter. - /// - public static class OtlpLogExporterHelperExtensions - { - /// - /// Adds OTLP Exporter as a configuration to the OpenTelemetry ILoggingBuilder. - /// - /// - /// options to use. - /// The instance of to chain the calls. - public static OpenTelemetryLoggerOptions AddOtlpExporter(this OpenTelemetryLoggerOptions loggerOptions) - => AddOtlpExporterInternal(loggerOptions, configure: null); - - /// - /// Adds OTLP Exporter as a configuration to the OpenTelemetry ILoggingBuilder. - /// - /// options to use. - /// Callback action for configuring . - /// The instance of to chain the calls. - public static OpenTelemetryLoggerOptions AddOtlpExporter( - this OpenTelemetryLoggerOptions loggerOptions, - Action configure) - => AddOtlpExporterInternal(loggerOptions, configure); - - private static OpenTelemetryLoggerOptions AddOtlpExporterInternal( - OpenTelemetryLoggerOptions loggerOptions, - Action configure) - { - var exporterOptions = new OtlpExporterOptions(); - - // TODO: We are using span/activity batch environment variable keys - // here when we should be using the ones for logs. - var defaultBatchOptions = exporterOptions.BatchExportProcessorOptions; - - Debug.Assert(defaultBatchOptions != null, "defaultBatchOptions was null"); - - configure?.Invoke(exporterOptions); - - var otlpExporter = new OtlpLogExporter(exporterOptions); - - if (exporterOptions.ExportProcessorType == ExportProcessorType.Simple) - { - loggerOptions.AddProcessor(new SimpleLogRecordExportProcessor(otlpExporter)); - } - else - { - var batchOptions = exporterOptions.BatchExportProcessorOptions ?? defaultBatchOptions; - - loggerOptions.AddProcessor(new BatchLogRecordExportProcessor( - otlpExporter, - batchOptions.MaxQueueSize, - batchOptions.ScheduledDelayMilliseconds, - batchOptions.ExporterTimeoutMilliseconds, - batchOptions.MaxExportBatchSize)); - } - - return loggerOptions; - } - } -} diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/README.md b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/README.md deleted file mode 100644 index 9c2c0a286c6..00000000000 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# OTLP Logs Exporter for OpenTelemetry .NET - -[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs) -[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs.svg)](https://www.nuget.org/packages/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs) - -[The OTLP (OpenTelemetry Protocol) exporter](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md) -implementation for logs. - -## Prerequisite - -* [Get OpenTelemetry Collector](https://opentelemetry.io/docs/collector/) diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpLogExporterHelperExtensions.cs b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpLogExporterHelperExtensions.cs index b57ed1f8c16..d8b7b98e259 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpLogExporterHelperExtensions.cs +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpLogExporterHelperExtensions.cs @@ -17,66 +17,65 @@ using System.Diagnostics; using OpenTelemetry.Exporter; -namespace OpenTelemetry.Logs +namespace OpenTelemetry.Logs; + +/// +/// Extension methods to simplify registering of the OpenTelemetry Protocol (OTLP) exporter. +/// +public static class OtlpLogExporterHelperExtensions { /// - /// Extension methods to simplify registering of the OpenTelemetry Protocol (OTLP) exporter. + /// Adds OTLP Exporter as a configuration to the OpenTelemetry ILoggingBuilder. /// - public static class OtlpLogExporterHelperExtensions - { - /// - /// Adds OTLP Exporter as a configuration to the OpenTelemetry ILoggingBuilder. - /// - /// - /// options to use. - /// The instance of to chain the calls. - public static OpenTelemetryLoggerOptions AddOtlpExporter(this OpenTelemetryLoggerOptions loggerOptions) - => AddOtlpExporterInternal(loggerOptions, configure: null); - - /// - /// Adds OTLP Exporter as a configuration to the OpenTelemetry ILoggingBuilder. - /// - /// options to use. - /// Callback action for configuring . - /// The instance of to chain the calls. - public static OpenTelemetryLoggerOptions AddOtlpExporter( - this OpenTelemetryLoggerOptions loggerOptions, - Action configure) - => AddOtlpExporterInternal(loggerOptions, configure); + /// + /// options to use. + /// The instance of to chain the calls. + public static OpenTelemetryLoggerOptions AddOtlpExporter(this OpenTelemetryLoggerOptions loggerOptions) + => AddOtlpExporterInternal(loggerOptions, configure: null); - private static OpenTelemetryLoggerOptions AddOtlpExporterInternal( - OpenTelemetryLoggerOptions loggerOptions, - Action configure) - { - var exporterOptions = new OtlpExporterOptions(); + /// + /// Adds OTLP Exporter as a configuration to the OpenTelemetry ILoggingBuilder. + /// + /// options to use. + /// Callback action for configuring . + /// The instance of to chain the calls. + public static OpenTelemetryLoggerOptions AddOtlpExporter( + this OpenTelemetryLoggerOptions loggerOptions, + Action configure) + => AddOtlpExporterInternal(loggerOptions, configure); - // TODO: We are using span/activity batch environment variable keys - // here when we should be using the ones for logs. - var defaultBatchOptions = exporterOptions.BatchExportProcessorOptions; + private static OpenTelemetryLoggerOptions AddOtlpExporterInternal( + OpenTelemetryLoggerOptions loggerOptions, + Action configure) + { + var exporterOptions = new OtlpExporterOptions(); - Debug.Assert(defaultBatchOptions != null, "defaultBatchOptions was null"); + // TODO: We are using span/activity batch environment variable keys + // here when we should be using the ones for logs. + var defaultBatchOptions = exporterOptions.BatchExportProcessorOptions; - configure?.Invoke(exporterOptions); + Debug.Assert(defaultBatchOptions != null, "defaultBatchOptions was null"); - var otlpExporter = new OtlpLogExporter(exporterOptions); + configure?.Invoke(exporterOptions); - if (exporterOptions.ExportProcessorType == ExportProcessorType.Simple) - { - loggerOptions.AddProcessor(new SimpleLogRecordExportProcessor(otlpExporter)); - } - else - { - var batchOptions = exporterOptions.BatchExportProcessorOptions ?? defaultBatchOptions; + var otlpExporter = new OtlpLogExporter(exporterOptions); - loggerOptions.AddProcessor(new BatchLogRecordExportProcessor( - otlpExporter, - batchOptions.MaxQueueSize, - batchOptions.ScheduledDelayMilliseconds, - batchOptions.ExporterTimeoutMilliseconds, - batchOptions.MaxExportBatchSize)); - } + if (exporterOptions.ExportProcessorType == ExportProcessorType.Simple) + { + loggerOptions.AddProcessor(new SimpleLogRecordExportProcessor(otlpExporter)); + } + else + { + var batchOptions = exporterOptions.BatchExportProcessorOptions ?? defaultBatchOptions; - return loggerOptions; + loggerOptions.AddProcessor(new BatchLogRecordExportProcessor( + otlpExporter, + batchOptions.MaxQueueSize, + batchOptions.ScheduledDelayMilliseconds, + batchOptions.ExporterTimeoutMilliseconds, + batchOptions.MaxExportBatchSize)); } + + return loggerOptions; } } From b8280b6a9f047c3fac85ada60919047f35273444 Mon Sep 17 00:00:00 2001 From: Vishwesh Bankwar Date: Wed, 7 Jun 2023 16:56:06 -0700 Subject: [PATCH 05/11] sln file --- OpenTelemetry.sln | 6 ------ 1 file changed, 6 deletions(-) diff --git a/OpenTelemetry.sln b/OpenTelemetry.sln index e3961a83087..c82c90d8c22 100644 --- a/OpenTelemetry.sln +++ b/OpenTelemetry.sln @@ -212,8 +212,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "customizing-the-sdk", "docs EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Tests.Stress", "test\OpenTelemetry.Tests.Stress\OpenTelemetry.Tests.Stress.csproj", "{2770158A-D220-414B-ABC6-179371323579}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs", "src\OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs\OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs.csproj", "{6E1A5FA3-E024-4972-9EDC-11E36C5A0D6F}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "source-generation", "docs\logs\source-generation\source-generation.csproj", "{1F6CC903-04C9-4E7C-B388-C215C467BFB9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "getting-started-prometheus-grafana", "docs\metrics\getting-started-prometheus-grafana\getting-started-prometheus-grafana.csproj", "{41B784AA-3301-4126-AF9F-1D59BD04B0BF}" @@ -456,10 +454,6 @@ Global {2770158A-D220-414B-ABC6-179371323579}.Debug|Any CPU.Build.0 = Debug|Any CPU {2770158A-D220-414B-ABC6-179371323579}.Release|Any CPU.ActiveCfg = Release|Any CPU {2770158A-D220-414B-ABC6-179371323579}.Release|Any CPU.Build.0 = Release|Any CPU - {6E1A5FA3-E024-4972-9EDC-11E36C5A0D6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6E1A5FA3-E024-4972-9EDC-11E36C5A0D6F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6E1A5FA3-E024-4972-9EDC-11E36C5A0D6F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6E1A5FA3-E024-4972-9EDC-11E36C5A0D6F}.Release|Any CPU.Build.0 = Release|Any CPU {1F6CC903-04C9-4E7C-B388-C215C467BFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1F6CC903-04C9-4E7C-B388-C215C467BFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {1F6CC903-04C9-4E7C-B388-C215C467BFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU From cb1b976b9245c8e1064307e26d35afa6ea137feb Mon Sep 17 00:00:00 2001 From: Vishwesh Bankwar Date: Wed, 7 Jun 2023 16:59:25 -0700 Subject: [PATCH 06/11] fix md error --- .../CHANGELOG.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md index 4ece51a84d9..ce612ea16d4 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md @@ -37,10 +37,9 @@ Released 2023-May-25 and `Attributes` are equivalent). ([#4334](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4334)) -* Fixed issue where the - [observed time](https://github.com/open-telemetry/opentelemetry-proto/blob/395c8422fe90080314c7d9b4114d701a0c049e1f/opentelemetry/proto/logs/v1/logs.proto#L138) - field of the OTLP log record was not set. It is now correctly set to equal - the +* Fixed issue where the [observed + time](https://github.com/open-telemetry/opentelemetry-proto/blob/395c8422fe90080314c7d9b4114d701a0c049e1f/opentelemetry/proto/logs/v1/logs.proto#L138) + field of the OTLP log record was not set. It is now correctly set to equal the [time](https://github.com/open-telemetry/opentelemetry-proto/blob/395c8422fe90080314c7d9b4114d701a0c049e1f/opentelemetry/proto/logs/v1/logs.proto#L121) field. ([#4444](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4444)) From 212f31949a054f95dc6d402df9c60321279f83f4 Mon Sep 17 00:00:00 2001 From: Vishwesh Bankwar Date: Wed, 7 Jun 2023 17:04:06 -0700 Subject: [PATCH 07/11] fix link --- .../README.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md index ccdc6d93d1c..414034e386c 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md @@ -51,14 +51,7 @@ runnable example. ## Enable Log Exporter -This package currently only supports exporting traces and metrics. Support for -exporting logs is provided by installing the -[`OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs`](../OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/README.md) -package. - -Once the OTLP log exporter is stable, it'll be folded into this package. Check -[this](https://github.com/open-telemetry/opentelemetry-dotnet/milestone/35) -milestone for tracking. +// TODO ## Configuration From c105257337979518bcb2eada8e603b063583180c Mon Sep 17 00:00:00 2001 From: Vishwesh Bankwar Date: Wed, 7 Jun 2023 17:25:49 -0700 Subject: [PATCH 08/11] changelog --- .../CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md index ce612ea16d4..46a23c2c59f 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md @@ -2,6 +2,12 @@ ## Unreleased +* Merged `OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs` package in to +`OpenTelemetry.Exporter.OpenTelemetryProtocol`. Going Forward, +`OpenTelemetry.Exporter.OpenTelemetryProtocol` will be the only package needed +for all 3 signals (Logs, Metrics and Traces). +([#4556](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4556)) + * Add back support for Exemplars. See [exemplars](../../docs/metrics/customizing-the-sdk/README.md#exemplars) for instructions to enable exemplars. ([#4553](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4553)) From 0d496879fa8fbe08f180ef6fe25d20a468c77746 Mon Sep 17 00:00:00 2001 From: Vishwesh Bankwar Date: Wed, 7 Jun 2023 20:05:08 -0700 Subject: [PATCH 09/11] address pr feedback --- src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md index 46a23c2c59f..0543b981fed 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md @@ -161,7 +161,7 @@ Released 2022-Sep-29 `AddOtlpExporter` extension to allow for more fine-grained options management ([#3653](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3653)) -* `OtlpExporterOptions` can now be bound to `IConfiguation` and +* `OtlpExporterOptions` can now be bound to `IConfiguration` for logs and `HttpClientFactory` may be used to manage the `HttpClient` instance used when `HttpProtobuf` is configured ([#3640](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3640)) From b84edc18477c6efe5dd20d635f9e24f9c8f308ad Mon Sep 17 00:00:00 2001 From: Vishwesh Bankwar Date: Wed, 7 Jun 2023 20:06:40 -0700 Subject: [PATCH 10/11] rmv internalvisibleto --- src/OpenTelemetry.Exporter.OpenTelemetryProtocol/AssemblyInfo.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/AssemblyInfo.cs b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/AssemblyInfo.cs index 44e26f37879..2bc348cad9a 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/AssemblyInfo.cs +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/AssemblyInfo.cs @@ -20,7 +20,6 @@ [assembly: InternalsVisibleTo("OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010051c1562a090fb0c9f391012a32198b5e5d9a60e9b80fa2d7b434c9e5ccb7259bd606e66f9660676afc6692b8cdc6793d190904551d2103b7b22fa636dcbb8208839785ba402ea08fc00c8f1500ccef28bbf599aa64ffb1e1d5dc1bf3420a3777badfe697856e9d52070a50c3ea5821c80bef17ca3acffa28f89dd413f096f898")] [assembly: InternalsVisibleTo("Benchmarks, PublicKey=002400000480000094000000060200000024000052534131000400000100010051c1562a090fb0c9f391012a32198b5e5d9a60e9b80fa2d7b434c9e5ccb7259bd606e66f9660676afc6692b8cdc6793d190904551d2103b7b22fa636dcbb8208839785ba402ea08fc00c8f1500ccef28bbf599aa64ffb1e1d5dc1bf3420a3777badfe697856e9d52070a50c3ea5821c80bef17ca3acffa28f89dd413f096f898")] [assembly: InternalsVisibleTo("MockOpenTelemetryCollector, PublicKey=002400000480000094000000060200000024000052534131000400000100010051c1562a090fb0c9f391012a32198b5e5d9a60e9b80fa2d7b434c9e5ccb7259bd606e66f9660676afc6692b8cdc6793d190904551d2103b7b22fa636dcbb8208839785ba402ea08fc00c8f1500ccef28bbf599aa64ffb1e1d5dc1bf3420a3777badfe697856e9d52070a50c3ea5821c80bef17ca3acffa28f89dd413f096f898")] -[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs, PublicKey=002400000480000094000000060200000024000052534131000400000100010051c1562a090fb0c9f391012a32198b5e5d9a60e9b80fa2d7b434c9e5ccb7259bd606e66f9660676afc6692b8cdc6793d190904551d2103b7b22fa636dcbb8208839785ba402ea08fc00c8f1500ccef28bbf599aa64ffb1e1d5dc1bf3420a3777badfe697856e9d52070a50c3ea5821c80bef17ca3acffa28f89dd413f096f898")] // Used by Moq. [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] From 72af264357f5566a625d575b65ad6d4d293d5379 Mon Sep 17 00:00:00 2001 From: Vishwesh Bankwar Date: Wed, 7 Jun 2023 21:07:53 -0700 Subject: [PATCH 11/11] add link to changelog --- .../CHANGELOG.md | 30 ++----------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md index 0543b981fed..1e100c94433 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md @@ -5,7 +5,9 @@ * Merged `OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs` package in to `OpenTelemetry.Exporter.OpenTelemetryProtocol`. Going Forward, `OpenTelemetry.Exporter.OpenTelemetryProtocol` will be the only package needed -for all 3 signals (Logs, Metrics and Traces). +for all 3 signals (Logs, Metrics and Traces). All the changes made in +[`OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs`](https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.5.0/src/OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs/CHANGELOG.md#changelog) +are now included in this package. ([#4556](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4556)) * Add back support for Exemplars. See [exemplars](../../docs/metrics/customizing-the-sdk/README.md#exemplars) @@ -29,27 +31,6 @@ Released 2023-May-25 This also reintroduces the `System.Reflection.Emit.Lightweight` dependency. ([#4407](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4407)) -* The `OpenTelemetryLoggerOptions.AddOtlpExporter` extension no longer - automatically sets `OpenTelemetryLoggerOptions.ParseStateValues` to `true`. - The OpenTelemetry SDK now automatically sets `Attributes` (aka `StateValues`) - for the common cases where `ParseStateValues` was previously required. - `ParseStateValues` can be set to `true` manually by users to enable parsing of - custom states which do not implement `IReadOnlyList` / `IEnumerable` - interfaces. - ([#4334](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4334)) - -* Updated to use the new `LogRecord.Attributes` field as `LogRecord.StateValues` - is now marked obsolete. There is no impact to transmitted data (`StateValues` - and `Attributes` are equivalent). - ([#4334](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4334)) - -* Fixed issue where the [observed - time](https://github.com/open-telemetry/opentelemetry-proto/blob/395c8422fe90080314c7d9b4114d701a0c049e1f/opentelemetry/proto/logs/v1/logs.proto#L138) - field of the OTLP log record was not set. It is now correctly set to equal the - [time](https://github.com/open-telemetry/opentelemetry-proto/blob/395c8422fe90080314c7d9b4114d701a0c049e1f/opentelemetry/proto/logs/v1/logs.proto#L121) - field. - ([#4444](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4444)) - ## 1.5.0-alpha.2 Released 2023-Mar-31 @@ -161,11 +142,6 @@ Released 2022-Sep-29 `AddOtlpExporter` extension to allow for more fine-grained options management ([#3653](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3653)) -* `OtlpExporterOptions` can now be bound to `IConfiguration` for logs and - `HttpClientFactory` may be used to manage the `HttpClient` instance used when - `HttpProtobuf` is configured - ([#3640](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3640)) - ## 1.4.0-alpha.2 Released 2022-Aug-18