Related to #34. Avoid calling getMetadata if trace is not enabled.