question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fast processes don't log everything to application insights

See original GitHub issue

Describe your environment. Python 3.6 with opencensus-ext-azure and logging integrations

Steps to reproduce. Log several messages at once and kill the process after

What is the expected behavior? Have all messages on Application Insights

What is the actual behavior? Some messages are not logged due to execution time.

Additional context. Tried to add a time.sleep(60) but it’s not enough.

Is there a way to guarantee that all the telemetry was sent before killing the process instead of just using a time.sleep ? Already tried to set handler = AzureLogHandler(export_interval=1.0) but it wasn’t enough.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lzchencommented, Apr 21, 2020

No there is no check to determine this.

1reaction
lzchencommented, Apr 21, 2020

I am assuming you are worried about the log telemetry being lost from the 1.0s interval between the last export and the process exiting. Setting export_interval=1.0 is as granular of reporting as you can get currently. We don’t have flushing of log telemetry on application exit as of yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot the Application Insights Profiler - Azure Monitor
In your Application Insights resource, select Search from the top menu ... If Profiler still isn't working for you, you can download the...
Read more >
Application Insights not logging custom events - Stack Overflow
TrackEvent("Visit HomePage", User.Identity.Name);. Edit: The above event is working, but the below one is not, it is not logging this one at all...
Read more >
No data reporting with Microsoft Application Insights
Solution · Remove all settings related to Application Insights from Application > Settings > Application Settings and Save. This may include the following...
Read more >
Structured Logging In Microsoft's Azure Application Insights
This becomes especially critical with automatic logging frameworks/SDKs like Application Insights. Azure Application Insights logs all the ...
Read more >
Rules to Better Application Insights - SSW
Application Insights can provide an overwhelming amount of errors in your web application, so use just-in-time bug processing to handle them. The goal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found