my operation name is blank in application insights

57 Views Asked by At

enter image description here

You can see I have non-null top 3 exception types on the right pane but on the left panel, the operation name is blank. I do have instrumentation keys. What's wrong?

I just checked my application insights logs and saw this.

1

There are 1 best solutions below

0
Suresh Chikkam On

You can see I have non-null top 3 exception types on the right pane but on the left panel, the operation name is blank.

In App insights<Investigate<Failures, Even I also didn't find operation name. I have created an application to get trigger dummy traces to find out operation_name.

enter image description here

  • Exception traces got triggered but there is no operation name there. I just modified my code with below lines.
namespace ConsoleApp14
{
    internal class Program
    {
        static void Main(string[] args)
        {
            // Initialize TelemetryClient with your instrumentation key
            TelemetryConfiguration configuration = TelemetryConfiguration.CreateDefault();
            configuration.InstrumentationKey = "feinvoednoenovepi";
            TelemetryClient telemetryClient = new TelemetryClient(configuration);

            try
            {
                // Simulate an operation
                var operation = telemetryClient.StartOperation<RequestTelemetry>("YourOperationName");

                // Simulate an exception
                throw new Exception("Simulated exception");
            }
            catch (Exception ex)
            {
                // Log the exception to Application Insights
                var exceptionTelemetry = new ExceptionTelemetry(ex);
                telemetryClient.TrackException(exceptionTelemetry);
            }
            finally
            {
                // Send the telemetry to Application Insights
                telemetryClient.Flush();
            }
        }
    }
}

After modification also I didn't find the operation_name in failures block.

Then I checked in Transaction search, Exceptions got triggers and navigate to view logs. Here I could find the operation name.

enter image description here

  • Here once check below 2 traces has no operation name those traces trigger before the code modification after that operation name got triggered with adding above code.

enter image description here

End-to-End transaction:

enter image description here