Skip to content

Commit

Permalink
Azure Monitor Exporter: Rename (Azure#16056)
Browse files Browse the repository at this point in the history
* rename

* resolve merge conflicts

* rename, shorter project name

* merge conflicts

* Update Readme

* Rename folders

* Rename sln

* Update ci.yml

* API change

* Update API

Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
  • Loading branch information
TimothyMothra and rajkumar-rangaraj authored Oct 23, 2020
1 parent ff9473d commit 9fc81ef
Show file tree
Hide file tree
Showing 98 changed files with 207 additions and 186 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ VisualStudioVersion = 16.0.30330.147
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{8052009B-2126-44A3-88CD-4F3B17894C64}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.AzureMonitor", "src\OpenTelemetry.Exporter.AzureMonitor.csproj", "{00677EDC-1C5C-4C62-BEFD-9CF1D87195EA}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Monitor.OpenTelemetry.Exporter", "src\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.csproj", "{00677EDC-1C5C-4C62-BEFD-9CF1D87195EA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing", "tests\OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing\OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing.csproj", "{966EFB72-64D7-46D8-B592-9C141C5703F9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing", "tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing.csproj", "{966EFB72-64D7-46D8-B592-9C141C5703F9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.AzureMonitor.Tests", "tests\OpenTelemetry.Exporter.AzureMonitor.UnitTest\OpenTelemetry.Exporter.AzureMonitor.Tests.csproj", "{14546496-6144-49A5-9431-09611F38D30E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests", "tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.UnitTest\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj", "{14546496-6144-49A5-9431-09611F38D30E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp", "tests\OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp\OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp.csproj", "{E00C15D6-96E5-4A3B-8701-AC24292301CE}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Integration.Tests.AspNetCoreWebApp", "tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp\Integration.Tests.AspNetCoreWebApp.csproj", "{E00C15D6-96E5-4A3B-8701-AC24292301CE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.AzureMonitor.Integration.Tests", "tests\OpenTelemetry.Exporter.AzureMonitor.Integration.Tests\OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.csproj", "{3CB1B19D-1155-4E4E-9D97-3A7B2926DE2E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Integration.Tests", "tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests\Integration.Tests.csproj", "{3CB1B19D-1155-4E4E-9D97-3A7B2926DE2E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The [OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet)
Install the Azure Monitor Exporter for OpenTelemetry .NET with NuGet:

```shell
dotnet add package OpenTelemetry.Exporter.AzureMonitor
dotnet add package Microsoft.Azure.Monitor.OpenTelemetry.Exporter
```
### Authenticate the client

Expand All @@ -26,10 +26,10 @@ This exporter sends traces to the configured Azure Monitor Resource using HTTPS.

## Examples

Refer to [`DemoTrace.cs`](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/tests/OpenTelemetry.Exporter.AzureMonitor.Demo.Tracing/DemoTrace.cs) for a complete demo.
Refer to [`DemoTrace.cs`](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/monitor/Microsoft.Azure.Monitor.OpenTelemetry.Exporter/tests/Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Demo.Tracing/DemoTrace.cs) for a complete demo.

```csharp
using OpenTelemetry.Exporter.AzureMonitor;
using Microsoft.Azure.Monitor.OpenTelemetry.Exporter;
using OpenTelemetry.Trace;

OpenTelemetry.Sdk.CreateTracerProviderBuilder()
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Diagnostics;

namespace OpenTelemetry.Exporter.AzureMonitor
namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter
{
internal static class ActivityExtensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
using System.Threading;
using System.Threading.Tasks;
using Azure.Core;
using OpenTelemetry.Exporter.AzureMonitor.Models;
using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models;

namespace OpenTelemetry.Exporter.AzureMonitor
namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter
{
internal partial class ApplicationInsightsRestClient
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
using System.Linq;
using System.Runtime.CompilerServices;

using OpenTelemetry.Exporter.AzureMonitor.Models;
using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models;

using OpenTelemetry;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;

namespace OpenTelemetry.Exporter.AzureMonitor
namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter
{
/// <summary>
/// This class is responsible for converting an OpenTelemetry <see cref="Batch{T}"/> of <see cref="Activity"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using OpenTelemetry.Trace;
using System;

namespace OpenTelemetry.Exporter.AzureMonitor
namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter
{
/// <summary>
/// test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using Azure.Core;

namespace OpenTelemetry.Exporter.AzureMonitor
namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter
{
public class AzureMonitorExporterOptions : ClientOptions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@

using Azure.Core.Pipeline;

using OpenTelemetry;
using OpenTelemetry.Trace;

namespace OpenTelemetry.Exporter.AzureMonitor
namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter
{
public class AzureMonitorTraceExporter : ActivityExporter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Collections.Generic;
using System.Diagnostics.Tracing;

namespace OpenTelemetry.Exporter.AzureMonitor
namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter
{
[EventSource(Name = EventSourceName)]
internal sealed class AzureMonitorTraceExporterEventSource : EventSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

using Azure.Core;
using Azure.Core.Pipeline;

using OpenTelemetry.Exporter.AzureMonitor.ConnectionString;
using OpenTelemetry.Exporter.AzureMonitor.Models;
using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.ConnectionString;
using Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Models;

namespace OpenTelemetry.Exporter.AzureMonitor
namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter
{
/// <summary>
/// This class encapsulates transmitting a collection of <see cref="TelemetryItem"/> to the configured Ingestion Endpoint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
using System;
using System.Linq;

namespace OpenTelemetry.Exporter.AzureMonitor.ConnectionString
// This alias is necessary because it will otherwise try to default to "Microsoft.Azure.Core" which doesn't exist.
using AzureCoreConnectionString = Azure.Core.ConnectionString;

namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.ConnectionString
{
internal static class ConnectionStringParser
{
Expand All @@ -31,7 +34,7 @@ public static void GetValues(string connectionString, out string instrumentation
throw new ArgumentOutOfRangeException(nameof(connectionString), $"Values greater than {Constants.ConnectionStringMaxLength} characters are not allowed.");
}

var connString = Azure.Core.ConnectionString.Parse(connectionString);
var connString = AzureCoreConnectionString.Parse(connectionString);
instrumentationKey = connString.GetInstrumentationKey();
ingestionEndpoint = connString.GetIngestionEndpoint();
}
Expand All @@ -42,7 +45,7 @@ public static void GetValues(string connectionString, out string instrumentation
}
}

internal static string GetInstrumentationKey(this Azure.Core.ConnectionString connectionString) => connectionString.GetRequired(Constants.InstrumentationKeyKey);
internal static string GetInstrumentationKey(this AzureCoreConnectionString connectionString) => connectionString.GetRequired(Constants.InstrumentationKeyKey);

/// <summary>
/// Evaluate connection string and return the requested endpoint.
Expand All @@ -54,7 +57,7 @@ public static void GetValues(string connectionString, out string instrumentation
/// 3. use default endpoint (location is ignored)
/// This behavior is required by the Connection String Specification.
/// </remarks>
internal static string GetIngestionEndpoint(this Azure.Core.ConnectionString connectionString)
internal static string GetIngestionEndpoint(this AzureCoreConnectionString connectionString)
{
// Passing the user input values through the Uri constructor will verify that we've built a valid endpoint.
Uri uri;
Expand Down Expand Up @@ -116,9 +119,9 @@ internal static bool TryBuildUri(string prefix, string suffix, out Uri uri, stri
}

/// <summary>
/// This method wraps <see cref="Azure.Core.ConnectionString.GetNonRequired(string)"/> in a null check.
/// This method wraps <see cref="AzureCoreConnectionString.GetNonRequired(string)"/> in a null check.
/// </summary>
internal static bool TryGetNonRequiredValue(this Azure.Core.ConnectionString connectionString, string key, out string value)
internal static bool TryGetNonRequiredValue(this AzureCoreConnectionString connectionString, string key, out string value)
{
value = connectionString.GetNonRequired(key);
return value != null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

namespace OpenTelemetry.Exporter.AzureMonitor.ConnectionString
namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter.ConnectionString
{
internal static class Constants
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

namespace OpenTelemetry.Exporter.AzureMonitor
namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter
{
internal class EventLevelSuffix
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Globalization;
using System.Threading;

namespace OpenTelemetry.Exporter.AzureMonitor
namespace Microsoft.Azure.Monitor.OpenTelemetry.Exporter
{
internal static class ExceptionExtensions
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9fc81ef

Please sign in to comment.