Movatterモバイル変換


[0]ホーム

URL:


otlptrace

packagemodule
v1.39.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2025 License:Apache-2.0, BSD-3-ClauseImports:7Imported by:1,435

Details

Repository

github.com/open-telemetry/opentelemetry-go

Links

README

OTLP Trace Exporter

PkgGoDev

Documentation

Overview

Package otlptrace contains abstractions for OTLP span exporters.See the official OTLP span exporter implementations:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcVersionadded inv1.15.0

func Version()string

Version is the current release version of the OpenTelemetry OTLP trace exporter in use.

Types

typeClient

type Client interface {// Start should establish connection(s) to endpoint(s). It is// called just once by the exporter, so the implementation// does not need to worry about idempotence and locking.Start(ctxcontext.Context)error// Stop should close the connections. The function is called// only once by the exporter, so the implementation does not// need to worry about idempotence, but it may be called// concurrently with UploadTraces, so proper// locking is required. The function serves as a// synchronization point - after the function returns, the// process of closing connections is assumed to be finished.Stop(ctxcontext.Context)error// UploadTraces should transform the passed traces to the wire// format and send it to the collector. May be called// concurrently.UploadTraces(ctxcontext.Context, protoSpans []*tracepb.ResourceSpans)error}

Client manages connections to the collector, handles thetransformation of data into wire format, and the transmission of thatdata to the collector.

typeExporter

type Exporter struct {// contains filtered or unexported fields}

Exporter exports trace data in the OTLP wire format.

funcNew

func New(ctxcontext.Context, clientClient) (*Exporter,error)

New constructs a new Exporter and starts it.

funcNewUnstarted

func NewUnstarted(clientClient) *Exporter

NewUnstarted constructs a new Exporter and does not start it.

func (*Exporter)ExportSpans

func (e *Exporter) ExportSpans(ctxcontext.Context, ss []tracesdk.ReadOnlySpan)error

ExportSpans exports a batch of spans.

func (*Exporter)MarshalLogadded inv1.5.0

func (e *Exporter) MarshalLog()any

MarshalLog is the marshaling function used by the logging system to represent this Exporter.

func (*Exporter)Shutdown

func (e *Exporter) Shutdown(ctxcontext.Context)error

Shutdown flushes all exports and closes all connections to the receiving endpoint.

func (*Exporter)Start

func (e *Exporter) Start(ctxcontext.Context)error

Start establishes a connection to the receiving endpoint.

Source Files

View all Source files

Directories

PathSynopsis
internal
tracetransform
Package tracetransform provides conversion functionality for the otlptrace exporters.
Package tracetransform provides conversion functionality for the otlptrace exporters.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp