Interface MetricBatchSenderFactory


  • public interface MetricBatchSenderFactory
    A factory interface for creating a MetricBatchSender.

    Concrete implementations use different HTTP providers.

    • Method Detail

      • createBatchSender

        default MetricBatchSender createBatchSender​(java.lang.String apiKey)
        Create a new MetricBatchSender with your New Relic Insights Insert API key, and otherwise default settings. (2 second timeout, audit logging off, with the default endpoint URL)
        Parameters:
        apiKey - new relic api key
        Returns:
        a new metric batch sender instance
        See Also:
        New Relic API Keys
      • configureWith

        default SenderConfiguration.SenderConfigurationBuilder configureWith​(BaseConfig baseConfig)
        Creates a new SenderConfigurationBuilder to help with constructing a MetricBatchSender. This builder is configured with data from the BaseConfig, including the apiKey, audit logging dis/enabled, and secondary user agent (which may be null).
        Parameters:
        baseConfig - a BaseConfig with settings to apply to the new builder
        Returns:
        a new SenderConfigurationBuilder with the config applied