sampling.tsx 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. export enum DynamicSamplingBiasType {
  2. BOOST_ENVIRONMENTS = 'boostEnvironments',
  3. BOOST_LATEST_RELEASES = 'boostLatestRelease',
  4. BOOST_KEY_TRANSACTIONS = 'boostKeyTransactions',
  5. BOOST_LOW_VOLUME_TRANSACTIONS = 'boostLowVolumeTransactions',
  6. IGNORE_HEALTH_CHECKS = 'ignoreHealthChecks',
  7. }
  8. export type DynamicSamplingBias = {
  9. active: boolean;
  10. id: DynamicSamplingBiasType;
  11. };
  12. enum SamplingConditionOperator {
  13. /**
  14. * Combine multiple sub-conditions with the operator 'and'
  15. */
  16. AND = 'and',
  17. OR = 'or',
  18. }
  19. type DynamicSamplingConditionLogicalInner = {
  20. name: string;
  21. op: string;
  22. options: {
  23. ignoreCase: boolean;
  24. };
  25. value: string[];
  26. };
  27. type DynamicSamplingRuleCondition = {
  28. inner: DynamicSamplingConditionLogicalInner[];
  29. op: SamplingConditionOperator;
  30. };
  31. enum DynamicSamplingRuleType {
  32. /**
  33. * The rule applies to traces (transaction events considered in the context of a trace)
  34. */
  35. TRACE = 'trace',
  36. /**
  37. * The rule applies to transactions
  38. */
  39. TRANSACTION = 'transaction',
  40. }
  41. export type DynamicSamplingRule = {
  42. /**
  43. * Indicates if the rule is enabled or not
  44. */
  45. active: boolean;
  46. /**
  47. * It is a possibly empty list of conditions to which the rule applies
  48. */
  49. condition: DynamicSamplingRuleCondition;
  50. /**
  51. * This is a unique number within a project
  52. */
  53. id: number;
  54. /**
  55. * It is the sampling rate that is applied
  56. */
  57. sampleRate: number;
  58. /**
  59. * Describes the type of rule
  60. */
  61. type: DynamicSamplingRuleType;
  62. };