Skip to content

ExceptionTelemetry with large / deep stack traces are silently omitted #482

@larsgx

Description

@larsgx

When using the Logback appender ApplicationInsightsAppender and so indirectly the components of the applicationinsights-core artifact from
com.microsoft.azure:applicationinsights-logging-logback:1.0.9
com.microsoft.azure:applicationinsights-core:1.0.9
where is a problem with log statements that include an exception with deep / long stack traces (ExceptionTelemetry).

Deep stack traces are being serialized as event JSON object correctly which has been verified by debugging the applicationinsights-core code.
But when the resulting JSON of the parse stack (shown in Insights Analytics as "details.parsedStack" and stored in Java class ExceptionTelemetry.ExceptionData.ExceptionDetails.parsedStack) exceeds as certain size (which seems to be 32k according to https://github.com/Microsoft/ApplicationInsights-Home/blob/master/EndpointSpecs/Schemas/Docs/ExceptionData.md), the complete log statement is omitted and not shown in Azure Insights Analytics.

I'm not 100% sure if the ExceptionTelemetry is omitted by applicationinsights-core or by Azure Insights instance itself.
But everything indicates that Azure Insights is receiving the JSON and omitting it remotely.

Omitting an ExceptionTelemetry silently is a very problematic behaviour from a development and operations point of view.
The artifact applicationinsights-core or Application Insights itself should know and respect the Azure Insigts limits and provide a robust behaviour:
If stack traces exceed the given limits, at least the log statement without the deep "parsed stack trace" should be stored and shown in Analytics.
Otherwise application exceptions will never be recognized which is a no-go for a monitoring platform.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions