import os
import beeline
from django.apps import AppConfig


class BusTimesConfig(AppConfig):
    name = 'busstops'
    verbose_name = 'Bus Times'

    def ready(self):
        from . import signals  # noqa

        if os.environ.get('HONEYCOMB_KEY'):
            beeline.init(
                writekey=os.environ['HONEYCOMB_KEY'],
                dataset='bustimes',
                service_name='bustimes',
                sample_rate=40
            )

@@ -390,16 +390,57 @@
 ce_name=
+os.environ.get('HONEYCOMB_SERVICE_NAME', 
 'bustime
@@ -433,32 +433,33 @@
 AME', 'bustimes'
+)
 ,%0A              
@@ -476,10 +476,56 @@
 ate=
-40
+int(os.environ.get('HONEYCOMB_SAMPLE_RATE', 40))
 %0A   

make sample rate, service name configurable