Skip to content

Commit

Permalink
Merge branch 'master' into utpilla/Add-IsRecorded-Check-For-Export
Browse files Browse the repository at this point in the history
  • Loading branch information
cijothomas authored Nov 18, 2020
2 parents 7d5aadc + 9e90fce commit b815f55
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 28 deletions.
4 changes: 2 additions & 2 deletions src/OpenTelemetry.Api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/OpenTelemetry.Instrumentation.AspNet/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions src/OpenTelemetry.Instrumentation.Http/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
28 changes: 19 additions & 9 deletions src/OpenTelemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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.

Expand Down
2 changes: 2 additions & 0 deletions src/OpenTelemetry/Sdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

using System.Diagnostics;
using OpenTelemetry.Context.Propagation;
using OpenTelemetry.Internal;
using OpenTelemetry.Metrics;
using OpenTelemetry.Trace;

Expand All @@ -36,6 +37,7 @@ static Sdk()

Activity.DefaultIdFormat = ActivityIdFormat.W3C;
Activity.ForceDefaultIdFormat = true;
SelfDiagnostics.EnsureInitialized();
}

/// <summary>
Expand Down
11 changes: 0 additions & 11 deletions test/OpenTelemetry.Tests/Shared/EventSourceTestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -150,11 +145,5 @@ private static IEnumerable<MethodInfo> GetEventMethods(EventSource eventSource)
MethodInfo[] methods = eventSource.GetType().GetMethods();
return methods.Where(m => m.GetCustomAttributes(typeof(EventAttribute), false).Any());
}

private static IEnumerable<MethodInfo> GetNonEventMethods(EventSource eventSource)
{
MethodInfo[] methods = eventSource.GetType().GetMethods();
return methods.Where(m => m.GetCustomAttributes(typeof(NonEventAttribute), false).Any());
}
}
}

0 comments on commit b815f55

Please sign in to comment.