diff --git a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/PersistentStorage/PersistentStorageEventSource.cs b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/PersistentStorage/PersistentStorageEventSource.cs index 241023b2f89..69cdf419cac 100644 --- a/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/PersistentStorage/PersistentStorageEventSource.cs +++ b/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/PersistentStorage/PersistentStorageEventSource.cs @@ -145,7 +145,7 @@ public void CouldNotRemoveExpiredLease(string srcFilePath, string destFilePath, this.WriteEvent(8, srcFilePath, destFilePath, ex); } - [Event(9, Message = "{0}: Error Message: {1}. Exception: {3}", Level = EventLevel.Error)] + [Event(9, Message = "{0}: Error Message: {1}. Exception: {2}", Level = EventLevel.Error)] public void PersistentStorageException(string className, string message, string ex) { this.WriteEvent(9, className, message, ex); diff --git a/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/EventSourceTest.cs b/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/EventSourceTest.cs index 2f4903d5596..f786289ef49 100644 --- a/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/EventSourceTest.cs +++ b/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/EventSourceTest.cs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 using OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation; +using OpenTelemetry.PersistentStorage.Abstractions; +using OpenTelemetry.PersistentStorage.FileSystem; using OpenTelemetry.Tests; using Xunit; @@ -14,4 +16,16 @@ public void EventSourceTest_OpenTelemetryProtocolExporterEventSource() { EventSourceTestHelper.MethodsAreImplementedConsistentlyWithTheirAttributes(OpenTelemetryProtocolExporterEventSource.Log); } + + [Fact] + public void EventSourceTest_PersistentStorageAbstractionsEventSource() + { + EventSourceTestHelper.MethodsAreImplementedConsistentlyWithTheirAttributes(PersistentStorageAbstractionsEventSource.Log); + } + + [Fact] + public void EventSourceTest_PersistentStorageEventSource() + { + EventSourceTestHelper.MethodsAreImplementedConsistentlyWithTheirAttributes(PersistentStorageEventSource.Log); + } }