[Instrumentation.Http] Change Activity Source Name for HttpWebRequest… (#3515)
This commit is contained in:
parent
135fa9c7e9
commit
69d11bbfb2
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
* Changed activity source name from `OpenTelemetry.HttpWebRequest`
|
||||
to `OpenTelemetry.Instrumentation.Http.HttpWebRequest` for `HttpWebRequest`s
|
||||
and from `OpenTelemetry.Instrumentation.Http`
|
||||
to `OpenTelemetry.Instrumentation.Http.HttpClient` for `HttpClient`.
|
||||
([#3515](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3515))
|
||||
|
||||
## 1.0.0-rc9.5
|
||||
|
||||
Released 2022-Aug-02
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace OpenTelemetry.Instrumentation.Http.Implementation
|
|||
|
||||
// https://github.com/dotnet/runtime/blob/7d034ddbbbe1f2f40c264b323b3ed3d6b3d45e9a/src/libraries/System.Net.Http/src/System/Net/Http/DiagnosticsHandler.cs#L19
|
||||
internal static readonly string HttpClientActivitySourceName = "System.Net.Http";
|
||||
internal static readonly string ActivitySourceName = AssemblyName.Name;
|
||||
internal static readonly string ActivitySourceName = AssemblyName.Name + ".HttpClient";
|
||||
internal static readonly Version Version = AssemblyName.Version;
|
||||
internal static readonly ActivitySource ActivitySource = new(ActivitySourceName, Version.ToString());
|
||||
|
||||
|
|
|
|||
|
|
@ -36,15 +36,16 @@ namespace OpenTelemetry.Instrumentation.Http.Implementation
|
|||
/// </remarks>
|
||||
internal static class HttpWebRequestActivitySource
|
||||
{
|
||||
public const string ActivitySourceName = "OpenTelemetry.HttpWebRequest";
|
||||
public const string ActivityName = ActivitySourceName + ".HttpRequestOut";
|
||||
internal static readonly AssemblyName AssemblyName = typeof(HttpWebRequestActivitySource).Assembly.GetName();
|
||||
internal static readonly string ActivitySourceName = AssemblyName.Name + ".HttpWebRequest";
|
||||
internal static readonly string ActivityName = ActivitySourceName + ".HttpRequestOut";
|
||||
|
||||
internal static readonly Func<HttpWebRequest, string, IEnumerable<string>> HttpWebRequestHeaderValuesGetter = (request, name) => request.Headers.GetValues(name);
|
||||
internal static readonly Action<HttpWebRequest, string, string> HttpWebRequestHeaderValuesSetter = (request, name, value) => request.Headers.Add(name, value);
|
||||
|
||||
internal static HttpWebRequestInstrumentationOptions Options = new HttpWebRequestInstrumentationOptions();
|
||||
|
||||
private static readonly Version Version = typeof(HttpWebRequestActivitySource).Assembly.GetName().Version;
|
||||
private static readonly Version Version = AssemblyName.Version;
|
||||
private static readonly ActivitySource WebRequestActivitySource = new ActivitySource(ActivitySourceName, Version.ToString());
|
||||
|
||||
// Fields for reflection
|
||||
|
|
|
|||
Loading…
Reference in New Issue