@sentry/browser 5.29.2 → 5.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/bundle.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @sentry/browser 5.29.2 (6b4f304) | https://github.com/getsentry/sentry-javascript */
1
+ /*! @sentry/browser 5.30.0 (6de2dd4) | https://github.com/getsentry/sentry-javascript */
2
2
  var Sentry = (function (exports) {
3
3
  /*! *****************************************************************************
4
4
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -633,7 +633,7 @@ var Sentry = (function (exports) {
633
633
  * Truncates given string to the maximum characters count
634
634
  *
635
635
  * @param str An object that contains serializable values
636
- * @param max Maximum number of characters in truncated string
636
+ * @param max Maximum number of characters in truncated string (0 = unlimited)
637
637
  * @returns string Encoded
638
638
  */
639
639
  function truncate(str, max) {
@@ -690,15 +690,16 @@ var Sentry = (function (exports) {
690
690
  *
691
691
  * @param source An object that contains a method to be wrapped.
692
692
  * @param name A name of method to be wrapped.
693
- * @param replacement A function that should be used to wrap a given method.
693
+ * @param replacementFactory A function that should be used to wrap a given method, returning the wrapped method which
694
+ * will be substituted in for `source[name]`.
694
695
  * @returns void
695
696
  */
696
- function fill(source, name, replacement) {
697
+ function fill(source, name, replacementFactory) {
697
698
  if (!(name in source)) {
698
699
  return;
699
700
  }
700
701
  var original = source[name];
701
- var wrapped = replacement(original);
702
+ var wrapped = replacementFactory(original);
702
703
  // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work
703
704
  // otherwise it'll throw "TypeError: Object.defineProperties called on non-object"
704
705
  if (typeof wrapped === 'function') {
@@ -730,10 +731,10 @@ var Sentry = (function (exports) {
730
731
  .join('&');
731
732
  }
732
733
  /**
733
- * Transforms any object into an object literal with all it's attributes
734
+ * Transforms any object into an object literal with all its attributes
734
735
  * attached to it.
735
736
  *
736
- * @param value Initial source that we have to transform in order to be usable by the serializer
737
+ * @param value Initial source that we have to transform in order for it to be usable by the serializer
737
738
  */
738
739
  function getWalkSource(value) {
739
740
  if (isError(value)) {
@@ -3982,7 +3983,7 @@ var Sentry = (function (exports) {
3982
3983
  // 0.0 === 0% events are sent
3983
3984
  // Sampling for transaction happens somewhere else
3984
3985
  if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {
3985
- return SyncPromise.reject(new SentryError('This event has been sampled, will not send event.'));
3986
+ return SyncPromise.reject(new SentryError("Discarding event because it's not included in the random sample (sampling rate = " + sampleRate + ")"));
3986
3987
  }
3987
3988
  return this._prepareEvent(event, scope, hint)
3988
3989
  .then(function (prepared) {
@@ -6034,7 +6035,7 @@ var Sentry = (function (exports) {
6034
6035
  });
6035
6036
 
6036
6037
  var SDK_NAME = 'sentry.javascript.browser';
6037
- var SDK_VERSION = '5.29.2';
6038
+ var SDK_VERSION = '5.30.0';
6038
6039
 
6039
6040
  /**
6040
6041
  * The Sentry Browser SDK Client.