diff --git a/src/OpenTelemetry.Api/CHANGELOG.md b/src/OpenTelemetry.Api/CHANGELOG.md index 1b85aa4cb53..20e140dc90c 100644 --- a/src/OpenTelemetry.Api/CHANGELOG.md +++ b/src/OpenTelemetry.Api/CHANGELOG.md @@ -7,8 +7,8 @@ public. GetTagValue, EnumerateTags, EnumerateLinks, EnumerateEvents. See [#1544](https://github.com/open-telemetry/opentelemetry-dotnet/issues/1544) for full changes. -* Changed SpanHelper class and ResolveSpanStatusForHttpStatusCode method from - public to internal. Moved SpanHelper.cs to OpenTelemetry.Api\Internal +* Changed SpanHelper class from public to internal. Moved SpanHelper.cs to + OpenTelemetry.Api\Internal ([#1555](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1555)) ## 0.8.0-beta.1 diff --git a/src/OpenTelemetry.Instrumentation.AspNet/CHANGELOG.md b/src/OpenTelemetry.Instrumentation.AspNet/CHANGELOG.md index b95a4e4a400..52a2295f09e 100644 --- a/src/OpenTelemetry.Instrumentation.AspNet/CHANGELOG.md +++ b/src/OpenTelemetry.Instrumentation.AspNet/CHANGELOG.md @@ -5,8 +5,6 @@ * AspNetInstrumentation sets ActivitySource to activities created outside ActivitySource. ([#1515](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1515/)) -* Added SpanHelper class as a link to the the project. - ([#1555](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1555)) ## 0.8.0-beta.1 diff --git a/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md b/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md index d761ec7e26e..20a85c573f0 100644 --- a/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md +++ b/src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md @@ -8,8 +8,6 @@ * For gRPC invocations, leading forward slash is trimmed from span name in order to conform to the specification. ([#1551](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1551)) -* Added SpanHelper.cs file as a link to the the project. - ([#1555](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1555)) ## 0.8.0-beta.1 diff --git a/src/OpenTelemetry.Instrumentation.Http/CHANGELOG.md b/src/OpenTelemetry.Instrumentation.Http/CHANGELOG.md index b58df129823..9e4e97db917 100644 --- a/src/OpenTelemetry.Instrumentation.Http/CHANGELOG.md +++ b/src/OpenTelemetry.Instrumentation.Http/CHANGELOG.md @@ -5,8 +5,6 @@ * HttpInstrumentation sets ActivitySource to activities created outside ActivitySource. ([#1515](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1515/)) -* Added SpanHelper.cs file as a link to the the project. - ([#1555](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1555)) ## 0.8.0-beta.1 diff --git a/src/OpenTelemetry/README.md b/src/OpenTelemetry/README.md index 79d45b8c52e..64cad1e41c0 100644 --- a/src/OpenTelemetry/README.md +++ b/src/OpenTelemetry/README.md @@ -100,11 +100,16 @@ content: } ``` -`LogDirectory` is the directory of the output file. It can be an absolute path -or a relative path to the current directory. `FileSize` is a positive integer, +#### Configuration Parameters + +1. `LogDirectory` is the directory of the output file. It can be an absolute +path or a relative path to the current directory. + +2. `FileSize` is a positive integer, which specifies the log file size in [KiB](https://en.wikipedia.org/wiki/Kibibyte). -`LogLevel` is the lowest level of the events to be captured. + +3. `LogLevel` is the lowest level of the events to be captured. It has to be one of the [values](https://docs.microsoft.com/dotnet/api/system.diagnostics.tracing.eventlevel#fields) of the [`EventLevel` @@ -115,18 +120,23 @@ higher severity levels. For example, `Warning` includes the `Error` and [here](https://docs.microsoft.com/dotnet/api/system.diagnostics.tracing.eventlevel) for more.) +#### Remarks + +A `FileSize`-KiB log file named as `ExecutableName.ProcessId.log` (e.g. +`foobar.exe.12345.log`) will be generated at the specific directory +`LogDirectory`. + The SDK will attempt to open the configuration file in non-exclusive read-only -mode, read the file and parse it as the configuration file every 3 seconds. If +mode, read the file and parse it as the configuration file every 10 seconds. If the SDK fails to parse the `LogDirectory`, `FileSize` or `LogLevel` fields as the specified format, the configuration file will be treated as invalid and no -log file would be generated. Otherwise, it will create or overwrite a -`FileSize`-KiB file at the specific directory `LogDirectory` with the log file -named as `ExecutableName.ProcessId.log` (e.g. `foobar.exe.12345.log`). +log file would be generated. Otherwise, it will create or overwrite the log +file as described above. Note that the `FileSize` has to be between 1 MiB and 128 MiB (inclusive), or it -will be rounded to the closest upper or lower limit. When the `LogDirectory` or +will be rounded to the closest upper or lower limit. When the `LogDirectory` or `FileSize` is found to be changed, the SDK will create or overwrite a file with -new logs according to the new configuration. The configuration file has to be +new logs according to the new configuration. The configuration file has to be no more than 4 KiB. In case the file is larger than 4 KiB, only the first 4 KiB of content will be read. diff --git a/src/OpenTelemetry/Sdk.cs b/src/OpenTelemetry/Sdk.cs index d4f249a41ba..843ee08b1c2 100644 --- a/src/OpenTelemetry/Sdk.cs +++ b/src/OpenTelemetry/Sdk.cs @@ -16,6 +16,7 @@ using System.Diagnostics; using OpenTelemetry.Context.Propagation; +using OpenTelemetry.Internal; using OpenTelemetry.Metrics; using OpenTelemetry.Trace; @@ -36,6 +37,7 @@ static Sdk() Activity.DefaultIdFormat = ActivityIdFormat.W3C; Activity.ForceDefaultIdFormat = true; + SelfDiagnostics.EnsureInitialized(); } /// diff --git a/test/OpenTelemetry.Tests/Shared/EventSourceTestHelper.cs b/test/OpenTelemetry.Tests/Shared/EventSourceTestHelper.cs index ad29383eca5..970f3097923 100644 --- a/test/OpenTelemetry.Tests/Shared/EventSourceTestHelper.cs +++ b/test/OpenTelemetry.Tests/Shared/EventSourceTestHelper.cs @@ -31,11 +31,6 @@ public static void MethodsAreImplementedConsistentlyWithTheirAttributes(EventSou { VerifyMethodImplementation(eventSource, publicMethod); } - - foreach (MethodInfo publicMethod in GetEventMethods(eventSource)) - { - VerifyMethodImplementation(eventSource, publicMethod); - } } private static void VerifyMethodImplementation(EventSource eventSource, MethodInfo eventMethod) @@ -150,11 +145,5 @@ private static IEnumerable GetEventMethods(EventSource eventSource) MethodInfo[] methods = eventSource.GetType().GetMethods(); return methods.Where(m => m.GetCustomAttributes(typeof(EventAttribute), false).Any()); } - - private static IEnumerable GetNonEventMethods(EventSource eventSource) - { - MethodInfo[] methods = eventSource.GetType().GetMethods(); - return methods.Where(m => m.GetCustomAttributes(typeof(NonEventAttribute), false).Any()); - } } }