0
votes

my main goal is to get the log file content created by my application written in C++ (using the boost logging) straight into Azure's Application Insights (Transaction diagnostics). I fail to find a clear cut solution. There seems to be no C++ library available for submitting log entries to Application Insights. There seems to be no library for a log sink for boost logging that writes the logs to Azure. The REST API description for Application Insights does not feature anything that reads like submitting custom data to application insights. Microsoft's REST API does not have any macros or functions for submitting something specific to Insights as well. It is a bit sad, since using the application insights module for node.js is delivering everything you could want to application insights.

Any help is appreciated for getting a log line written directly to Application Insights, so I could tag the information with source server, component etc..

Thanks!

1
I recommend you to write a simple middleware program to expose custom api for your c++ program so that you can use an application insights supported programming language to provide sending custom metric service for your c++ program. If you feel my suggestion is helpful to you, could you pls accept it as the answer? Thanks in advance.tiny-wa

1 Answers

0
votes

I'm afraid there's no rest api for sending custom log metric. Official doc doesn't mentioned c++ as one of the supported programing language till now

Application insights don't provide rest api for unsupported platforms and languages to send metric to azure.

enter image description here

I think you may try some other plans instead. First, you may choose to deploy your c++ application into VM, but I think it's not flexible and unfriendly for developing. Another way is that you may create a middleware program with app insights supported platform such as nodejs/java etc. The middleware program could provide service like a custom rest api so that you can call these api to achieve your goal. For example, when you call localhost:8080/sendCustomMetric, you can send your metric information to app insights via this api, and the api writes code to receive requests' information and send it to app insights.