google.golang.org/grpc@v1.72.2/experimental/opentelemetry/trace_options.go (about)

     1  /*
     2   * Copyright 2024 gRPC authors.
     3   *
     4   * Licensed under the Apache License, Version 2.0 (the "License");
     5   * you may not use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *     http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16  
    17  // Package opentelemetry is EXPERIMENTAL and will be moved to stats/opentelemetry
    18  // package in a later release.
    19  package opentelemetry
    20  
    21  import (
    22  	"go.opentelemetry.io/otel/propagation"
    23  	"go.opentelemetry.io/otel/trace"
    24  )
    25  
    26  // TraceOptions contains the tracing settings for OpenTelemetry instrumentation.
    27  type TraceOptions struct {
    28  	// TracerProvider is the OpenTelemetry tracer which is required to
    29  	// record traces/trace spans for instrumentation.  If unset, tracing
    30  	// will not be recorded.
    31  	TracerProvider trace.TracerProvider
    32  
    33  	// TextMapPropagator propagates span context through text map carrier.
    34  	// If unset, tracing will not be recorded.
    35  	TextMapPropagator propagation.TextMapPropagator
    36  }