The prefix can be overridden by any metric call by setting the
no_prefix keyword argument to true. We recommend against doing this,
but this behavior is retained for backwards compatibility.
Rather, when you feel the need to do this, we recommend instantiating
a new client without prefix (using clone_with_options), and using it
to emit the metric.
However, this does not work due to the way clone_with_options works:
def clone_with_options(prefix: nil, ...)
self.class.new(prefix: prefix || @prefix, ...)
end
So calling clone_with_options(prefix: nil) will maintain the same prefix as before.
The documentation for the
prefix
option statesHowever, this does not work due to the way
clone_with_options
works:So calling
clone_with_options(prefix: nil)
will maintain the same prefix as before.