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:
parent
0e874c3468
commit
c7f53cc973
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user