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

StringValueTooLong message:"string value is too long. It has been truncated to 1024 characters." props:"{value:/callback#access_token=<token>...} #66

Open
Gobbenobber opened this issue Dec 19, 2018 · 6 comments

Comments

@Gobbenobber
Copy link

Related to #49 - I am still getting warnings about a string being too long and thus truncated in versions 6+ of angular-application-insights.

I seems this issue was fixed in 5.0.4 but somehow it's made its way back in.

@Gobbenobber Gobbenobber changed the title StringValueTooLong message:"string value is too long. It has been truncated to 1024 characters." props:"{value:/callback#access_token=<token> StringValueTooLong message:"string value is too long. It has been truncated to 1024 characters." props:"{value:/callback#access_token=<token>...} Dec 19, 2018
@MarkPieszak
Copy link
Member

It seems like it's related to the applicationinsights-js underlying package itself, can we see if there's an issue over there - maybe they're working on it - if not we should definitely raise it up to them, maybe it's an easy fix we can get a PR in to fix it over there 👍

@StefH
Copy link

StefH commented Feb 13, 2019

I also have this warning.

Using :

  • "@angular/...": "~7.2.0"
  • "@markpieszak/ng-application-insights": "^7.0.1"

@MarkPieszak
Copy link
Member

It seems this may be an existing issue within ApplicationInsights-JS itself, microsoft/ApplicationInsights-JS#286

Are there many tracking events firing off too quickly that's maybe causing this to happen?

@StefH
Copy link

StefH commented Apr 14, 2019

This issue is now fixed? microsoft/ApplicationInsights-JS#751

However it's only in the 2.0.0 release, so you plan to upgrade this library to use the new version?

@MarkPieszak
Copy link
Member

Ahh I didn't see they moved to 2.0!
Ok let me make the necessary changes - hopefully there aren't too many big ones and I can get an upgrade for the library here.

@markwolff
Copy link

markwolff commented May 15, 2019

Just giving some context here from the JS SDK. App Insights limits the length of strings for telemetry. The warning only reflects the app insights world and the actual string is not truncated at all, only in the telemetry will it be truncated.

The referenced fix will not get rid of the warning. It only changed the fact that now the console warning shows the full, untruncated string. Disabling verboseLogging (or the equivalent for this SDK) should suppress the warning after the first time, but there doesn't seem to be a way to prevent it altogether.

For the 2.0.0 SDK, you can use the new consoleLoggingLevel config option and set it to 0 (this is the default) to disable all SDK console warnings from our end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants