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

[Exporter.OpenTelemetryProtocol] fix event source throws System.FormatException #5451

Merged
merged 5 commits into from
Mar 14, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -14,4 +16,16 @@ public void EventSourceTest_OpenTelemetryProtocolExporterEventSource()
{
EventSourceTestHelper.MethodsAreImplementedConsistentlyWithTheirAttributes(OpenTelemetryProtocolExporterEventSource.Log);
}

[Fact]
public void EventSourceTest_PersistentStorageAbstractionsEventSource()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

{
EventSourceTestHelper.MethodsAreImplementedConsistentlyWithTheirAttributes(PersistentStorageAbstractionsEventSource.Log);
}

[Fact]
public void EventSourceTest_PersistentStorageEventSource()
{
EventSourceTestHelper.MethodsAreImplementedConsistentlyWithTheirAttributes(PersistentStorageEventSource.Log);
}
}