Uses the given
strategyName to determine and generate the
HttpTagAndSpanNamingStrategy that
should be used by this instance. This method looks for the following short names first:
-
ZIPKIN (or a null/blank
strategyName) - causes
#getZipkinHttpTagStrategy() to be
returned
-
OPENTRACING - causes
#getOpenTracingHttpTagStrategy() to be returned
-
NONE - causes
#getNoOpTagStrategy() to be returned
If
strategyName does not match any of those short names, then it is assumed to be a fully qualified
class name.
Class#forName(String) will be used to get the class, and then it will be instantiated
via
Class#newInstance() and cast to the necessary
HttpTagAndSpanNamingStrategy. This means a
class instantiated this way must have a default no-arg constructor and must extend
HttpTagAndSpanNamingStrategy.
NOTE: This method may throw a variety of exceptions if
strategyName does not match a short name,
and
Class#forName(String) or
Class#newInstance() fails to instantiate it as a fully qualified
class name (or if it was instantiated but couldn't be cast to the necessary
HttpTagAndSpanNamingStrategy). Callers should account for this possibility and have a reasonable default
fallback if an exception is thrown.