Skip to main content

OpenCensus exporter for Honeycomb

Project description

OpenCensus Python exporter for Honeycomb

A simple exporter to translate OpenCensus span data into Honeycomb traces.


import time
import os

from opencensus.trace import tracer as tracer_module
from ochoneycomb import HoneycombExporter

exporter = HoneycombExporter(writekey=os.getenv("HONEYCOMB_WRITEKEY"), dataset=os.getenv("HONEYCOMB_DATASET"), service_name="test-app")

# exporter = file_exporter.FileExporter(file_name='traces')

# Initialize a tracer, by default using the `PrintExporter`
tracer = tracer_module.Tracer(exporter=exporter)

def do_something_to_trace():

# Example for creating nested spans
with tracer.span(name='span1') as span1:
    with tracer.span(name='span1_child1') as span1_child1:
    with tracer.span(name='span1_child2') as span1_child2:
with tracer.span(name='span2') as span2:


pip install ochoneycomb


pip install opencensus
pip install libhoney

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ochoneycomb, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size ochoneycomb-0.0.1-py3-none-any.whl (7.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ochoneycomb-0.0.1.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page