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

[App Insights] Adding Data Plane SDK #4088

Merged
merged 15 commits into from
Mar 1, 2018
Merged
Show file tree
Hide file tree
Changes from 14 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
54 changes: 23 additions & 31 deletions src/SDKs/ApplicationInsights/ApplicationInsights.sln
Original file line number Diff line number Diff line change
@@ -1,46 +1,38 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.3
VisualStudioVersion = 15.0.27130.2024
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationInsights.Tests", "ApplicationInsights.Tests\ApplicationInsights.Tests.csproj", "{D0BC5FFA-C113-4212-BE4A-F95CC8BB4D91}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Data.ApplicationInsights.Tests", "DataPlane\Data.ApplicationInsights.Tests\Data.ApplicationInsights.Tests.csproj", "{FA06A27D-4D07-4157-9C61-36BEBD67970D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.ApplicationInsights", "Management.ApplicationInsights\Microsoft.Azure.Management.ApplicationInsights.csproj", "{4A1E2ACF-218C-481F-A501-7BB3F3C0B873}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationInsights.Tests", "Management\ApplicationInsights.Tests\ApplicationInsights.Tests.csproj", "{6ECF131B-7B54-48EC-BC33-100AA82C4206}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.ApplicationInsights", "Management\Management.ApplicationInsights\Microsoft.Azure.Management.ApplicationInsights.csproj", "{218115E9-B94C-4CBE-9FE4-485DCA96C2FF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.ApplicationInsights", "DataPlane\ApplicationInsights\Microsoft.Azure.ApplicationInsights.csproj", "{69672630-2C7C-401F-B923-1D507BD63383}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Net45-Debug|Any CPU = Net45-Debug|Any CPU
Net45-Release|Any CPU = Net45-Release|Any CPU
Portable-Debug|Any CPU = Portable-Debug|Any CPU
Portable-Release|Any CPU = Portable-Release|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D0BC5FFA-C113-4212-BE4A-F95CC8BB4D91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0BC5FFA-C113-4212-BE4A-F95CC8BB4D91}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0BC5FFA-C113-4212-BE4A-F95CC8BB4D91}.Net45-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0BC5FFA-C113-4212-BE4A-F95CC8BB4D91}.Net45-Debug|Any CPU.Build.0 = Debug|Any CPU
{D0BC5FFA-C113-4212-BE4A-F95CC8BB4D91}.Net45-Release|Any CPU.ActiveCfg = Release|Any CPU
{D0BC5FFA-C113-4212-BE4A-F95CC8BB4D91}.Net45-Release|Any CPU.Build.0 = Release|Any CPU
{D0BC5FFA-C113-4212-BE4A-F95CC8BB4D91}.Portable-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0BC5FFA-C113-4212-BE4A-F95CC8BB4D91}.Portable-Debug|Any CPU.Build.0 = Debug|Any CPU
{D0BC5FFA-C113-4212-BE4A-F95CC8BB4D91}.Portable-Release|Any CPU.ActiveCfg = Release|Any CPU
{D0BC5FFA-C113-4212-BE4A-F95CC8BB4D91}.Portable-Release|Any CPU.Build.0 = Release|Any CPU
{D0BC5FFA-C113-4212-BE4A-F95CC8BB4D91}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0BC5FFA-C113-4212-BE4A-F95CC8BB4D91}.Release|Any CPU.Build.0 = Release|Any CPU
{4A1E2ACF-218C-481F-A501-7BB3F3C0B873}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A1E2ACF-218C-481F-A501-7BB3F3C0B873}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A1E2ACF-218C-481F-A501-7BB3F3C0B873}.Net45-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A1E2ACF-218C-481F-A501-7BB3F3C0B873}.Net45-Debug|Any CPU.Build.0 = Debug|Any CPU
{4A1E2ACF-218C-481F-A501-7BB3F3C0B873}.Net45-Release|Any CPU.ActiveCfg = Release|Any CPU
{4A1E2ACF-218C-481F-A501-7BB3F3C0B873}.Net45-Release|Any CPU.Build.0 = Release|Any CPU
{4A1E2ACF-218C-481F-A501-7BB3F3C0B873}.Portable-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A1E2ACF-218C-481F-A501-7BB3F3C0B873}.Portable-Debug|Any CPU.Build.0 = Debug|Any CPU
{4A1E2ACF-218C-481F-A501-7BB3F3C0B873}.Portable-Release|Any CPU.ActiveCfg = Release|Any CPU
{4A1E2ACF-218C-481F-A501-7BB3F3C0B873}.Portable-Release|Any CPU.Build.0 = Release|Any CPU
{4A1E2ACF-218C-481F-A501-7BB3F3C0B873}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A1E2ACF-218C-481F-A501-7BB3F3C0B873}.Release|Any CPU.Build.0 = Release|Any CPU
{FA06A27D-4D07-4157-9C61-36BEBD67970D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA06A27D-4D07-4157-9C61-36BEBD67970D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA06A27D-4D07-4157-9C61-36BEBD67970D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA06A27D-4D07-4157-9C61-36BEBD67970D}.Release|Any CPU.Build.0 = Release|Any CPU
{6ECF131B-7B54-48EC-BC33-100AA82C4206}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6ECF131B-7B54-48EC-BC33-100AA82C4206}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6ECF131B-7B54-48EC-BC33-100AA82C4206}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6ECF131B-7B54-48EC-BC33-100AA82C4206}.Release|Any CPU.Build.0 = Release|Any CPU
{218115E9-B94C-4CBE-9FE4-485DCA96C2FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{218115E9-B94C-4CBE-9FE4-485DCA96C2FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{218115E9-B94C-4CBE-9FE4-485DCA96C2FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{218115E9-B94C-4CBE-9FE4-485DCA96C2FF}.Release|Any CPU.Build.0 = Release|Any CPU
{69672630-2C7C-401F-B923-1D507BD63383}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{69672630-2C7C-401F-B923-1D507BD63383}.Debug|Any CPU.Build.0 = Debug|Any CPU
{69672630-2C7C-401F-B923-1D507BD63383}.Release|Any CPU.ActiveCfg = Release|Any CPU
{69672630-2C7C-401F-B923-1D507BD63383}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Microsoft.Rest;
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;

namespace Microsoft.Azure.ApplicationInsights
{
public class ApiKeyClientCredentials : ServiceClientCredentials
{
private string token;

public ApiKeyClientCredentials(string token)
{
if (string.IsNullOrEmpty(token))
{
throw new ArgumentException($"{nameof(token)} must not be null or empty");
}

this.token = token;
}

public override Task ProcessHttpRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
request.Headers.Add("x-api-key", token);
return Task.FromResult(true);
}
}
}
Loading