Microsoftapplicationinsight.dll be edited in such a way to use it offline posting data to cloud












1















Im working for offline posting data to cloud azure. So by editing the dll can i do it?? Is there any way to edit the dll??










share|improve this question

























  • Why would you, there are numerous extension points in the SDK you can use. You could create your own TelemetryChannel for example. But offline telemetry collection won't be easy.

    – Peter Bons
    Jan 2 at 6:52











  • Possible duplicate of Can Application Insights be used off-line

    – Peter Bons
    Jan 2 at 6:53











  • @PeterBons, I see you have answered a similar issue before, could you please give some detailed instructions about it?

    – Ivan Yang
    Jan 2 at 7:09











  • Im using server telemetry channel.... folder is being created in the local disk but no logs are written to into the folder... can i know y is it not processed @PeterBons

    – sahithi yarrabothula
    Jan 2 at 8:19













  • Is it possible to post offline data using server telemetry channel or some other technique??? Can u plz give information about it??? @PeterBons

    – sahithi yarrabothula
    Jan 2 at 8:20
















1















Im working for offline posting data to cloud azure. So by editing the dll can i do it?? Is there any way to edit the dll??










share|improve this question

























  • Why would you, there are numerous extension points in the SDK you can use. You could create your own TelemetryChannel for example. But offline telemetry collection won't be easy.

    – Peter Bons
    Jan 2 at 6:52











  • Possible duplicate of Can Application Insights be used off-line

    – Peter Bons
    Jan 2 at 6:53











  • @PeterBons, I see you have answered a similar issue before, could you please give some detailed instructions about it?

    – Ivan Yang
    Jan 2 at 7:09











  • Im using server telemetry channel.... folder is being created in the local disk but no logs are written to into the folder... can i know y is it not processed @PeterBons

    – sahithi yarrabothula
    Jan 2 at 8:19













  • Is it possible to post offline data using server telemetry channel or some other technique??? Can u plz give information about it??? @PeterBons

    – sahithi yarrabothula
    Jan 2 at 8:20














1












1








1


0






Im working for offline posting data to cloud azure. So by editing the dll can i do it?? Is there any way to edit the dll??










share|improve this question
















Im working for offline posting data to cloud azure. So by editing the dll can i do it?? Is there any way to edit the dll??







azure azure-devops azure-application-insights wiki






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 31 at 4:43







sahithi yarrabothula

















asked Jan 2 at 4:08









sahithi yarrabothulasahithi yarrabothula

449




449













  • Why would you, there are numerous extension points in the SDK you can use. You could create your own TelemetryChannel for example. But offline telemetry collection won't be easy.

    – Peter Bons
    Jan 2 at 6:52











  • Possible duplicate of Can Application Insights be used off-line

    – Peter Bons
    Jan 2 at 6:53











  • @PeterBons, I see you have answered a similar issue before, could you please give some detailed instructions about it?

    – Ivan Yang
    Jan 2 at 7:09











  • Im using server telemetry channel.... folder is being created in the local disk but no logs are written to into the folder... can i know y is it not processed @PeterBons

    – sahithi yarrabothula
    Jan 2 at 8:19













  • Is it possible to post offline data using server telemetry channel or some other technique??? Can u plz give information about it??? @PeterBons

    – sahithi yarrabothula
    Jan 2 at 8:20



















  • Why would you, there are numerous extension points in the SDK you can use. You could create your own TelemetryChannel for example. But offline telemetry collection won't be easy.

    – Peter Bons
    Jan 2 at 6:52











  • Possible duplicate of Can Application Insights be used off-line

    – Peter Bons
    Jan 2 at 6:53











  • @PeterBons, I see you have answered a similar issue before, could you please give some detailed instructions about it?

    – Ivan Yang
    Jan 2 at 7:09











  • Im using server telemetry channel.... folder is being created in the local disk but no logs are written to into the folder... can i know y is it not processed @PeterBons

    – sahithi yarrabothula
    Jan 2 at 8:19













  • Is it possible to post offline data using server telemetry channel or some other technique??? Can u plz give information about it??? @PeterBons

    – sahithi yarrabothula
    Jan 2 at 8:20

















Why would you, there are numerous extension points in the SDK you can use. You could create your own TelemetryChannel for example. But offline telemetry collection won't be easy.

– Peter Bons
Jan 2 at 6:52





Why would you, there are numerous extension points in the SDK you can use. You could create your own TelemetryChannel for example. But offline telemetry collection won't be easy.

– Peter Bons
Jan 2 at 6:52













Possible duplicate of Can Application Insights be used off-line

– Peter Bons
Jan 2 at 6:53





Possible duplicate of Can Application Insights be used off-line

– Peter Bons
Jan 2 at 6:53













@PeterBons, I see you have answered a similar issue before, could you please give some detailed instructions about it?

– Ivan Yang
Jan 2 at 7:09





@PeterBons, I see you have answered a similar issue before, could you please give some detailed instructions about it?

– Ivan Yang
Jan 2 at 7:09













Im using server telemetry channel.... folder is being created in the local disk but no logs are written to into the folder... can i know y is it not processed @PeterBons

– sahithi yarrabothula
Jan 2 at 8:19







Im using server telemetry channel.... folder is being created in the local disk but no logs are written to into the folder... can i know y is it not processed @PeterBons

– sahithi yarrabothula
Jan 2 at 8:19















Is it possible to post offline data using server telemetry channel or some other technique??? Can u plz give information about it??? @PeterBons

– sahithi yarrabothula
Jan 2 at 8:20





Is it possible to post offline data using server telemetry channel or some other technique??? Can u plz give information about it??? @PeterBons

– sahithi yarrabothula
Jan 2 at 8:20












1 Answer
1






active

oldest

votes


















1














Yes, this is possible, but it depends on the situation.



Scenario 1



If you are dealing with an application that can sometimes loose its netwerk connectivity then you can use the ServerTelemetryChannel.



Scenario 2



If you want to store the telemetry offline in a central place and have a seperate process send the telemetry to Application Insigths, then no, there is no out-of-the box solution for this. See this question as well.



Now, for the first scenario this will work:



using System;
using System.Threading;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel;

namespace OfflineApplicationInsights
{
class Program
{
static void Main(string args)
{
var upc = new UsingPersistenceChannel();
upc.Log("Test1");
upc.Log("Test2");
upc.Log("Test3");
upc.Log("Test4");

Console.ReadLine();

upc.Flush();

Thread.Sleep(2000);
}
}

public class UsingPersistenceChannel
{
private readonly TelemetryClient _client;

public UsingPersistenceChannel()
{
var config = new TelemetryConfiguration("[your key here]");
var telemetryChannel = new ServerTelemetryChannel
{
StorageFolder = @"C:Tempai-offline",
DeveloperMode = false,
MaxTelemetryBufferCapacity = 1
};

config.TelemetryChannel = telemetryChannel;
telemetryChannel.Initialize(config);

_client = new TelemetryClient(config)
{
InstrumentationKey = "[your key here]"
};
}

public void Log(string msg)
{
_client.TrackTrace(msg);
}

public void Flush()
{
_client.Flush();
}
}
}


But, there is a bug that prevents this from working sometimes. For me, it only works if I disable(!) all network adapters using the Windows configuration panel via Control PanelNetwork and InternetNetwork Connections



If you would to disable your network and run this program you will see some files appearing in the specified folder. Restore the network and run the application again and you will notice that the files will disappear because they are picked up by the program and send once netwerk activity is detected. At least this is how I tested it.






share|improve this answer


























  • tq so much it helped me a lot :)

    – sahithi yarrabothula
    Jan 3 at 3:12











  • Why network adapters should be disable can u plz let me know..... @Peter Bons

    – sahithi yarrabothula
    Jan 3 at 6:17











  • @sahithiyarrabothula well, for me it was the only way I got it working. If you read the bug report I linked to in my answer you can find some more details. It is planned to be fixed in the next release

    – Peter Bons
    Jan 3 at 6:56











  • Why first click is not collected @Peter Bons

    – sahithi yarrabothula
    Jan 4 at 8:44











  • I do not know. What do you mean with first click?

    – Peter Bons
    Jan 4 at 8:45











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54001089%2fmicrosoftapplicationinsight-dll-be-edited-in-such-a-way-to-use-it-offline-postin%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Yes, this is possible, but it depends on the situation.



Scenario 1



If you are dealing with an application that can sometimes loose its netwerk connectivity then you can use the ServerTelemetryChannel.



Scenario 2



If you want to store the telemetry offline in a central place and have a seperate process send the telemetry to Application Insigths, then no, there is no out-of-the box solution for this. See this question as well.



Now, for the first scenario this will work:



using System;
using System.Threading;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel;

namespace OfflineApplicationInsights
{
class Program
{
static void Main(string args)
{
var upc = new UsingPersistenceChannel();
upc.Log("Test1");
upc.Log("Test2");
upc.Log("Test3");
upc.Log("Test4");

Console.ReadLine();

upc.Flush();

Thread.Sleep(2000);
}
}

public class UsingPersistenceChannel
{
private readonly TelemetryClient _client;

public UsingPersistenceChannel()
{
var config = new TelemetryConfiguration("[your key here]");
var telemetryChannel = new ServerTelemetryChannel
{
StorageFolder = @"C:Tempai-offline",
DeveloperMode = false,
MaxTelemetryBufferCapacity = 1
};

config.TelemetryChannel = telemetryChannel;
telemetryChannel.Initialize(config);

_client = new TelemetryClient(config)
{
InstrumentationKey = "[your key here]"
};
}

public void Log(string msg)
{
_client.TrackTrace(msg);
}

public void Flush()
{
_client.Flush();
}
}
}


But, there is a bug that prevents this from working sometimes. For me, it only works if I disable(!) all network adapters using the Windows configuration panel via Control PanelNetwork and InternetNetwork Connections



If you would to disable your network and run this program you will see some files appearing in the specified folder. Restore the network and run the application again and you will notice that the files will disappear because they are picked up by the program and send once netwerk activity is detected. At least this is how I tested it.






share|improve this answer


























  • tq so much it helped me a lot :)

    – sahithi yarrabothula
    Jan 3 at 3:12











  • Why network adapters should be disable can u plz let me know..... @Peter Bons

    – sahithi yarrabothula
    Jan 3 at 6:17











  • @sahithiyarrabothula well, for me it was the only way I got it working. If you read the bug report I linked to in my answer you can find some more details. It is planned to be fixed in the next release

    – Peter Bons
    Jan 3 at 6:56











  • Why first click is not collected @Peter Bons

    – sahithi yarrabothula
    Jan 4 at 8:44











  • I do not know. What do you mean with first click?

    – Peter Bons
    Jan 4 at 8:45
















1














Yes, this is possible, but it depends on the situation.



Scenario 1



If you are dealing with an application that can sometimes loose its netwerk connectivity then you can use the ServerTelemetryChannel.



Scenario 2



If you want to store the telemetry offline in a central place and have a seperate process send the telemetry to Application Insigths, then no, there is no out-of-the box solution for this. See this question as well.



Now, for the first scenario this will work:



using System;
using System.Threading;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel;

namespace OfflineApplicationInsights
{
class Program
{
static void Main(string args)
{
var upc = new UsingPersistenceChannel();
upc.Log("Test1");
upc.Log("Test2");
upc.Log("Test3");
upc.Log("Test4");

Console.ReadLine();

upc.Flush();

Thread.Sleep(2000);
}
}

public class UsingPersistenceChannel
{
private readonly TelemetryClient _client;

public UsingPersistenceChannel()
{
var config = new TelemetryConfiguration("[your key here]");
var telemetryChannel = new ServerTelemetryChannel
{
StorageFolder = @"C:Tempai-offline",
DeveloperMode = false,
MaxTelemetryBufferCapacity = 1
};

config.TelemetryChannel = telemetryChannel;
telemetryChannel.Initialize(config);

_client = new TelemetryClient(config)
{
InstrumentationKey = "[your key here]"
};
}

public void Log(string msg)
{
_client.TrackTrace(msg);
}

public void Flush()
{
_client.Flush();
}
}
}


