Skip to content

Add option to disable the logged warning if trace message exceeds Sanitizer.MAX_MESSAGE_LENGTH #1964

Closed
@Ramblurr

Description

@Ramblurr

This PR (#1021) added warnings when telemetry is truncated. This is fine, but it should be possible to turn the warnings off, or disable the warnings for certain types of telemetry.

In our case we have some large sql queries that trigger this truncation and fill our logs with this warning.

Expected behavior

We should be able to turn off the TelemetryTruncation logging.

Actual behavior

Our logs are filled with warnings like:

WARN c.m.a.a.i.common.TelemetryTruncation - In the last 5 minutes, the following warning has occurred 188 times: Telemetry was truncated:

To Reproduce

  1. Use the javaagent
  2. Have long sql queries

Sample Application

n/a

System information

Please provide the following information:

  • SDK Version: applicationinsights-agent-3.2.0.jar
  • OS type and version: Debian Docker
  • Application Server type and version (if applicable): tomcat
  • Using spring-boot? Yes
  • Additional relevant libraries (with version, if applicable): n/a

Logs

WARN c.m.a.a.i.common.TelemetryTruncation - In the last 5 minutes, the following warning has occurred 188 times: Telemetry was truncated:

Screenshots

n/a

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions