Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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\OpenTelemetry.Exporter.AzureMonitor.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\OpenTelemetry.Exporter.AzureMonitor.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}") = "Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.AspNetCoreWebApp", "tests\OpenTelemetry.Exporter.AzureMonitor.Integration.Tests.AspNetCoreWebApp\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.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}") = "Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests", "tests\OpenTelemetry.Exporter.AzureMonitor.Integration.Tests\Microsoft.Azure.Monitor.OpenTelemetry.Exporter.Integration.Tests.csproj", "{3CB1B19D-1155-4E4E-9D97-3A7B2926DE2E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
2 changes: 1 addition & 1 deletion sdk/monitor/OpenTelemetry.Exporter.AzureMonitor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This exporter sends traces to the configured Azure Monitor Resource using HTTPS.
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.

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

OpenTelemetry.Sdk.CreateTracerProviderBuilder()
Expand Down
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 @@ -8,9 +8,9 @@
using System.Threading.Tasks;
using Azure;
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 @@ -4,7 +4,7 @@
using System;
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 @@ -6,12 +6,13 @@
using System.Threading;
using System.Threading.Tasks;

using Azure;
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 All @@ -36,7 +37,7 @@ public async ValueTask<int> TrackAsync(IEnumerable<TelemetryItem> telemetryItems
return 0;
}

Azure.Response<TrackResponse> response = null;
Response<TrackResponse> response = null;

try
{
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
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.

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

Loading