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.

Enrich TraceEvent to include invoked function name

See original GitHub issue

Here’s how we’re currently writing function invocation exceptions to Application Insights:

var logger = container.GetInstance<IExceptionLogger>();
var traceMonitor = new TraceMonitor()
    .Filter(e => e.Exception != null)
    .Subscribe(f =>
        {
            foreach (var e in f.Events.ToArray())
            {
                logger.LogException(e.Source, e.Exception.InnerException ?? e.Exception);
            }
        });

config.Tracing.Tracers.Add(traceMonitor);

The problem is that e.Source always equals to WebJobs.Execution. Is it possible to replace it with respectful function name, or add a new property if this would be a breaking change otherwise?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
abatishchevcommented, Sep 28, 2016

Please add! This will significantly improve the readability of the telemetry (we write logs and exceptions to AI).

0reactions
brettsamcommented, Oct 6, 2016

TraceEvent.Properties will now include function information – available properties found here: https://github.com/Azure/azure-webjobs-sdk/blob/master/src/Microsoft.Azure.WebJobs.Host/Loggers/TraceEventExtensions.cs

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging Lisp: trace options, break on conditions
trace allows us to see when a function was called, what arguments it ... To start tracing a function, just call trace with...
Read more >
Solved: W3C Trace context and log correlation
Solved: Hi Team, I have enabled W3C trace context headers in settings -> server side ... We have service invocation flow as following...
Read more >
The Common Lisp Cookbook – Debugging
trace allows us to see when a function was called, what arguments it received, and the value it returned. ... To untrace all...
Read more >
TraceEvent function (evntrace.h) - Win32 apps
A RegisterTraceGuids-based ("Classic") event provider uses the TraceEvent function to send a structured event to an event tracing session.
Read more >
events
Overview ¶. Invoked tracee-ebpf events from user mode. This utility can be useful to generate information needed by signatures that is not provided...
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