Documentation
¶
Index ¶
- Constants
- func Format(traceId string) string
- func New() func(ctx context.Context, req *http.Request) tracing.Tracing
- func RequestId() tracelog.RequestIdFunc
- func TextMapPropagator() propagation.TextMapPropagator
- func TracerProviderOptions(ctx context.Context, attrs ...attribute.KeyValue) ([]sdktrace.TracerProviderOption, error)
- func WithIDGenerator() tracing.TracerProviderOption
- func WithLogGroupARNs(logGroupARNs ...string) tracing.KeyValueOption
- func WithLogGroupNames(logGroupNames ...string) tracing.KeyValueOption
- func WithLogStreamARNsKey(logStreamARNs ...string) tracing.KeyValueOption
- func WithLogStreamNames(logStreamNames ...string) tracing.KeyValueOption
- func WithResource(attr ...attribute.KeyValue) tracing.TracerProviderOption
- func WithSampler(serviceName, cloudPlatform string, opt ...sampler.Option) tracing.TracerProviderOption
- type TracingContext
Constants ¶
const ( AwsTraceId = "aws_trace_id" SpanId = "span_id" TraceId = "trace_id" Sampled = "sampled" )
Variables ¶
This section is empty.
Functions ¶
func New ¶ added in v0.2.0
New creates a new tracing context for HTTP requests. tracing.NewFunc is used to create a new tracing context based on the incoming HTTP request.
func RequestId ¶ added in v0.2.0
func RequestId() tracelog.RequestIdFunc
func TextMapPropagator ¶
func TextMapPropagator() propagation.TextMapPropagator
func TracerProviderOptions ¶
func TracerProviderOptions(ctx context.Context, attrs ...attribute.KeyValue) ([]sdktrace.TracerProviderOption, error)
TracerProviderOptions returns a slice of TracerProviderOption for configuring the OpenTelemetry TracerProvider. Deprecated: use tracers.TracerProviderOptions instead.
func WithIDGenerator ¶ added in v0.1.0
func WithIDGenerator() tracing.TracerProviderOption
WithIDGenerator X-Ray ID ジェネレーターを使用する
func WithLogGroupARNs ¶
func WithLogGroupARNs(logGroupARNs ...string) tracing.KeyValueOption
WithLogGroupARNs ロググループARNを設定する
func WithLogGroupNames ¶
func WithLogGroupNames(logGroupNames ...string) tracing.KeyValueOption
WithLogGroupNames ロググループ名を設定する
func WithLogStreamARNsKey ¶
func WithLogStreamARNsKey(logStreamARNs ...string) tracing.KeyValueOption
WithLogStreamARNsKey ログストリームARNを設定する
func WithLogStreamNames ¶
func WithLogStreamNames(logStreamNames ...string) tracing.KeyValueOption
WithLogStreamNames ログストリーム名を設定する
func WithResource ¶ added in v0.1.0
func WithResource(attr ...attribute.KeyValue) tracing.TracerProviderOption
WithResource リソース属性を設定する AWS Lambda 環境の場合は、Lambda用のリソース検出器を使用する attr 追加の属性
func WithSampler ¶ added in v0.2.1
func WithSampler(serviceName, cloudPlatform string, opt ...sampler.Option) tracing.TracerProviderOption
WithSampler X-Ray リモートサンプリングを使用する serviceName サービス名 cloudPlatform "ec2" / "ecs" / "eks" / "lambda", etc opt sampler.Option
sampler.WithEndpoint(endpoint url.URL) sampler.WithSamplingRulesPollingInterval(polingInterval time.Duration) sampler.WithLogger(l logr.Logger)
Types ¶
type TracingContext ¶ added in v0.2.0
func Context ¶ added in v0.2.0
func Context(ctx context.Context) *TracingContext