But, there is a bug that prevents this from working sometimes. For me, it only works if I disable(!) all network adapters using the Windows configuration panel via Control PanelNetwork and InternetNetwork Connections



If you would to disable your network and run this program you will see some files appearing in the specified folder. Restore the network and run the application again and you will notice that the files will disappear because they are picked up by the program and send once netwerk activity is detected. At least this is how I tested it.






share|improve this answer


























  • tq so much it helped me a lot :)

    – sahithi yarrabothula
    Jan 3 at 3:12











  • Why network adapters should be disable can u plz let me know..... @Peter Bons

    – sahithi yarrabothula
    Jan 3 at 6:17











  • @sahithiyarrabothula well, for me it was the only way I got it working. If you read the bug report I linked to in my answer you can find some more details. It is planned to be fixed in the next release

    – Peter Bons
    Jan 3 at 6:56











  • Why first click is not collected @Peter Bons

    – sahithi yarrabothula
    Jan 4 at 8:44











  • I do not know. What do you mean with first click?

    – Peter Bons
    Jan 4 at 8:45














1












1








1







Yes, this is possible, but it depends on the situation.



Scenario 1



If you are dealing with an application that can sometimes loose its netwerk connectivity then you can use the ServerTelemetryChannel.



Scenario 2



If you want to store the telemetry offline in a central place and have a seperate process send the telemetry to Application Insigths, then no, there is no out-of-the box solution for this. See this question as well.



Now, for the first scenario this will work:



using System;
using System.Threading;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel;

namespace OfflineApplicationInsights
{
class Program
{
static void Main(string args)
{
var upc = new UsingPersistenceChannel();
upc.Log("Test1");
upc.Log("Test2");
upc.Log("Test3");
upc.Log("Test4");

Console.ReadLine();

upc.Flush();

Thread.Sleep(2000);
}
}

public class UsingPersistenceChannel
{
private readonly TelemetryClient _client;

public UsingPersistenceChannel()
{
var config = new TelemetryConfiguration("[your key here]");
var telemetryChannel = new ServerTelemetryChannel
{
StorageFolder = @"C:Tempai-offline",
DeveloperMode = false,
MaxTelemetryBufferCapacity = 1
};

config.TelemetryChannel = telemetryChannel;
telemetryChannel.Initialize(config);

_client = new TelemetryClient(config)
{
InstrumentationKey = "[your key here]"
};
}

public void Log(string msg)
{
_client.TrackTrace(msg);
}

public void Flush()
{
_client.Flush();
}
}
}


But, there is a bug that prevents this from working sometimes. For me, it only works if I disable(!) all network adapters using the Windows configuration panel via Control PanelNetwork and InternetNetwork Connections



If you would to disable your network and run this program you will see some files appearing in the specified folder. Restore the network and run the application again and you will notice that the files will disappear because they are picked up by the program and send once netwerk activity is detected. At least this is how I tested it.






share|improve this answer















Yes, this is possible, but it depends on the situation.



Scenario 1



If you are dealing with an application that can sometimes loose its netwerk connectivity then you can use the ServerTelemetryChannel.



Scenario 2



If you want to store the telemetry offline in a central place and have a seperate process send the telemetry to Application Insigths, then no, there is no out-of-the box solution for this. See this question as well.



Now, for the first scenario this will work:



using System;
using System.Threading;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel;

