sampling.tsx 1.4 KB

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