1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-01-05 22:54:18 +02:00

Replace otlptracehttp example to use otlptracehttp instead of otlptrace (#4574)

This commit is contained in:
Shrey Gupta 2023-10-03 11:42:09 +05:30 committed by GitHub
parent 0e874c3468
commit c7f53cc973
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,6 @@ import (
"log"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
@ -66,8 +65,7 @@ func newResource() *resource.Resource {
}
func installExportPipeline(ctx context.Context) (func(context.Context) error, error) {
client := otlptracehttp.NewClient()
exporter, err := otlptrace.New(ctx, client)
exporter, err := otlptracehttp.New(ctx)
if err != nil {
return nil, fmt.Errorf("creating OTLP trace exporter: %w", err)
}