HTTPDataCollectorAPI 1.0.5

dotnet add package HTTPDataCollectorAPI --version 1.0.5                
NuGet\Install-Package HTTPDataCollectorAPI -Version 1.0.5                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HTTPDataCollectorAPI" Version="1.0.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HTTPDataCollectorAPI --version 1.0.5                
#r "nuget: HTTPDataCollectorAPI, 1.0.5"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install HTTPDataCollectorAPI as a Cake Addin
#addin nuget:?package=HTTPDataCollectorAPI&version=1.0.5

// Install HTTPDataCollectorAPI as a Cake Tool
#tool nuget:?package=HTTPDataCollectorAPI&version=1.0.5                

Azure Log Analytics HTTP Collector API wrapper

This package is a .Net adaptation of the Powershell code for implementing the HTTP Collector API for Azure Log Analytics as seen on the announcement.

Full API Documentation

Get it

You can obtain this project as a Nuget Package.

Install-Package HTTPDataCollectorAPI

Or reference it and use it according to the License.

Use it

Using it is simple:

var collector = new  HTTPDataCollectorAPI.Collector("{Your_Workspace_Id}", "{Your_Workspace_Key}");
await collector.Collect("TestLogType", "{\"TestAttribute\":\"TestValue\"}");

You can also pass serializable objects (they will be serialized with Newtonsoft.Json):

var anObject = new MySerializableClass(){
  MyIntAttribute = 4,
  MyStringAttribute = "hello",
  MyListAttribute = new List<string>(){"one","two"}
var collector = new  HTTPDataCollectorAPI.Collector("{Your_Workspace_Id}", "{Your_Workspace_Key}");
await collector.Collect("TestLogType", anObject);

If you are using a Depedency Injection mechanism (or ASP.NET Core) you can use the available interface. In ASP.NET Core for example:

public void ConfigureServices(IServiceCollection services)
  //... some other code
  services.AddSingleton<HTTPDataCollectorAPI.ICollector, HTTPDataCollectorAPI.Collector>();

Does it work on Azure Gov clouds?

Yes, just use the constructor overload to define the cloud service endpoint:

var collector = new  HTTPDataCollectorAPI.Collector("{Your_Workspace_Id}", "{Your_Workspace_Key}", "");


Please feel free to report any issues you might encounter. Keep in mind that this library won't assure that your JSON payloads are being indexed, it will make sure that the HTTP Data Collection API responds an Accept but there is no way (right now) to know when has the payload been indexed completely.

Supported Frameworks

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.3 is compatible.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 was computed.  netstandard2.1 was computed. 
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 is compatible.  net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on HTTPDataCollectorAPI:

Package Downloads

Azure LogAnalytics provider for Microsoft.Extensions.Logging


Componente para registro de log centralizado en Log Analytics.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.5 232,707 10/3/2018
1.0.4 38,099 6/16/2017
1.0.3 1,940 3/22/2017
1.0.2 1,103 3/17/2017
1.0.1 16,258 9/26/2016
1.0.0 1,112 9/2/2016