-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Resources.Azure] Rename Azure detector namespace (#1840)
Co-authored-by: joegoldman2 <[email protected]>
- Loading branch information
1 parent
1d112c8
commit f1ec716
Showing
25 changed files
with
117 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
src/OpenTelemetry.ResourceDetectors.Azure/.publicApi/PublicAPI.Unshipped.txt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
src/OpenTelemetry.Resources.Azure/.publicApi/PublicAPI.Unshipped.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
OpenTelemetry.Resources.AzureResourceBuilderExtensions | ||
static OpenTelemetry.Resources.AzureResourceBuilderExtensions.AddAppServiceDetector(this OpenTelemetry.Resources.ResourceBuilder! builder) -> OpenTelemetry.Resources.ResourceBuilder! | ||
static OpenTelemetry.Resources.AzureResourceBuilderExtensions.AddAzureVMDetector(this OpenTelemetry.Resources.ResourceBuilder! builder) -> OpenTelemetry.Resources.ResourceBuilder! | ||
static OpenTelemetry.Resources.AzureResourceBuilderExtensions.AddAzureContainerAppsDetector(this OpenTelemetry.Resources.ResourceBuilder! builder) -> OpenTelemetry.Resources.ResourceBuilder! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using System.Runtime.CompilerServices; | ||
|
||
#if SIGNED | ||
[assembly: InternalsVisibleTo("OpenTelemetry.Resources.Azure.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010051c1562a090fb0c9f391012a32198b5e5d9a60e9b80fa2d7b434c9e5ccb7259bd606e66f9660676afc6692b8cdc6793d190904551d2103b7b22fa636dcbb8208839785ba402ea08fc00c8f1500ccef28bbf599aa64ffb1e1d5dc1bf3420a3777badfe697856e9d52070a50c3ea5821c80bef17ca3acffa28f89dd413f096f898")] | ||
#else | ||
[assembly: InternalsVisibleTo("OpenTelemetry.Resources.Azure.Tests")] | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/OpenTelemetry.Resources.Azure/AzureResourceBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using OpenTelemetry.Internal; | ||
using OpenTelemetry.Resources.Azure; | ||
|
||
namespace OpenTelemetry.Resources; | ||
|
||
/// <summary> | ||
/// Extension methods to simplify registering of Azure resource detectors. | ||
/// </summary> | ||
public static class AzureResourceBuilderExtensions | ||
{ | ||
/// <summary> | ||
/// Enables Azure AppService resource detector. | ||
/// </summary> | ||
/// <param name="builder"><see cref="ResourceBuilder" /> being configured.</param> | ||
/// <returns>The instance of <see cref="ResourceBuilder" /> being configured.</returns> | ||
public static ResourceBuilder AddAppServiceDetector(this ResourceBuilder builder) | ||
{ | ||
Guard.ThrowIfNull(builder); | ||
return builder.AddDetector(new AppServiceResourceDetector()); | ||
} | ||
|
||
/// <summary> | ||
/// Enables Azure VM resource detector. | ||
/// </summary> | ||
/// <param name="builder"><see cref="ResourceBuilder" /> being configured.</param> | ||
/// <returns>The instance of <see cref="ResourceBuilder" /> being configured.</returns> | ||
public static ResourceBuilder AddAzureVMDetector(this ResourceBuilder builder) | ||
{ | ||
Guard.ThrowIfNull(builder); | ||
return builder.AddDetector(new AzureVMResourceDetector()); | ||
} | ||
|
||
/// <summary> | ||
/// Enables Azure Container Apps resource detector. | ||
/// </summary> | ||
/// <param name="builder"><see cref="ResourceBuilder" /> being configured.</param> | ||
/// <returns>The instance of <see cref="ResourceBuilder" /> being configured.</returns> | ||
public static ResourceBuilder AddAzureContainerAppsDetector(this ResourceBuilder builder) | ||
{ | ||
Guard.ThrowIfNull(builder); | ||
return builder.AddDetector(new AzureContainerAppsResourceDetector()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ctors.Azure/ResourceAttributeConstants.cs → ...urces.Azure/ResourceAttributeConstants.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.