namespace OfflineApplicationInsights
{
class Program
{
static void Main(string args)
{
var upc = new UsingPersistenceChannel();
upc.Log("Test1");
upc.Log("Test2");
upc.Log("Test3");
upc.Log("Test4");

Console.ReadLine();

upc.Flush();

Thread.Sleep(2000);
}
}

public class UsingPersistenceChannel
{
private readonly TelemetryClient _client;

public UsingPersistenceChannel()
{
var config = new TelemetryConfiguration("[your key here]");
var telemetryChannel = new ServerTelemetryChannel
{
StorageFolder = @"C:Tempai-offline",
DeveloperMode = false,
MaxTelemetryBufferCapacity = 1
};

config.TelemetryChannel = telemetryChannel;
telemetryChannel.Initialize(config);

_client = new TelemetryClient(config)
{
InstrumentationKey = "[your key here]"
};
}

public void Log(string msg)
{
_client.TrackTrace(msg);
}

public void Flush()
{
_client.Flush();
}
}
}


But, there is a bug that prevents this from working sometimes. For me, it only works if I disable(!) all network adapters using the Windows configuration panel via Control PanelNetwork and InternetNetwork Connections



If you would to disable your network and run this program you will see some files appearing in the specified folder. Restore the network and run the application again and you will notice that the files will disappear because they are picked up by the program and send once netwerk activity is detected. At least this is how I tested it.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 2 at 12:55

























answered Jan 2 at 11:11









Peter BonsPeter Bons

10.2k32344




10.2k32344













  • tq so much it helped me a lot :)

    – sahithi yarrabothula
    Jan 3 at 3:12











  • Why network adapters should be disable can u plz let me know..... @Peter Bons

    – sahithi yarrabothula
    Jan 3 at 6:17











  • @sahithiyarrabothula well, for me it was the only way I got it working. If you read the bug report I linked to in my answer you can find some more details. It is planned to be fixed in the next release

    – Peter Bons
    Jan 3 at 6:56











  • Why first click is not collected @Peter Bons

    – sahithi yarrabothula
    Jan 4 at 8:44











  • I do not know. What do you mean with first click?

    – Peter Bons
    Jan 4 at 8:45



















  • tq so much it helped me a lot :)

    – sahithi yarrabothula
    Jan 3 at 3:12











  • Why network adapters should be disable can u plz let me know..... @Peter Bons

    – sahithi yarrabothula
    Jan 3 at 6:17











  • @sahithiyarrabothula well, for me it was the only way I got it working. If you read the bug report I linked to in my answer you can find some more details. It is planned to be fixed in the next release

    – Peter Bons
    Jan 3 at 6:56











  • Why first click is not collected @Peter Bons

    – sahithi yarrabothula
    Jan 4 at 8:44











  • I do not know. What do you mean with first click?

    – Peter Bons
    Jan 4 at 8:45

















tq so much it helped me a lot :)

– sahithi yarrabothula
Jan 3 at 3:12





tq so much it helped me a lot :)

– sahithi yarrabothula
Jan 3 at 3:12













Why network adapters should be disable can u plz let me know..... @Peter Bons

– sahithi yarrabothula
Jan 3 at 6:17





Why network adapters should be disable can u plz let me know..... @Peter Bons

– sahithi yarrabothula
Jan 3 at 6:17













@sahithiyarrabothula well, for me it was the only way I got it working. If you read the bug report I linked to in my answer you can find some more details. It is planned to be fixed in the next release

– Peter Bons
Jan 3 at 6:56





@sahithiyarrabothula well, for me it was the only way I got it working. If you read the bug report I linked to in my answer you can find some more details. It is planned to be fixed in the next release

– Peter Bons
Jan 3 at 6:56













Why first click is not collected @Peter Bons

– sahithi yarrabothula
Jan 4 at 8:44





Why first click is not collected @Peter Bons

– sahithi yarrabothula
Jan 4 at 8:44













I do not know. What do you mean with first click?

– Peter Bons
Jan 4 at 8:45





I do not know. What do you mean with first click?

– Peter Bons
Jan 4 at 8:45




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54001089%2fmicrosoftapplicationinsight-dll-be-edited-in-such-a-way-to-use-it-offline-postin%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith