Pārlūkot izejas kodu

Add OpenTelemerty Impl

master
Savorboard pirms 3 gadiem
vecāks
revīzija
a3e1d274bf
2 mainītis faili ar 5 papildinājumiem un 45 dzēšanām
  1. +0
    -35
      src/DotNetCore.CAP.OpenTelemetry/CapDiagnosticListener.cs
  2. +5
    -10
      src/DotNetCore.CAP.OpenTelemetry/DotNetCore.CAP.OpenTelemetry.csproj

+ 0
- 35
src/DotNetCore.CAP.OpenTelemetry/CapDiagnosticListener.cs Parādīt failu

@@ -1,35 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics.Tracing;
using OpenTelemetry.Instrumentation;
using System.Diagnostics;
using System.Reflection;

namespace DotNetCore.CAP.OpenTelemetry
{
public class CapDiagnosticListener : EventSource
{
internal static readonly ActivitySource ActivitySource = new ActivitySource("", "");

public CapDiagnosticListener()
{
// var count = new System.Diagnostics.Tracing.DiagnosticCounter();

}

}

internal sealed partial class HttpTelemetry : EventSource
{
public static readonly HttpTelemetry Log = new HttpTelemetry();


[Event(1, Level = EventLevel.Informational)]
private void RequestStart(string scheme, string host, int port, string pathAndQuery, byte versionMajor, byte versionMinor, HttpVersionPolicy versionPolicy)
{
Interlocked.Increment(ref _startedRequests);
WriteEvent(eventId: 1, scheme, host, port, pathAndQuery, versionMajor, versionMinor, versionPolicy);
}
}
}

+ 5
- 10
src/DotNetCore.CAP.OpenTelemetry/DotNetCore.CAP.OpenTelemetry.csproj Parādīt failu

@@ -2,20 +2,15 @@

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>DotNetCore.CAP.OpenTelemetry</AssemblyName>
<Nullable>enable</Nullable>
<Description>CAP instrumentation for OpenTelemetry .NET</Description>
<PackageTags>$(PackageTags);distributed-tracing</PackageTags>
</PropertyGroup>
<PropertyGroup>
<DocumentationFile>bin\$(Configuration)\netstandard2.1\DotNetCore.CAP.OpenTelemetry.xml</DocumentationFile>
<NoWarn>1701;1702;1705;CS1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="5.0.1" />
<PackageReference Include="OpenTelemetry" Version="1.1.0" />
</ItemGroup>
<PackageReference Include="OpenTelemetry" Version="1.2.0-rc1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\DotNetCore.CAP\DotNetCore.CAP.csproj" />


Notiek ielāde…
Atcelt
Saglabāt