Muhammed Afsal
Muhammed Afsal

Reputation: 1191

How to send Telemetry data from custom end point to azure application insight

I am working with WPF application with client server architecture we not provide internet for client machines so i implemented application telemetry in client WPF application with custom end point and it will send to our local server (on-premise) now i want to send this telemetry data into azure cloud(server have internet connection)

Upvotes: 1

Views: 1042

Answers (1)

krishg
krishg

Reputation: 6508

Depending on what language/platform your on-premise server application is written with, you can pick up the corresponding Application Insights SDK and write custom code using TelemetryClient to send telemetry to application insights.

UPDATE on follow up: At the client end, you can serialize the whole telemetry object like below and then POST to your custom endpoint.

var traceTelemetry = new TraceTelemetry("test message", SeverityLevel.Critical);
traceTelemetry.Context.Cloud.RoleInstance = "test";
var traceTelemetrySerialized = JsonConvert.SerializeObject(traceTelemetry);

Then you can deserialize at the service end and then send to AI:

var traceTelemetryDeserialized = JsonConvert.DeserializeObject<TraceTelemetry>(traceTelemetrySerialized);
telemetryClient.TrackTrace(traceTelemetryDeserialized);

Upvotes: 2

Related Questions