# README

Trace

This package contains filter for generating traceID (X-Ab-TraceID header field) if there is no X-Ab-TraceID in request header.

Usage

Importing

import "github.com/AccelByte/go-restful-plugins/v4/pkg/trace"

Filter

Filter is restful.FilterFunction for generating traceID (X-Ab-TraceID header field) if there is no X-Ab-TraceID in request header.

Example usage of filter for all endpoints

Simple initialization:

ws := new(restful.WebService)
ws.Filter(trace.Filter())

With option initialization:

ws := new(restful.WebService)
ws.Filter(trace.FilterWithOption(trace.SimpleTraceID))

Supported TraceID Type:

  • SimpleTraceID = "uuid" format
  • TimeBasedTraceID (default) = "requestTime-uuid" format

# Functions

No description provided by the author
No description provided by the author

# Constants

format: uuid.
format: requestTime-uuid.
No description provided by the author

# Type aliases

IDType is the type for trace_id.