Debian Codegraph @

exporters/otlp/otlptrace/otlptracehttp/exporter.go

raw
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3
4 package otlptracehttp // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
5
6 import (
7 "context"
8
9 "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
10 )
11
12 // New constructs a new Exporter and starts it.
13 func New(ctx context.Context, opts ...Option) (*otlptrace.Exporter, error) {
14 return otlptrace.New(ctx, NewClient(opts...))
15 }
16
17 // NewUnstarted constructs a new Exporter and does not start it.
18 func NewUnstarted(opts ...Option) *otlptrace.Exporter {
19 return otlptrace.NewUnstarted(NewClient(opts...))
20 }