Documentation ¶
Index ¶
- func Version() string
- func WithAttributeMapping(mapping AttributeMapping) func(o *options)
- func WithContext(ctx context.Context) func(o *options)
- func WithDestinationProjectQuota() func(o *options)
- func WithErrorHandler(handler otel.ErrorHandler) func(o *options)
- func WithProjectID(projectID string) func(o *options)
- func WithTimeout(t time.Duration) func(o *options)
- func WithTraceClientOptions(opts []option.ClientOption) func(o *options)
- type AttributeMapping
- type Exporter
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Version ¶ added in v0.10.0
func Version() string
Version is the current release version of the OpenTelemetry Operations Trace Exporter in use.
func WithAttributeMapping ¶ added in v1.4.0
func WithAttributeMapping(mapping AttributeMapping) func(o *options)
WithAttributeMapping configures how to map OpenTelemetry span attributes to google cloud trace span attributes. By default, it maps to attributes that are used prominently in the trace UI.
func WithContext ¶
WithContext sets the context that trace exporter and metric exporter relies on.
func WithDestinationProjectQuota ¶ added in v1.11.0
func WithDestinationProjectQuota() func(o *options)
WithDestinationProjectQuota enables per-request usage of the destination project's quota. For example, when setting the gcp.project.id resource attribute.
func WithErrorHandler ¶ added in v1.0.0
func WithErrorHandler(handler otel.ErrorHandler) func(o *options)
WithErrorHandler sets the hook to be called when there is an error occurred on uploading the span data to Stackdriver. If no custom hook is set, errors are logged.
func WithProjectID ¶
func WithProjectID(projectID string) func(o *options)
WithProjectID sets Google Cloud Platform project as projectID. Without using this option, it automatically detects the project ID from the default credential detection process. Please find the detailed order of the default credentail detection proecess on the doc: https://godoc.org/golang.org/x/oauth2/google#FindDefaultCredentials
func WithTimeout ¶
WithTimeout sets the timeout for trace exporter and metric exporter If unset, it defaults to a 12 second timeout.
func WithTraceClientOptions ¶
func WithTraceClientOptions(opts []option.ClientOption) func(o *options)
WithTraceClientOptions sets additionial client options for tracing.
Types ¶
type AttributeMapping ¶ added in v1.4.0
AttributeMapping determines how to map from OpenTelemetry span attribute keys to cloud trace attribute keys.
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
Exporter is a trace exporter that uploads data to Stackdriver.
TODO(yoshifumi): add a metrics exporter once the spec definition process and the sampler implementation are done.
func (*Exporter) ExportSpans ¶
ExportSpans exports a ReadOnlySpan to Stackdriver Trace.