Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application Insight Ingestion API failed to track Exception when StackFrame do not have method information #2836

Open
thinh-ng opened this issue Dec 11, 2023 · 0 comments
Labels

Comments

@thinh-ng
Copy link

thinh-ng commented Dec 11, 2023

I'm encountering an issue where some specific exception does not tracked in Application Insight. I'm using SDK 2.21.0 with net6.0

Upon debugging, I see debug log did create the exception telemetry, and no warning/error be found, but the exception still not appear in Application Insight. I tried calling the ingestion with the telemetry data directly as follow:

POST https://southeastasia-1.in.applicationinsights.azure.com/v2/track

{
  ...
  "data": {
    ...
    "baseData": {
      ...
      "exceptions": [
        {
          ...
          "parsedStack": [
            {
              ...
              "level": 4,
              "assembly": "FastExpressionCompiler.LightExpression, Version=9.0.0.0, Culture=neutral, PublicKeyToken=null",
              "line": 0
            },
          ]
        }
      ]
    }
  }
}

Resulted in 400 response

{
    "itemsReceived": 1,
    "itemsAccepted": 0,
    "errors": [
        {
            "index": 0,
            "statusCode": 400,
            "message": "109: Field 'method' on type 'StackFrame' is required but missing or empty. Expected: string"
        }
    ]
}

I added "method": "n/a" in the request and the telemetry is tracked successfully. This is likely due to the method is being inlined, so the StackFrame cannot retrieve the method info

My question is:

  • Is this a bug in API side?
  • Is there a workaround that I can do to workaround this problem? There are a few exceptions that can't be track, and some of them I don't control the source code, so adding MethodImplOptions.NoInlining to the method is not always possible

If you need the full telemetry data I can provide it, I didn't post it here now as I'll have to redact some data from the telemetry

@thinh-ng thinh-ng added the bug label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant