diff --git a/examples/distributed-tracing/README.md b/examples/distributed-tracing/README.md index 896b21b..396ea49 100644 --- a/examples/distributed-tracing/README.md +++ b/examples/distributed-tracing/README.md @@ -1,6 +1,6 @@ # Examples with opentracing -The examples are roughly the same as thoe without tracing, but to demonstrate what the code will look liek with distributed tracing integrated. The tracing api spec that we are using is Opentracing, due to a wider and more stable support at the moment. +The examples are roughly the same as those without tracing, but to demonstrate what the code will look like with distributed tracing integrated. The tracing api spec that we are using is Opentracing, due to a wider and more stable support at the moment. Please refer to README under examples/consumer and examples/producer. @@ -34,7 +34,7 @@ export JAEGER_AGENT_PORT=6831 ### Setup Backend -Opencensus supports both tracing and stat backend. For demo purposes, we are going to use Jaeger as the tracing backend and Prometheus for stats. +For demo purposes, we are going to use Jaeger as the tracing backend. ### Tracing Backend Please refer to docs in reference section for Jaeger. diff --git a/examples/distributed-tracing/producer/producer.go b/examples/distributed-tracing/producer/producer.go index 4346b7d..d8f1d99 100644 --- a/examples/distributed-tracing/producer/producer.go +++ b/examples/distributed-tracing/producer/producer.go @@ -91,7 +91,8 @@ func putRecords(ctx context.Context, streamName *string, records []*kinesis.PutR span, _ := opentracing.StartSpanFromContext(ctx, "producer.putRecords") defer span.Finish() span.SetTag("producer.records.count", len(records)) - _, err := svc.PutRecords(&kinesis.PutRecordsInput{ + ctx = opentracing.ContextWithSpan(ctx, span) + _, err := svc.PutRecordsWithContext(&kinesis.PutRecordsInput{ StreamName: streamName, Records: records, })