SttpSpanNamer

class Object
trait Matchable
class Any

Value members

Concrete methods

def methodWithPartiallyTransformedPath(transform: PartialFunction[String, String]): SttpSpanNamer

Similar to methodWithPath, but allows one to reduce the cardinality of the operation name by applying a transformation to each path segment, e.g.:

Similar to methodWithPath, but allows one to reduce the cardinality of the operation name by applying a transformation to each path segment, e.g.:

 methodWithPartiallyTransformedPath {
   case s if s.toLongOption.isDefined => "{long}"
   case s if scala.util.Try(java.util.UUID.fromString(s)).isSuccess => "{uuid}"
 }

Note that regex matching should generally be preferred over try-catching conversion failures.