code: private static boolean checkForSamplingProperties(Node node) {
          Set<Property> samplingProperties = node instanceof ContainerNode ?
                  ((ContainerNode) node).getPropertiesIncludingDescendants(Tags.SAMPLING_PRIORITY.getKey()) :
                  node.getProperties(Tags.SAMPLING_PRIORITY.getKey());
  
          for (Property prop: samplingProperties) {
              int priority = 0;
              try {
                  priority = Integer.parseInt(prop.getValue());
              } catch (NumberFormatException ex) {
                  // continue on error
              }
  
              if (priority > 0) {
                  return true;
              }
          }
  
          return false;
      }
docs: This method is looking for sampling tag in nodes properties to override current sampling.
  
  @param node It sh
  @return boolean whether trace should be sampled or not