Skip to content

Commit

Permalink
[Instrumentation.Runtime] Rename RuntimeInstrumentOptions to `Runti…
Browse files Browse the repository at this point in the history
…meInstrumentationOptions` (open-telemetry#556)

* Rename options object for Runtime Instrumentation
  • Loading branch information
xiang17 authored and samimusallam committed Aug 9, 2022
1 parent 93e2acc commit 59dcecf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Instrumentation.Runtime/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Rename `RuntimeInstrumentOptions` to `RuntimeInstrumentationOptions`
([#556](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/556))

## 1.0.0-rc.3

Released 2022-Jul-25
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ public static class MeterProviderBuilderExtensions
/// <returns>The instance of <see cref="MeterProviderBuilder"/> to chain the calls.</returns>
public static MeterProviderBuilder AddRuntimeInstrumentation(
this MeterProviderBuilder builder,
Action<RuntimeInstrumentOptions> configure = null)
Action<RuntimeInstrumentationOptions> configure = null)
{
Guard.ThrowIfNull(builder);

var options = new RuntimeInstrumentOptions();
var options = new RuntimeInstrumentationOptions();
configure?.Invoke(options);

var instrumentation = new RuntimeMetrics(options);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <copyright file="RuntimeInstrumentOptions.cs" company="OpenTelemetry Authors">
// <copyright file="RuntimeInstrumentationOptions.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -19,7 +19,7 @@ namespace OpenTelemetry.Instrumentation.Runtime
/// <summary>
/// Options to define the runtime metrics.
/// </summary>
public class RuntimeInstrumentOptions
public class RuntimeInstrumentationOptions
{
/*
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static RuntimeMetrics()
/// Initializes a new instance of the <see cref="RuntimeMetrics"/> class.
/// </summary>
/// <param name="options">The options to define the metrics.</param>
public RuntimeMetrics(RuntimeInstrumentOptions options)
public RuntimeMetrics(RuntimeInstrumentationOptions options)
{
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <copyright file="RuntimeInstrumentOptionsTests.cs" company="OpenTelemetry Authors">
// <copyright file="RuntimeInstrumentationOptionsTests.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -14,17 +14,15 @@
// limitations under the License.
// </copyright>

using Xunit;

namespace OpenTelemetry.Instrumentation.Runtime.Tests
{
public class RuntimeInstrumentOptionsTests
public class RuntimeInstrumentationOptionsTests
{
/*
[Fact]
public void Enable_All_If_Nothing_Was_Defined()
{
var options = new RuntimeInstrumentOptions();
var options = new RuntimeInstrumentationOptions();
Assert.True(options.IsGcEnabled);
#if NET6_0_OR_GREATER
Expand All @@ -40,7 +38,7 @@ public void Enable_All_If_Nothing_Was_Defined()
[Fact]
public void Enable_Gc_Only()
{
var options = new RuntimeInstrumentOptions { GcEnabled = true };
var options = new RuntimeInstrumentationOptions { GcEnabled = true };
Assert.True(options.IsGcEnabled);
#if NET6_0_OR_GREATER
Expand All @@ -57,7 +55,7 @@ public void Enable_Gc_Only()
[Fact]
public void Enable_Jit_Only()
{
var options = new RuntimeInstrumentOptions { JitEnabled = true };
var options = new RuntimeInstrumentationOptions { JitEnabled = true };
Assert.False(options.IsGcEnabled);
Assert.True(options.IsJitEnabled);
Expand All @@ -71,7 +69,7 @@ public void Enable_Jit_Only()
[Fact]
public void Enable_Threading_Only()
{
var options = new RuntimeInstrumentOptions { ThreadingEnabled = true };
var options = new RuntimeInstrumentationOptions { ThreadingEnabled = true };
Assert.False(options.IsGcEnabled);
#if NET6_0_OR_GREATER
Expand All @@ -86,7 +84,7 @@ public void Enable_Threading_Only()
[Fact]
public void Enable_Assemblies_Only()
{
var options = new RuntimeInstrumentOptions { AssembliesEnabled = true };
var options = new RuntimeInstrumentationOptions { AssembliesEnabled = true };
Assert.False(options.IsGcEnabled);
#if NET6_0_OR_GREATER
Expand All @@ -102,7 +100,7 @@ public void Enable_Assemblies_Only()
[Fact]
public void Enable_Multiple()
{
var options = new RuntimeInstrumentOptions { GcEnabled = true, AssembliesEnabled = true };
var options = new RuntimeInstrumentationOptions { GcEnabled = true, AssembliesEnabled = true };
Assert.True(options.IsGcEnabled);
#if NET6_0_OR_GREATER
Expand Down

0 comments on commit 59dcecf

Please sign in to comment.