Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Instrumentation.Runtime] Rename RuntimeInstrumentOptions to RuntimeInstrumentationOptions #556

Merged
merged 5 commits into from
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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