@@ -35,29 +35,17 @@ And add this line to the ``INSTALLED_APPS`` section:
3535 ' opencensus.ext.django' ,
3636 ]
3737
38- You can configure the sampler, exporter, propagator using the ``OPENCENSUS_TRACE `` setting in
39- ``settings.py ``:
38+ Additional configuration can be provided, please read
39+ `Customization <https://github.com/census-instrumentation/opencensus-python#customization >`_
40+ for a complete reference.
4041
4142.. code :: python
4243
43- OPENCENSUS_TRACE = {
44- ' SAMPLER' : ' opencensus.trace.samplers.probability.ProbabilitySampler' ,
45- ' REPORTER' : ' opencensus.trace.print_exporter.PrintExporter' ,
46- ' PROPAGATOR' : ' opencensus.trace.propagation.google_cloud_format.'
47- ' GoogleCloudFormatPropagator' ,
48- }
49-
50- You can configure the sampling rate and other parameters using the ``OPENCENSUS_TRACE_PARAMS ``
51- setting in ``settings.py ``:
52-
53- .. code :: python
54-
55- OPENCENSUS_TRACE_PARAMS = {
56- ' BLACKLIST_PATHS' : [' /_ah/health' ],
57- ' GCP_EXPORTER_PROJECT' : None ,
58- ' SAMPLING_RATE' : 0.5 ,
59- ' SERVICE_NAME' : ' my_service' ,
60- ' ZIPKIN_EXPORTER_HOST_NAME' : ' localhost' ,
61- ' ZIPKIN_EXPORTER_PORT' : 9411 ,
62- ' ZIPKIN_EXPORTER_PROTOCOL' : ' http' ,
44+ OPENCENSUS = {
45+ ' TRACE' : {
46+ ' SAMPLER' : ' opencensus.trace.samplers.ProbabilitySampler(rate=1)' ,
47+ ' EXPORTER' : ''' opencensus.ext.ocagent.trace_exporter.TraceExporter(
48+ service_name='foobar',
49+ )''' ,
50+ }
6351 }
0 commit comments