More cleanups - basic renaming, public vs internal (#908)
This commit is contained in:
parent
1b15224a6b
commit
9a3c69ac67
|
|
@ -21,9 +21,9 @@ using System.Net.Http;
|
|||
namespace OpenTelemetry.Instrumentation.Http.Implementation
|
||||
{
|
||||
/// <summary>
|
||||
/// A collection of helper methods to be used when building Http spans.
|
||||
/// A collection of helper methods to be used when building Http activities.
|
||||
/// </summary>
|
||||
public static class HttpTagHelper
|
||||
internal static class HttpTagHelper
|
||||
{
|
||||
private static readonly ConcurrentDictionary<string, string> MethodOperationNameCache = new ConcurrentDictionary<string, string>();
|
||||
private static readonly ConcurrentDictionary<HttpMethod, string> HttpMethodOperationNameCache = new ConcurrentDictionary<HttpMethod, string>();
|
||||
|
|
@ -39,10 +39,10 @@ namespace OpenTelemetry.Instrumentation.Http.Implementation
|
|||
private static readonly Func<HttpStatusCode, string> ConvertHttpStatusCodeToStringRef = ConvertHttpStatusCodeToString;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the OpenTelemetry standard operation name for a span based on its Http method.
|
||||
/// Gets the OpenTelemetry standard name for an activity based on its Http method.
|
||||
/// </summary>
|
||||
/// <param name="method">Http method.</param>
|
||||
/// <returns>Span operation name.</returns>
|
||||
/// <returns>Activity name.</returns>
|
||||
public static string GetOperationNameForHttpMethod(string method) => MethodOperationNameCache.GetOrAdd(method, ConvertMethodToOperationNameRef);
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace OpenTelemetry.Instrumentation
|
|||
{
|
||||
public static InstrumentationEventSource Log = new InstrumentationEventSource();
|
||||
|
||||
[Event(1, Message = "Current Activity is NULL the '{0}' callback. Span will not be recorded.", Level = EventLevel.Warning)]
|
||||
[Event(1, Message = "Current Activity is NULL the '{0}' callback. Activity will not be recorded.", Level = EventLevel.Warning)]
|
||||
public void NullActivity(string eventName)
|
||||
{
|
||||
this.WriteEvent(1, eventName);
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ namespace OpenTelemetry.Trace
|
|||
/// </summary>
|
||||
public static class ActivityExtensions
|
||||
{
|
||||
public const string ResourcePropertyName = "ot.resource";
|
||||
internal const string ResourcePropertyName = "ot.resource";
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether activity needs to be created and tracked.
|
||||
/// Gets the Resource associated with the Activity.
|
||||
/// </summary>
|
||||
/// <param name="activity">Activity instance.</param>
|
||||
/// <returns>The resource.</returns>
|
||||
|
|
@ -43,7 +43,7 @@ namespace OpenTelemetry.Trace
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether activity needs to be created and tracked.
|
||||
/// Sets the Resource associated with the Activity..
|
||||
/// </summary>
|
||||
/// <param name="activity">Activity instance.</param>
|
||||
/// <param name="resource">Resource to set to.</param>
|
||||
|
|
|
|||
|
|
@ -43,14 +43,14 @@ namespace OpenTelemetry.Exporter.Jaeger.Tests
|
|||
|
||||
public bool DisposedCalled { get; private set; } = false;
|
||||
|
||||
public override void OnStart(Activity span)
|
||||
public override void OnStart(Activity activity)
|
||||
{
|
||||
this.StartAction?.Invoke(span);
|
||||
this.StartAction?.Invoke(activity);
|
||||
}
|
||||
|
||||
public override void OnEnd(Activity span)
|
||||
public override void OnEnd(Activity activity)
|
||||
{
|
||||
this.EndAction?.Invoke(span);
|
||||
this.EndAction?.Invoke(activity);
|
||||
}
|
||||
|
||||
public override Task ShutdownAsync(CancellationToken cancellationToken)
|
||||
|
|
|
|||
|
|
@ -44,14 +44,14 @@ namespace OpenTelemetry.Exporter.ZPages.Tests
|
|||
|
||||
public bool DisposedCalled { get; private set; } = false;
|
||||
|
||||
public override void OnStart(Activity span)
|
||||
public override void OnStart(Activity activity)
|
||||
{
|
||||
this.StartAction?.Invoke(span);
|
||||
this.StartAction?.Invoke(activity);
|
||||
}
|
||||
|
||||
public override void OnEnd(Activity span)
|
||||
public override void OnEnd(Activity activity)
|
||||
{
|
||||
this.EndAction?.Invoke(span);
|
||||
this.EndAction?.Invoke(activity);
|
||||
}
|
||||
|
||||
public override Task ShutdownAsync(CancellationToken cancellationToken)
|
||||
|
|
|
|||
Loading…
Reference in New Issue