Exporter - Zipkin Exporter¶
Export the spans data to Zipkin Collector.
-
class
opencensus.ext.zipkin.trace_exporter.
ZipkinExporter
(service_name='my_service', host_name='localhost', port=9411, endpoint='/api/v2/spans', protocol='http', transport=<class 'opencensus.common.transports.sync.SyncTransport'>, ipv4=None, ipv6=None)[source]¶ Bases:
opencensus.trace.base_exporter.Exporter
Export the spans to Zipkin.
See: http://zipkin.io/zipkin-api/#
- Parameters
service_name (str) -- Service that logged an annotation in a trace. Classifier when query for spans.
host_name (str) -- (Optional) The host name of the Zipkin server.
port (int) -- (Optional) The port of the Zipkin server.
end_point (str) -- (Optional) The path for the span exporting endpoint.
protocol (str) -- (Optional) The protocol used for the request.
transport (
type
) -- Class for creating new transport objects. It should extend from the base_exporterTransport
type and implementTransport.export()
. Defaults toSyncTransport
. The other option isAsyncTransport
.
-
emit
(span_datas)[source]¶ Send SpanData tuples to Zipkin server, default using the v2 API.
- Parameters
of opencensus.trace.span_data.SpanData span_datas (list) -- SpanData tuples to emit