Skip to content

Commit

Permalink
move ProcessInformation to API and implement a ToString()
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz committed Feb 1, 2024
1 parent c54294d commit 2bc131f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
// See the LICENSE file in the project root for more information

using System.Diagnostics;
using Elastic.Apm.Helpers;

namespace Elastic.Apm.Model;
namespace Elastic.Apm.Api;

internal class ProcessInformation
{
Expand All @@ -19,4 +20,9 @@ public static ProcessInformation Create()
return new ProcessInformation { Pid = p.Id, Title = p.ProcessName };
}

public override string ToString() => new ToStringBuilder(nameof(Service))
{
{ nameof(Pid), Pid },
{ nameof(Title), Title }
}.ToString();
}
1 change: 1 addition & 0 deletions test/Elastic.Apm.Tests.MockApmServer/MetadataDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public override string ToString() =>
new ToStringBuilder(nameof(MetadataDto))
{
{ nameof(Service), Service },
{ nameof(Process), Process },
{ nameof(System), System },
{ nameof(Labels), AbstractConfigurationReader.ToLogString(Labels) },
{ nameof(Cloud), Cloud },
Expand Down

0 comments on commit 2bc131f

Please sign in to comment.