The Exporter can be initialized using sdktrace.WithSyncer
:
exporter, _ := honeycomb.NewExporter(
honeycomb.Config{
APIKey: <YOUR-API-KEY>,
},
honeycomb.TargetingDataset(<YOUR-DATASET>),
honeycomb.WithServiceName("example-server"),
honeycomb.WithDebugEnabled()) // optional to output diagnostic logs to STDOUT
defer exporter.Close()
sdktrace.NewProvider(sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()}),
sdktrace.WithSyncer(exporter))
Read more about sampling with Honeycomb in our docs.
You can find an example Honeycomb app in /example.