Skip to content

Conversation

@JH108
Copy link
Contributor

@JH108 JH108 commented Sep 14, 2020

Added a default timeout to the makeHttpRequest method on apm-server
in the case, a payload or headers are passed to the function. Previously
the default timeout would only be applied if the third parameter was
not defined.

This will resolve the issue for #896

@ghost
Copy link

ghost commented Sep 14, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Started by user Vignesh Shanmugam, Replayed #4]

  • Start Time: 2020-09-16T14:54:31.978+0000

  • Duration: 75 min 58 sec

Test stats 🧪

Test Results
Failed 0
Passed 1016
Skipped 10
Total 1026

Steps errors

Expand to view the steps failures

  • Name: Start Elastic Stack 8.0.0-SNAPSHOT - @elastic/apm-rum-core - saucelabs

    • Description:

    • Duration: 7 min 33 sec

    • Start Time: 2020-09-16T15:20:35.348+0000

    • log

  • Name: Error signal

    • Description:

    • Duration: 0 min 0 sec

    • Start Time: 2020-09-16T15:27:08.206+0000

    • log

Copy link
Member

@vigneshshanmugam vigneshshanmugam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find, thanks a lot for digging the code. Could you change it to {timeout = 10000, payload, headers } = {} instead. Both should do the same job.

Added a default timeout to the makeHttpRequest method on apm-server in the case a payload or headers are passed to the function. Previously the default timeout would only be applied if the third parameter was not defined.
@JH108 JH108 force-pushed the fix-xhr-post-rn-android branch from 10d25c6 to 708d0ff Compare September 15, 2020 13:53
@JH108
Copy link
Contributor Author

JH108 commented Sep 15, 2020

Thanks! Yep, that will be cleaner. I made the change and it should be ready for review again.

@vigneshshanmugam vigneshshanmugam changed the title fix(rum-core): add default timeout for xhr post requests with a payload fix(rum-core): add default timeout for xhr post requests Sep 16, 2020
Copy link
Member

@vigneshshanmugam vigneshshanmugam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, Thanks once again @JH108

@ghost
Copy link

ghost commented Sep 16, 2020

📦 Bundlesize report

Filename Size(bundled) Size(gzip) Diff(gzip)
elastic-apm-opentracing.umd.min.js 61.1 KiB 19.4 KiB ⚠️ 1 Byte
elastic-apm-rum.umd.min.js 55.1 KiB 17.9 KiB 💚 0 Bytes
@vigneshshanmugam vigneshshanmugam merged commit e95a025 into elastic:master Sep 16, 2020
David-Development pushed a commit to David-Development/apm-agent-rum-js that referenced this pull request Oct 20, 2021
Added a default timeout to the makeHttpRequest method on apm-server in the case a payload or headers are passed to the function. Previously the default timeout would only be applied if the third parameter was not defined.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants