Skip to content

Commit

Permalink
[opentracing-shim] Add missing XML comments (#5512)
Browse files Browse the repository at this point in the history
Co-authored-by: Utkarsh Umesan Pillai <66651184+utpilla@users.noreply.github.com>
  • Loading branch information
CodeBlanch and utpilla authored Apr 5, 2024
1 parent 90d9a91 commit dbcc511
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
<TargetFrameworks>$(TargetFrameworksForLibraries)</TargetFrameworks>
<Description>OpenTracing shim for OpenTelemetry .NET</Description>
<PackageTags>$(PackageTags);distributed-tracing;OpenTracing</PackageTags>
<IsPackable>true</IsPackable>
<!--
TODO: Disable this exception, and actually do document all public API.
-->
<NoWarn>$(NoWarn),1591</NoWarn>

<!-- this is temporary. will remove in future PR. -->
<Nullable>disable</Nullable>
Expand Down
13 changes: 13 additions & 0 deletions src/OpenTelemetry.Shims.OpenTracing/TracerShim.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,29 @@

namespace OpenTelemetry.Shims.OpenTracing;

/// <summary>
/// Implements OpenTracing <see cref="global::OpenTracing.ITracer"/> interface
/// using OpenTelemetry <see cref="Trace.Tracer"/> implementation.
/// </summary>
public class TracerShim : global::OpenTracing.ITracer
{
private readonly Trace.Tracer tracer;
private readonly TextMapPropagator definedPropagator;

/// <summary>
/// Initializes a new instance of the <see cref="TracerShim"/> class.
/// </summary>
/// <param name="tracerProvider"><see cref="Trace.TracerProvider"/>.</param>
public TracerShim(Trace.TracerProvider tracerProvider)
: this(tracerProvider, null)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="TracerShim"/> class.
/// </summary>
/// <param name="tracerProvider"><see cref="Trace.TracerProvider"/>.</param>
/// <param name="textFormat"><see cref="TextMapPropagator"/>.</param>
public TracerShim(Trace.TracerProvider tracerProvider, TextMapPropagator textFormat)
{
Guard.ThrowIfNull(tracerProvider);
Expand Down

0 comments on commit dbcc511

Please sign in to comment.