-
Notifications
You must be signed in to change notification settings - Fork 99
/
Copy pathFrameworkDescription.cs
43 lines (33 loc) · 1.12 KB
/
FrameworkDescription.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
using OpenTelemetry.AutoInstrumentation.Logging;
namespace OpenTelemetry.AutoInstrumentation;
internal partial class FrameworkDescription
{
private static readonly IOtelLogger Log = OtelLogging.GetLogger();
private FrameworkDescription(
string name,
string productVersion,
string osPlatform,
string osArchitecture,
string processArchitecture)
{
Name = name;
ProductVersion = productVersion;
OSPlatform = osPlatform;
OSArchitecture = osArchitecture;
ProcessArchitecture = processArchitecture;
}
public string Name { get; }
public string ProductVersion { get; }
public string OSPlatform { get; }
public string OSArchitecture { get; }
public string ProcessArchitecture { get; }
public override string ToString()
{
// examples:
// .NET Framework 4.8 x86 on Windows x64
// .NET Core 3.0.0 x64 on Linux x64
return $"{Name} {ProductVersion} {ProcessArchitecture} on {OSPlatform} {OSArchitecture}";
}
}