Http4sSpanNamer

trace4cats.http4s.common.Http4sSpanNamer$

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

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

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.

Attributes

Concrete fields

OpenTelemetry's recommended default for http clients