-
Notifications
You must be signed in to change notification settings - Fork 60
feat: remove 512 message truncate limit #538
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
Open
miquelbeltran
wants to merge
6
commits into
master
Choose a base branch
from
fix/483
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c7375ff
wip tests for 512 truncate
miquelbeltran 7e83699
removed 512 truncate limit
miquelbeltran 27a696e
cleanup
miquelbeltran 0dfb0b9
revert script url
miquelbeltran 3909af8
Merge branch 'master' into fix/483
miquelbeltran b82c044
simplified example
miquelbeltran File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <title>Raygun Crash Reporting - Large Payload Example</title> | ||
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> | ||
| <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> | ||
|
|
||
| <script type="text/javascript"> | ||
| !function (a, b, c, d, e, f, g, h) { | ||
| a.RaygunObject = e, a[e] = a[e] || function () { | ||
| (a[e].o = a[e].o || []).push(arguments) | ||
| }, f = b.createElement(c), g = b.getElementsByTagName(c)[0], | ||
| f.async = 1, f.src = d, g.parentNode.insertBefore(f, g), h = a.onerror, a.onerror = function (b, c, d, f, g) { | ||
| h && h(b, c, d, f, g), g || (g = new Error(b)), a[e].q = a[e].q || [], a[e].q.push({ | ||
| e: g | ||
| }) | ||
| } | ||
| }(window, document, "script", "http://cdn.raygun.io/raygun4js/raygun.min.js", "rg4js"); | ||
| </script> | ||
| </head> | ||
| <body> | ||
|
|
||
| <div class="container"> | ||
| <div class="header clearfix"> | ||
| <br> | ||
| </div> | ||
|
|
||
| <div class="jumbotron"> | ||
| <h1 class="text-center">Raygun4JS - Large Payload Support</h1> | ||
| <p class="text-center"> | ||
| This example demonstrates that Raygun4JS now supports error messages longer than 512 characters. | ||
| </p> | ||
|
|
||
| <div class="row"> | ||
| <div class="col-md-4"> | ||
| <p class="text-center"> | ||
| <button class="btn btn-lg btn-primary" id="ShortErrorButton" role="button"> | ||
| Short Error (< 512 chars) | ||
| </button> | ||
| </p> | ||
| </div> | ||
| <div class="col-md-4"> | ||
| <p class="text-center"> | ||
| <button class="btn btn-lg btn-danger" id="LargeErrorButton" role="button"> | ||
| Large Error (> 1000 chars) | ||
| </button> | ||
| </p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <script type="text/javascript"> | ||
| rg4js('apiKey', 'paste_your_api_key_here'); | ||
| rg4js('enableCrashReporting', true); | ||
| </script> | ||
|
|
||
| <script type="text/javascript"> | ||
| $(function () { | ||
| $('#ShortErrorButton').click(function () { | ||
| var shortMessage = "This is a short error message that is less than 512 characters long."; | ||
| console.log("Sending short error (" + shortMessage.length + " characters)"); | ||
| Raygun.send(new Error(shortMessage)); | ||
| }); | ||
|
|
||
| $('#LargeErrorButton').click(function () { | ||
| var largeMessage = "This is a long error message that exceeds 512 characters.\n".repeat(20); | ||
| console.log("Sending large error (" + largeMessage.length + " characters)"); | ||
| Raygun.send(new Error(largeMessage)); | ||
| }); | ||
| }); | ||
| </script> | ||
|
|
||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <title>Raygun4JS with V2 API - Very Long Message Test</title> | ||
| <script src="/fixtures/common/instrumentXHRs.js"></script> | ||
| <script type="text/javascript"> | ||
| !function(a,b,c,d,e,f,g,h){a.RaygunObject=e,a[e]=a[e]||function(){ | ||
| (a[e].o=a[e].o||[]).push(arguments)},f=b.createElement(c),g=b.getElementsByTagName(c)[0], | ||
| f.async=1,f.src=d,g.parentNode.insertBefore(f,g),h=a.onerror,a.onerror=function(b,c,d,f,g){ | ||
| h&&h(b,c,d,f,g),g||(g=new Error(b)),a[e].q=a[e].q||[],a[e].q.push({ | ||
| e:g})}}(window,document,"script","/dist/raygun.js","rg4js"); | ||
| </script> | ||
| </head> | ||
| <body> | ||
| <script type="text/javascript"> | ||
| rg4js('apiKey', 'abcdef=='); | ||
| rg4js('enableCrashReporting', true); | ||
|
|
||
| setTimeout(function () { | ||
| // Create a message much longer than 1000 characters | ||
| var veryLongMessage = "This is a very long error message designed to test that the 512 character limit has been removed from Raygun4JS. ".repeat(15) + "This final part should ensure we're well over 1000 characters to test large payload support thoroughly."; | ||
| rg4js('send', veryLongMessage); | ||
| }, 1000); | ||
| </script> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| var _ = require('underscore'); | ||
|
|
||
| describe("Large payload support tests for v2 manual send", function() { | ||
|
|
||
| it("supports very large error messages (>1000 characters)", async function () { | ||
| await browser.url('http://localhost:4567/fixtures/v2/manualSendVeryLongMessage.html'); | ||
|
|
||
| await browser.pause(4000); | ||
|
|
||
| var requestPayloads = await browser.execute(function () { | ||
| return window.__requestPayloads; | ||
| }); | ||
|
|
||
| var passes = _.any(requestPayloads, function (payload) { | ||
| return payload.Details.Error.Message.length > 1000; | ||
| }); | ||
|
|
||
| expect(passes).toBe(true); | ||
| }); | ||
| }); | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.