small fixes/logging
MODIFY
Makefile
Makefile
@@ -33,7 +33,7 @@ go-generate:
go generate ./server/gendb/
generate: build jsdoc2md
- $(MAKE) -C samples generate
+ # $(MAKE) -C samples generate
$(PKGS): golang-test-all-strict-deps
$(call golang-test-all-strict,$@)

MODIFY
_hardcoded/tracing.go
_hardcoded/tracing.go
@@ -11,6 +11,7 @@ import (
"time"
"github.com/Clever/kayvee-go/v7/logger"
+ "github.com/davecgh/go-spew/spew"
"go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
@@ -30,12 +31,12 @@ var defaultCollectorPort uint16 = 4317
// propagator to use.
var propagator propagation.TextMapPropagator = propagation.TraceContext{} // traceparent header
func SetupGlobalTraceProviderAndExporter(ctx context.Context) (sdktrace.SpanExporter, *sdktrace.TracerProvider, error) {
- // 1. set up exporter
- // 2. set up tracer provider
- // 3. assign global tracer provider
+ otel.SetTextMapPropagator(
+ propagation.NewCompositeTextMapPropagator(
+ propagation.TraceContext{},
+ propagation.Baggage{}),
+ )
- // If we're running locally, then turn off sampling. Otherwise sample
- // 1% or whatever TRACING_SAMPLING_PROBABILITY specifies.
samplingProbability := 0.01
isLocal := os.Getenv("_IS_LOCAL") == "true"
if isLocal {
@@ -112,14 +113,13 @@ func SetupGlobalTraceProviderAndExporterForTest() (*tracetest.InMemoryExporter,
// It does two things: starts spans, and adds span/trace info to the request-specific logger.
// Right now we only support logging IDs in the format that Datadog expects.
func MuxServerMiddleware(serviceName string) func(http.Handler) http.Handler {
- otlmux := otelmux.Middleware(serviceName, otelmux.WithPropagators(propagator))
+ otlmux := otelmux.Middleware(serviceName, otelmux.WithPropagators(otel.GetTextMapPropagator()))
fmt.Println("Adding mux server middleware")
return func(h http.Handler) http.Handler {
return otlmux(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
// otelmux has extracted the span. now put it into the ctx-specific logger
s := trace.SpanFromContext(r.Context())
rid := r.Header.Get("X-Request-ID")
- fmt.Println("rid: ", rid)
if rid != "" {
s.SetAttributes(attribute.String("X-Request-ID", rid))
} else {
@@ -127,6 +127,8 @@ func MuxServerMiddleware(serviceName string) func(http.Handler) http.Handler {
}
if sc := s.SpanContext(); sc.HasTraceID() {
spanID, traceID := sc.SpanID().String(), sc.TraceID().String()
+ fmt.Println("span/trace: ", spanID, " ", traceID)
+ spew.Dump(sc)
// datadog converts hex strings to uint64 IDs, so log those so that correlating logs and traces works
if len(traceID) == 32 && len(spanID) == 16 { // opentelemetry format: 16 byte (32-char hex), 8 byte (16-char hex) trace and span ids
traceIDBs, _ := hex.DecodeString(traceID)

MODIFY
clients/go/gengo.go
clients/go/gengo.go
@@ -216,7 +216,7 @@ func newTracerProvider(exporter sdktrace.SpanExporter, samplingProbability float
// We use the default ID generator. In order for sampling to work (at least with this sampler)
// the ID generator must generate trace IDs uniformly at random from the entire space of uint64.
// For example, the default x-ray ID generator does not do this.
- sdktrace.WithSampler(sdktrace.ParentBased(sdktrace.TraceIDRatioBased(samplingProbability))),
+ sdktrace.WithSampler(sdktrace.AlwaysSample()),
// These maximums are to guard against something going wrong and sending a ton of data unexpectedly
sdktrace.WithSpanLimits(sdktrace.SpanLimits{
AttributeCountLimit: 100,
@@ -288,7 +288,7 @@ func New(basePath string, opts ...Option) *WagClient {
// samplingProbability := determineSampling()
tp := newTracerProvider(options.exporter, samplingProbability)
- options.transport = options.instrumentor(options.transport, context.TODO(), *tp)
+ options.transport = options.instrumentor(options.transport, opNameCtx{}, *tp)
circuit := &circuitBreakerDoer{
d: &retry,
@@ -303,7 +303,7 @@ func New(basePath string, opts ...Option) *WagClient {
basePath: basePath,
requestDoer: circuit,
client: &http.Client{
- Transport: defaultTransport,
+ Transport: options.transport,
},
retryDoer: &retry,
circuitDoer: circuit,
@@ -544,7 +544,11 @@ func extractModuleNameAndVersionSuffix(packageName string) (moduleName string, v
log.Fatalf("Error getting module name from packageName: %s", err.Error())
}
versionSuffix = strings.TrimSuffix(regex.FindString(packageName), "/gen-go")
+ if bool(regex.MatchString(packageName)) {
moduleName = regex.ReplaceAllString(packageName, "")
+ } else {
+ moduleName = strings.TrimSuffix(packageName, "/gen-go")
+ }
return
}

MODIFY
go.mod
go.mod
@@ -5,6 +5,7 @@ go 1.16
require (
github.com/Clever/go-utils v0.0.0-20180917210021-2dac0ec6f2ac
github.com/awslabs/goformation/v2 v2.3.1
+ github.com/davecgh/go-spew v1.1.1
github.com/go-openapi/errors v0.19.4
github.com/go-openapi/jsonreference v0.20.0
github.com/go-openapi/loads v0.19.7

MODIFY
hardcoded/hardcoded.go
hardcoded/hardcoded.go
// sources:
// ../_hardcoded/doer.go (10.342kB)
// ../_hardcoded/middleware.go (1.685kB)
-// ../_hardcoded/tracing.go (6.382kB)
+// ../_hardcoded/tracing.go (6.391kB)
package hardcoded
@@ -111,7 +111,7 @@ func _hardcodedMiddlewareGo() (*asset, error) {
return a, nil
}
-var __hardcodedTracingGo = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x38\x6b\x4f\xe4\xc6\xb2\x9f\xed\x5f\x51\xb1\xb4\x59\x7b\x65\x6c\xc8\x6e\x36\x11\x11\x1f\x58\x60\xb3\xa3\x0b\xec\x08\x88\x72\xaf\xae\x8e\x50\x63\x97\xed\xd6\xda\xdd\x3e\xdd\xed\x79\x68\xc5\x7f\x3f\xaa\xf2\x63\x66\x60\xe0\x24\xe1\x03\x1a\x57\x57\x55\xd7\xfb\xd1\xad\xc8\xbe\x89\x12\xc1\xa2\x59\xa0\x71\x46\x64\x52\x95\xbe\x2f\x9b\x56\x1b\x07\xa1\xef\x05\x99\x56\x0e\x57\x2e\xf0\xbd\x00\x55\xa6\x73\xa9\xca\xf4\x41\x2a\x61\xd6\x3b\xa0\x0a\x57\xf4\x5d\x34\x8c\xa9\xd0\xa5\x95\x73\x2d\xfd\xd6\x96\xfe\x5b\x67\x32\xad\x16\xf4\xd3\xc9\x06\x03\xdf\xf7\x82\x52\xba\xaa\x7b\x48\x32\xdd\xa4\x67\x35\x2e\xd0\xa4\xdf\xc4\x7a\x81\x78\x50\xea\x74\xf1\x4b\x5a\xeb\xb2\x44\x43\x14\xa5\x4e\x74\x8b\xca\x61\x8d\x0d\x3a\xb3\x4e\xa4\x4e\x49\x2e\x23\x1f\x52\xa9\xac\x33\x5d\x83\xca\x09\x27\xb5\x4a\xb7\x98\x96\xda\xc8\xba\x16\x69\xd3\xad\x52\xed\xb0\x6e\xba\xd5\x4b\xdc\xe8\xf8\xb5\xb3\x54\x38\xba\xad\x73\xf8\x2a\x16\xae\xc8\x6e\x68\x6c\xaa\x5d\xdd\xf2\x3f\xb2\xe9\x3f\x23\xda\xfc\x2a\x4d\x9b\xbd\xca\xa2\x35\xba\x15\x25\x1b\xe0\x55\x3c\x9b\x7f\x4b\x0d\x5a\xdd\x19\x96\xc9\xe6\xdf\x98\x3f\xbc\x4e\xf1\xdf\x55\x98\xb0\xfa\xff\x0e\x2d\x85\x81\xc5\x86\x7c\xfe\x1a\xf7\x1e\x23\x5d\x1c\x25\x47\x87\xc9\xe1\xab\x77\x0c\x52\x44\xbe\xbf\x10\x06\x72\x2c\x44\x57\xbb\x33\x5d\xd7\x98\x39\x6d\xbe\x68\xeb\xc0\x3a\x23\x55\x09\x27\x10\xd4\x3a\x13\x75\xa5\x49\x8c\x7d\xd8\x73\x8a\xee\x4e\x2a\x77\xf4\x11\x4e\xe0\xc3\xfb\xa3\x5f\x7c\x3f\x4d\x61\x34\xa3\x36\xe0\x34\x74\x16\x13\xa6\xde\x02\x6f\x19\x3a\xb9\xc3\x95\xbb\x12\xed\x7c\x73\x7a\xb2\x7b\x4e\x02\x9f\xf5\xe9\xf3\xfd\x11\xd2\x14\x58\x85\x56\x18\x54\x0e\x2a\x14\x39\x1a\xbf\xe8\x54\x06\xb7\xe8\xba\xf6\xf7\x5a\x3f\x88\x9a\x89\xe6\x46\x2f\x64\x8e\xe6\x54\xe5\x17\x43\x70\x84\x99\x5b\xc1\x90\x8b\xc9\xc0\x34\x82\x70\xf4\x60\x72\xdb\x0a\x35\xe2\xc6\xf0\x6e\x82\x33\x3f\x33\x32\x8c\x01\x8d\xd1\x26\x82\xef\xbe\x97\xa6\x70\x94\x80\x45\x07\x5d\x0b\x63\x0c\x32\xf8\xa7\x09\xcc\x3c\x58\x6b\x26\xe7\xd3\xf7\x09\x08\x6b\x65\xa9\xa0\x64\x89\x9f\x21\x31\xd6\xac\x80\x25\xbe\x35\x08\xa6\x53\x8a\x9c\xc2\x1e\xa9\xd7\x31\xb8\x0a\x15\xb8\xce\x28\xd0\x45\x01\x56\x34\x6d\x2d\x55\x99\xc0\x57\x57\xa1\x59\x4a\x8b\x3d\x0c\x7b\x09\xdf\x80\x36\xb0\xac\x84\xa3\xfa\x00\x77\x37\xa7\x67\xb3\xeb\xdf\xef\x6f\x4f\xaf\xe6\x97\xf4\x63\x7e\xf3\xf5\xd3\xe9\xa7\xd9\xe5\xec\xee\xff\xc0\xb6\x98\xc9\x42\xa2\x4d\x7c\x6f\x64\x3b\x37\xfa\x41\x3c\xc8\x5a\xba\x35\x1c\x9f\xc0\x61\x72\x78\xe4\x7b\xd2\x5e\x92\x30\x04\xd0\x36\xf9\x1d\x1d\xaa\x45\x18\xdc\xcf\x6e\xef\x2f\xbf\x9e\x9d\x5e\x06\x11\x9c\x9c\x40\xe0\x4c\x47\x41\x2f\x0b\x18\xf1\xbf\xfb\xde\x5e\xc6\x27\x70\x94\x1c\xfa\xde\x23\x60\x6d\x11\x64\x01\x8b\x27\xac\x5f\x13\x3b\x88\x7e\x83\x05\xfc\x70\x02\x41\xf0\xd2\x05\x9f\x8d\x6e\x2e\xd4\x82\x9d\x47\x9c\x87\x5a\x9a\xcc\x85\xb1\xf8\xb9\xd6\xc2\x85\x8b\x18\x3e\x7e\x88\x7c\x8f\xc4\x25\xac\x1f\x4e\x40\xc9\x5e\x62\xcf\x20\x5b\x5b\xc9\x3a\xee\xff\x15\x8d\x4b\x2e\x28\x0e\x8a\x30\xc8\x74\x57\xe7\xa0\xb4\x83\x96\xb8\xc1\xdb\x37\xf6\x2d\x05\x7f\x41\x6c\x83\x18\x16\xc4\xf4\xf1\x45\xc5\x5f\x96\xd6\x27\x2a\xba\x69\x6e\xa4\x72\xb5\x0a\x83\xc1\x8c\xc7\x41\x3c\x5a\x34\xf2\x7d\x4f\xe4\x39\x2b\x45\xa8\xb7\x2d\xe1\x16\x61\xf0\xc6\x1e\xbf\xc9\x83\x78\x6f\x96\x3f\x87\x52\x36\x47\x7d\xd8\x5d\x2c\xd0\xac\xe1\xe8\x67\xb0\x98\x69\x95\x5b\x0a\xc2\x9a\x42\x74\x4d\x4a\x65\x5a\x29\xcc\x1c\xfd\xdc\xa9\x31\x90\x8d\xac\x40\x38\xe6\xe3\x2a\x1c\xaf\xe1\xc8\xa5\x84\x06\x5d\xc0\x54\x57\x8e\xb9\x68\x10\xea\x9f\x14\xcf\x63\x94\x4b\x45\x79\x90\x77\x19\x13\xb8\x4a\x5a\x90\x16\x04\x58\x99\x63\x26\x4c\x0c\x42\xe5\xb0\xdc\xa2\x60\x16\x43\x6e\x6c\xe1\x8f\x90\x91\xaf\x6e\x71\x92\xf6\x60\x92\x36\xf1\x3d\xea\x11\x67\xb5\xa4\x8a\x42\x31\xb7\xdd\x31\x92\x6b\x5c\xf6\x47\xa1\xef\x79\xbb\x47\x7f\x4a\x57\xdd\xe0\x60\x0f\xa9\xd5\x1c\x8d\xd4\x79\x78\xf4\xf3\x3b\xea\xce\xc9\x2d\x5b\x2f\x8a\xf7\xd2\x5d\xa8\xbc\xd5\x52\xb9\x90\x5c\xf7\x02\xce\x4c\x59\xcc\x3a\x83\x21\x9d\x47\xbe\x67\x77\xca\xd3\x10\xc7\x13\x19\x49\x4a\x05\x2e\x86\x8d\x3a\xd1\x93\xe8\x19\xa9\xe1\xcc\xa0\x70\x98\x07\x91\xbf\x27\xd8\x5f\x8d\x75\xae\x7d\x90\x11\x3d\xd9\x74\xac\x79\xc7\xf0\x66\x11\xb0\x50\x11\x05\xad\xef\xb9\x96\xa4\x53\xb8\xdc\x2d\x9e\xe1\xae\x12\x7b\x42\x3f\x26\xa2\x9b\xa1\xbf\x86\x51\x44\xee\xc1\x3a\xb9\x45\xf7\x84\x93\x6b\x9f\xaa\xd7\x23\xc0\x88\xb1\xa5\xa5\xef\xf5\x83\x50\x42\x89\x35\x54\x7e\x32\x56\x94\xcc\x54\xa1\xcf\xc3\xc0\x3a\x61\x48\xa1\x83\xbe\x10\x07\x31\x0c\x04\x57\x64\x91\x80\xbc\x84\xd6\x06\xc7\xd0\xff\xd1\x37\x39\x2d\x18\x15\x38\x30\xc2\x61\x70\xbc\x57\x21\xdf\x7b\x8c\xfc\xd1\xaa\xbb\xfa\xbb\x96\x4d\xec\x3f\xfa\x7d\x13\x7b\x6e\xaf\xd1\xc0\xf0\x42\x97\xda\x57\x52\xb8\xee\x7c\xfc\x10\xc3\x38\xa6\xc0\xbb\xf1\x57\x32\x5a\x36\x7a\xb1\xbf\x51\x0c\x8c\xc2\x8e\x18\xd7\xcf\xe4\xf2\x3d\xce\x5b\xa4\x0e\xbf\x93\xe9\xb3\x73\x28\x51\xa1\xa1\x66\x9e\xc0\x4c\x81\x36\xc4\xb4\xd0\x66\x92\x95\x6a\xc7\x52\x9b\x6f\x10\x0a\x07\x35\x0a\xeb\x60\x29\x5d\xd5\xa7\x6e\xdf\xb8\x28\x8c\xc6\x1a\xb2\xcd\x11\x9a\xce\xba\xf1\x13\xfb\xb6\x09\xb3\x73\x0b\x9d\x92\x85\x36\x4d\xbd\x06\xe1\xc0\x08\x95\xeb\x06\x0a\xa3\x1b\xe6\x80\xca\x49\x83\x64\xfb\x0c\xa9\x02\xd1\xd4\xf2\xf1\x43\xd2\x5f\xf1\x59\x1b\xc0\x15\xdf\x1a\xef\x68\xb2\x3a\x30\x62\xbd\x7b\x7b\xae\xd1\x72\xa1\xcf\x35\x4b\x4b\x2c\x26\x23\x51\xce\xde\xf6\xd2\x6f\x66\x8a\xd3\x7a\x29\xd6\xb6\x07\x87\x11\x67\x7a\x9a\xc2\xeb\x34\x73\x9e\x6e\x3e\x09\x8b\x79\xb8\xeb\xa4\xd9\xf9\x0d\x95\xd1\xe1\xe8\xb9\xeb\xa3\xe9\x86\xbb\x0a\x2d\x42\x23\x56\xb2\xe9\x1a\x0b\xc2\x20\x59\xbd\xec\x84\xc9\x41\x94\x82\x26\x7e\xb0\xba\x41\x57\x91\x43\x4a\x4d\xff\x97\x46\xab\x92\xab\xab\x45\x45\x1b\x09\x08\x70\x7d\xcd\xce\x85\x13\xd0\x29\x5c\xb5\x98\x39\xcc\xeb\xf5\x33\xc5\x5b\xa1\x2e\x65\x23\x9d\xdd\x9d\xa7\x7a\x18\xf7\xd0\xd3\x71\xfc\x3f\xd3\x9d\x72\x7c\x70\x0c\x47\x87\x87\x24\xb1\x77\xb1\x40\xe5\xb6\x0f\xe8\x6f\x3c\xbc\x94\xea\xdb\xd3\xb3\xf1\xf0\x71\xd0\xf8\x93\x70\x59\x85\x86\x4a\x7f\xa3\x0d\x02\x16\x85\xcc\xa8\x08\xc6\x60\x97\xd2\x65\x15\xe9\x2f\x1d\x88\x82\xb2\x89\xa6\x6b\xee\x1c\x4f\xb4\x58\xab\x6c\x2b\xe9\x06\xd6\x3b\x28\xc3\x3d\x4f\x71\xbe\x88\x05\x5b\xb8\x90\x65\x67\x10\x74\xe7\xa0\xd2\x4b\x98\xbd\x6d\x06\xe3\x92\xf5\xa7\xb0\xa5\x40\x9f\x92\xb3\x90\xc6\xba\x67\x91\x34\x95\xc0\x11\xaf\xef\x02\x8f\x3c\x64\xff\x85\x61\xf7\xb3\x36\x77\x68\x1d\xdb\x03\x85\xe2\x86\xfd\xc0\xe9\x9a\x53\x87\xed\x94\x74\xa3\x15\x62\x62\x49\x6e\x6f\x24\x55\x77\xcb\x59\x60\xe9\x0a\x10\x0f\x7a\x81\x9c\xbc\xba\x73\xd4\x80\x39\x7d\xb6\x68\x13\x98\x39\xe8\xcb\x85\x05\xa1\x40\xaa\x83\x06\x1b\x6d\xd6\xc4\x73\x2a\x5e\xc5\x90\x63\x92\x1b\xf1\x68\x87\x9c\xab\xa1\x4d\xfe\xf2\x00\x3f\xe8\x14\x46\x10\xbe\x9b\x96\xa4\x64\xa6\xae\xf8\xc6\xbf\x37\xba\x4f\xb2\x1d\x9f\xc0\x86\xd7\x35\x2e\x9f\xb2\x0b\xa3\x97\xbb\x19\x4e\x57\x1e\x25\x87\x7f\xaf\x73\x0d\x25\x16\xf7\xf5\x82\x34\x85\xab\x6e\x75\xcb\xef\x09\x57\x32\xcf\x6b\x5c\x52\x02\x8f\x66\x6e\x36\x20\x57\x09\x07\xb6\xe2\x01\xf4\x01\x41\x38\x27\xb2\x0a\x73\x72\xb6\x80\xad\xdd\x7d\x78\x9c\x48\x88\xf5\xcc\xf5\x75\xcc\x2d\xb9\x88\xa9\xd2\x1e\x03\xf7\x3f\xdb\xfb\xa3\x1f\xb0\x44\x9e\xf7\xdf\xfd\xd2\x08\x52\x15\x9a\xd8\x52\x6c\x18\xfc\x77\x87\xd6\x1d\x0c\xdb\x42\x36\x36\x4b\xe2\x7e\x23\xcb\xca\x81\xd2\x4b\x58\x22\x68\x55\xaf\xc1\x76\x2d\xbf\x84\x10\x12\xb9\x9f\xca\xb5\x54\xcc\x88\x4a\xb6\x70\xbd\x16\xe7\xc2\x89\x5c\xf3\x48\x81\x99\x1b\xa3\x62\x8f\x1d\x42\xd2\x45\x66\x78\x2d\x1a\x1c\xd6\xd5\x08\x08\x39\xac\x9c\x6b\x93\x2f\x42\xe5\xd4\x40\x60\xfb\x8b\x3c\xae\x5d\x4d\x96\xe0\xa1\x89\x1f\x32\x92\xfd\x3c\xe3\xe9\x9c\xf2\x70\xb3\x9a\xda\x70\xb3\xc4\x46\x4f\x67\x8f\xd3\x9c\x0b\xe6\xc6\xd4\x5b\x5e\x0a\x36\xee\xee\xc5\x84\xd7\x05\x1d\x91\x7b\x81\x77\xb4\xfa\x4c\xf4\xcc\xc4\x2c\x7b\xba\x1b\xb4\xad\x56\x16\xff\x34\x92\xc3\xc8\xc0\xbb\x01\xce\x3e\x8a\xfa\xfd\x25\x4d\x47\xa5\xa0\x12\x16\x70\x45\x4e\xa5\x0c\xe4\x54\x6f\x85\x4a\xd8\x65\x6d\xe7\xa8\x46\x4a\x35\x38\x3a\x73\xab\xa7\x4e\x26\x6e\x76\x4a\x1a\xae\xf1\xdb\x43\x95\x19\x17\x6b\x4e\x00\xcf\x33\x32\x27\x64\x93\x7c\xe1\x5d\x9d\xd6\xb9\x30\xf8\xdf\x83\x41\xba\x83\xd9\x79\xc0\x68\x3b\xb6\x34\x32\x3f\x86\x20\x06\x23\x73\x3e\x94\x05\xfd\xdc\xda\xef\x3c\xcf\x52\x5a\x4d\x0d\xc5\x86\xd3\xd3\x52\x72\xcb\x01\xf1\xe4\x8e\x9e\x17\x33\x1b\x36\xcc\x7f\xc8\xc6\xb2\xc2\x93\x8a\x63\x57\x0e\xa3\x91\x20\x1a\x6e\x19\xe4\xb6\x19\x2f\x9b\xbb\x54\xbf\x81\xcd\x92\x2f\xc2\x4e\xc4\xa3\x34\xad\x50\xb3\xf3\xb8\xb7\xec\xec\x9c\x29\x33\x26\xdd\xb9\x21\x26\xe8\xf3\x8b\x99\x45\x9a\x72\xab\xa6\x3c\xa2\xf5\x16\x29\xa9\x2b\x5c\x0d\x69\x62\xf9\x49\x86\x87\x1f\xca\xc2\x18\xac\x26\xaf\x82\xab\xb4\x45\xfa\xe0\x44\xcc\xb4\x31\x58\xf7\xf3\x7d\xad\x4b\xcb\xe5\x80\x65\xb2\x3c\xb6\x59\xbe\x49\x16\x50\xa3\x0a\x07\x59\x79\xdd\x7f\xff\x13\xfc\xf8\x23\x43\x7b\x4d\x18\x78\xf4\x11\xbe\x03\x85\xdf\xce\xb2\xd8\x27\xfe\x31\x9d\x3e\xac\x1d\x42\xf8\xfe\xa7\x83\xac\x12\x86\x84\x8d\x62\xf8\x75\x80\x1e\x7d\xdc\x40\x87\x61\x8f\xc7\x93\x96\x3a\x4d\xde\x0b\xe2\x0d\x22\x7c\xb2\x31\xdc\x93\xcd\x2a\x5c\x25\xe7\x98\xe9\x1c\x07\xd3\x8c\x32\xf6\xe8\x7b\x36\x81\xed\xa0\x4d\x4e\xf3\x7c\xfc\x0a\x98\xf2\x5e\xe6\x41\xdc\xd3\x7a\xbb\x1b\x36\xad\xd7\xfd\x3b\x6e\xf2\x49\x96\x17\x2a\x97\x42\x25\x7f\xb0\x7d\xc3\x49\xaa\xff\xff\xf5\xf8\x5f\x43\x54\x8c\x2e\x7e\x59\xd4\xc1\x70\x7f\x5f\x52\x22\xfc\x67\x82\x8e\x22\x8d\x32\x3e\x4e\xf1\x5b\x25\x5c\x7a\xbf\xdc\xdd\xcd\x43\xb3\x8c\x81\x87\xf2\xc7\x88\x37\xbc\xbe\x4b\x6d\x35\xbc\xcd\x10\xb0\x99\x6c\x72\xb4\x99\x91\x0f\x3c\xfe\xd0\xc8\x23\xda\xb6\x96\xfd\x43\x00\xf7\x8a\x3f\x68\x18\xe1\xcd\x00\x1d\x87\xdb\x9e\xe7\xb2\x71\x2f\xda\x34\xd6\x3d\xdb\x0c\x25\xd0\x42\x18\xba\x60\xab\x2b\x3c\x29\xd1\x67\xe3\xd2\x3a\x52\x0d\xeb\xef\xf6\xfb\xd5\xfc\xeb\xf9\x3d\xd5\xa4\xad\x62\x33\xf2\xdc\x7d\xe8\x3a\x9d\xcf\xef\xaf\x4f\xaf\x2e\x88\xc7\xe6\xd1\x6a\x0b\xe3\xaf\x72\xda\x61\xe4\x7b\x66\x88\x8c\x49\xc5\x2b\x34\x25\x86\xdc\x14\x06\xc8\x79\xbf\x9f\xf0\xb3\xc0\x06\x7a\x8d\x4b\x6a\x57\x5b\xc5\x8c\x2b\x75\xff\x38\x9c\xdc\x66\x15\x36\xe2\x8f\x9b\xcb\x78\x07\xba\x69\x7a\xff\x83\xeb\xb1\x92\x0c\x62\x32\xfb\xe1\xe9\x61\x68\x48\xc6\x7f\xf4\xff\x13\x00\x00\xff\xff\xbd\x22\x11\xf0\xee\x18\x00\x00")
+var __hardcodedTracingGo = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x58\xdd\x4f\xe4\x46\x12\x7f\xb6\xff\x8a\x8a\xa5\xcd\xda\x2b\x63\x43\xb2\xd9\x44\x44\x3c\xb0\xc0\xee\x8e\x0e\xc8\x08\x88\x72\xa7\xd3\x09\x35\x76\x8d\xdd\x5a\xbb\xdb\xd7\xdd\x9e\x0f\xad\xf8\xdf\x4f\x55\xfe\x98\x31\x0c\x5c\x12\x1e\xd0\xb8\xbb\xea\xd7\x55\xd5\xf5\xd9\x8d\xc8\xbe\x8a\x02\xc1\xa2\x59\xa2\x71\x46\x64\x52\x15\xbe\x2f\xeb\x46\x1b\x07\xa1\xef\x05\x99\x56\x0e\xd7\x2e\xf0\xbd\x00\x55\xa6\x73\xa9\x8a\xf4\x41\x2a\x61\x36\x93\xa5\x12\xd7\xf4\xbd\xa8\x99\x52\xa1\x4b\x4b\xe7\x1a\xfa\xad\x2d\xfd\xb7\xce\x64\x5a\x2d\xe9\xa7\x93\x35\x06\xbe\xef\x05\x85\x74\x65\xfb\x90\x64\xba\x4e\xcf\x2a\x5c\xa2\x49\xbf\x8a\xcd\x12\xf1\xa0\xd0\xe9\xf2\xe7\xb4\xd2\x45\x81\x26\x98\x12\xe6\x62\x89\x59\x51\xa6\x85\x3e\xb0\x0d\xae\x52\xfa\xc7\x24\x3a\xd1\x0d\x2a\x87\x15\xd6\xe8\xcc\x26\x91\x3a\x25\xd1\x8d\x7c\x48\xa5\xb2\xce\xb4\x35\x2a\x27\x9c\xd4\x2a\xdd\x81\x2b\xb4\x91\x55\x25\xd2\xba\x5d\xa7\xda\x61\x55\xb7\xeb\x97\xd0\x68\xfb\xb5\xbd\x54\x38\x3a\xad\x75\xf8\x2a\x15\xae\xc9\xb4\x68\x6c\xaa\x5d\xd5\xf0\x3f\x32\xfb\xdf\x63\xda\xfe\x2a\x4c\x93\xbd\x0a\xd1\x18\xdd\x88\x82\x0d\xf0\x2a\x9d\xcd\xbf\xa6\x06\xad\x6e\x0d\xcb\x64\xf3\xaf\x8c\x0f\xaf\x73\xfc\x7f\x15\x46\xaa\xee\xbf\x43\x4b\x9e\x62\xb1\x26\xb7\x78\x0d\xbd\xa3\x48\x97\x47\xc9\xd1\x61\x72\xf8\xea\x19\xbd\x14\x91\xef\x2f\x85\x81\x1c\x17\xa2\xad\xdc\x99\xae\x2a\xcc\x9c\x36\x5f\xb4\x75\x60\x9d\x91\xaa\x80\x13\x08\x2a\x9d\x89\xaa\xd4\x24\xc6\x3e\xea\x39\x05\x40\x2b\x95\x3b\xfa\x00\x27\xf0\xfe\xc7\xa3\x9f\x7d\x3f\x4d\x61\x30\xa3\x36\xe0\x34\xb4\x16\x13\xe6\xde\x59\xde\x31\x74\x72\x87\x6b\x77\x25\x9a\xf9\x76\xf7\x64\xba\x4f\x02\x9f\x75\x11\xf6\xed\x11\xd2\x14\x58\x85\x46\x18\x54\x0e\x4a\x14\x39\x1a\x7f\xd1\xaa\x0c\x6e\xd1\xb5\xcd\xe7\x4a\x3f\x88\x8a\x99\xe6\x46\x2f\x65\x8e\xe6\x54\xe5\x17\xbd\x73\x84\x99\x5b\x43\x1f\xae\x49\x0f\x1a\x41\x38\xdc\x60\x72\xdb\x08\x35\xd0\xc6\xf0\x6e\x5c\x67\x3c\x33\x00\xc6\x80\xc6\x68\x13\xc1\x37\xdf\x23\xa3\x26\xb7\xe8\x9e\xa9\x11\xfa\x9e\xb7\xab\xc7\x35\xae\xce\x74\xdd\x68\x2b\x1d\xee\x25\xf6\x5e\xd6\x3a\x7e\xba\xfd\x51\x14\x85\x28\xf0\xdb\x63\x14\xfb\x5e\xe4\xfb\x9e\x15\x75\x53\x49\x55\xcc\x8d\x7e\x10\x0f\xb2\x92\x6e\x03\xc7\x27\x70\x98\x1c\x1e\xf9\x9e\xb4\x97\x74\x91\xb4\xa0\x6d\xf2\x19\x1d\xaa\x65\x18\xdc\xcf\x6e\xef\x2f\x7f\x3b\x3b\xbd\x0c\x22\x38\x39\x81\xc0\x99\x96\xdc\x53\x2e\x60\xa0\xff\xe6\x7b\x7b\x81\x4f\xe0\x28\x39\xf4\xbd\x47\xc0\xca\x22\xc8\x05\x2c\x9f\x40\xdf\xdd\x9c\x9e\xcd\xae\x3f\xdf\xdf\x9e\x5e\xcd\x2f\xe9\xc7\xfc\xe6\xb7\x8f\xa7\x1f\x67\x97\xb3\xbb\x7f\x05\xd1\xaf\xb0\x84\xef\x4e\x20\x08\x5e\x3a\xe0\x93\xd1\xf5\x85\x5a\xb2\x99\x09\xb9\x4f\x8c\xc9\x5c\x18\x8b\x9f\x2a\x2d\x5c\xb8\x8c\xe1\xc3\xfb\xc8\xf7\x48\x5c\xa2\xfa\xee\x04\x94\xec\x24\xf6\x0c\xba\xd6\x28\xfa\x8e\xbb\x7f\x8b\xda\x25\x17\x74\x63\x8b\x30\xc8\x74\x5b\xe5\xa0\xb4\x83\x86\xd0\xe0\xed\x1b\xfb\x96\xdc\x74\x41\xb0\x41\x0c\x4b\x02\x7d\x7c\x51\xf1\x97\xa5\xf5\x89\x8b\x4e\x9a\x1b\xa9\x5c\xa5\xc2\xa0\x37\xe3\x71\x10\x0f\x16\xa5\x9b\x12\x79\xce\x4a\x11\xe9\x6d\x43\xb4\x8b\x30\x78\x63\x8f\xdf\xe4\x41\xbc\x37\x1e\x9f\xaf\x52\xdc\x11\x54\x9a\xc2\xc5\x12\xcd\x06\x8e\x7e\x02\x8b\x99\x56\xb9\x85\x15\xbe\xad\x2a\x70\x66\x43\x4a\x65\x5a\x29\xcc\x1c\xfd\x9c\x64\x03\xc8\x06\x28\x10\x8e\x71\x5c\x89\xc3\x31\x40\x51\x4f\x5e\x06\x7a\x01\x63\x06\x38\xe6\xf0\x26\xd2\x3f\x4a\x54\x60\x5a\xa5\x28\x49\x48\x45\xc1\x9a\xb7\x19\x33\xb8\x52\x5a\x90\x16\x04\x58\x99\x63\x26\x4c\x0c\x42\xe5\xb0\xda\xe1\x60\x08\x46\xad\x36\x3b\xf4\xc3\xca\x80\xab\x1b\x1c\xa5\x3d\x18\xa5\x4d\x28\xde\xaa\xe6\xac\x92\x14\xfb\xe4\x73\xbb\xb9\x9d\x43\x8c\xb7\x28\x9c\xa6\x5b\x7f\x48\x57\xde\x60\x6f\x0f\xa9\xd5\x1c\x8d\xd4\x79\x78\xf4\xd3\x3b\x2a\xb5\xc9\x2d\x5b\x8f\x82\x69\x0f\xdf\x85\xca\x1b\x2d\x95\x0b\xe9\xea\x5e\xa0\x99\x29\x8b\x59\x6b\x30\xec\x02\xd2\xb3\x93\x44\xd2\xfb\xf1\xc8\x46\x92\x52\x2a\x8a\x61\xab\x4e\xf4\xc4\x7b\x06\x6e\x38\x33\x28\x1c\xe6\x41\xe4\xef\x71\xf6\x57\x7d\x9d\xb3\x14\x64\xc4\x4f\x36\x1d\x2a\xe4\x31\xbc\x59\x06\x2c\x54\x44\x4e\xeb\x7b\xae\x21\xe9\x14\xae\xa6\x69\x2e\x9c\x2a\xb1\xc7\xf5\x63\x62\xba\xe9\x2b\x61\x18\x45\x3b\xe9\x70\x8a\xe4\x9a\xa7\xea\x75\x04\x30\x50\xec\x68\xe9\x7b\x5d\x57\x93\x50\x60\xf5\x29\x90\x8c\x15\x25\x33\xb5\xd0\xe7\x61\x60\x9d\x30\xa4\xd0\x01\xdb\xd2\x04\x31\xf4\x0c\x57\x64\x91\x80\x6e\x09\xad\x0d\x8e\xa1\xfb\xa3\x6f\xba\xb4\x60\x50\xe0\xc0\x08\x87\xc1\xf1\x5e\x85\x7c\xef\x31\xf2\x07\xab\x4e\xf5\x77\x0d\x9b\xd8\x7f\xf4\xbb\x72\xf3\xdc\x5e\x83\x81\xe1\x85\x7a\xb2\x2f\xa5\x70\xde\xf9\xf0\x3e\x86\xa1\xa1\x80\x77\xc3\xaf\x64\xb0\x6c\xf4\x62\x25\x22\x1f\x18\x84\x1d\x28\xae\x9f\xc9\xe5\x7b\x1c\xb7\x48\xb5\x78\x12\xe9\xb3\x73\x28\x50\xa1\xa1\x12\x94\xc0\x4c\x81\x36\x04\xba\xd0\x66\x94\x95\x72\xc7\x4a\x9b\xaf\x10\x0a\x07\x15\x0a\xeb\x60\x25\x5d\xd9\x85\x2e\x13\x21\xb9\xd1\x90\x43\x76\x11\xa1\x6e\xad\x1b\x3e\xb1\x2b\xdb\x30\x3b\xb7\xd0\x2a\xb9\xd0\xa6\xae\x36\x20\x1c\x18\xa1\x72\x5d\xc3\xc2\xe8\x9a\x11\x50\x39\x69\x90\x6c\x9f\x21\x65\x20\xea\x2f\x3e\xbc\x4f\xba\x23\x3e\x69\x03\xb8\xe6\x53\xe3\x89\x26\xeb\x03\x23\x36\xd3\xd3\x73\x8d\x96\x13\x7d\xae\x59\x5a\x82\x18\x8d\x44\x31\x7b\xdb\x49\xbf\xad\xfe\xa7\xd5\x4a\x6c\x6c\xb7\x1c\x46\x1c\xe9\x69\x0a\xaf\xf3\xcc\xb9\x0f\xf9\x28\x2c\xe6\xe1\xf4\x92\x66\xe7\x37\x94\x46\xfb\xad\xe7\x57\x1f\x8d\x27\xdc\x95\x68\x11\x6a\xb1\x96\x75\x5b\x5b\x10\x06\xc9\xea\x45\x2b\x4c\x0e\xa2\x10\xd4\x9b\x83\xd5\x35\xba\x92\x2e\xa4\xd0\xf4\x7f\x65\xb4\x2a\x38\xbb\x5a\x54\x34\x5e\x80\x00\xd7\xe5\xec\x5c\x38\x01\xad\xc2\x75\x83\x99\xc3\xbc\xda\x3c\x53\xbc\x11\xea\x52\xd6\xd2\xd9\x69\xe7\xd3\xad\x71\x0d\x3d\x1d\x1a\xf5\x33\xdd\x2a\xc7\x1b\xc7\x70\x74\x78\xc8\x9d\xc8\xc5\x12\x95\xdb\xdd\xa0\xbf\x61\xf3\x52\xaa\xaf\x4f\xf7\x86\xcd\xc7\x5e\xe3\x8f\xc2\x65\x25\x1a\x4a\xfd\xb5\x36\x08\xb8\x58\xc8\x8c\x92\x60\x0c\x76\x25\x5d\x56\x92\xfe\xd2\x81\x58\x50\x34\x51\x1f\xcc\x95\xe3\x89\x16\x1b\x95\xed\x04\x5d\x0f\x3d\x21\xe9\xcf\x79\x4a\xf3\x45\x2c\xd9\xc2\x0b\x59\xb4\x06\x41\xb7\x0e\x4a\xbd\x82\xd9\xdb\xba\x37\x2e\x59\x7f\x74\x5b\x72\xf4\x31\x38\x17\xd2\x58\xf7\xcc\x93\xc6\x14\x38\xd0\x75\x55\xe0\x91\xdb\xe1\x3f\xd1\x96\x7e\xd2\xe6\x0e\xad\x63\x7b\xa0\x50\x5c\xb0\x1f\x38\x5c\x73\xaa\xb0\xad\x92\x6e\xb0\x42\x4c\x90\x74\xed\xb5\xa4\xec\x6e\x39\x0a\x2c\x1d\x01\xe2\x41\x2f\x91\x83\x57\xb7\x8e\x0a\x30\x87\xcf\x0e\x6f\x02\x33\x07\x5d\xba\xb0\x20\x14\x48\x75\x50\x63\xad\xcd\x86\x30\xc7\xe4\xb5\xe8\x63\x4c\x72\x21\x1e\xec\x90\x73\x36\xb4\xc9\x9f\x6e\xb5\x7b\x9d\xc2\x08\xc2\x77\xe3\x38\x93\xcc\xd4\x15\x9f\xf8\xd7\x9a\xec\x51\xb6\xe3\x13\xd8\x62\x5d\xe3\xea\x29\x5c\x18\xbd\x5c\xcd\x70\x3c\xf2\x28\x39\xfc\x6b\x95\xab\x4f\xb1\xb8\xaf\x16\xa4\x29\x5c\xb5\xeb\x5b\x7e\x1c\xb8\x92\x79\x5e\xe1\x8a\x02\x78\x30\x73\xbd\x5d\x72\xa5\x70\x60\x4b\x6e\x40\x1f\x10\x84\x73\x22\x2b\x31\xa7\xcb\x16\xb0\x33\x65\xf7\x2f\x0d\x09\x41\xcf\x5c\x97\xc7\xdc\x8a\x93\x98\x2a\xec\x31\x70\xfd\xb3\xdd\x7d\x74\x0d\x96\xc8\xf3\xee\xbb\x1b\xef\x40\xaa\x85\x26\x58\xf2\x0d\x83\xff\x6d\xd1\xba\x03\xdb\x60\x26\x17\x32\x1b\x8a\x25\xa1\xdf\xc8\xa2\x74\xa0\xf4\x0a\x56\x08\x5a\x55\x1b\xb0\x6d\xc3\xcf\x1a\x44\x44\xd7\x4f\xe9\x5a\x2a\x06\xa2\x94\x2d\x5c\xa7\xc5\xb9\x70\x22\xd7\xdc\x52\x60\xe6\x06\xaf\xd8\x63\x87\x90\x74\x91\x19\x5e\x8b\x1a\xfb\xc1\x32\x02\x22\x0e\x4b\xe7\x9a\xe4\x8b\x50\x39\x15\x10\xd8\xfd\xea\xc6\xaa\x8a\x2c\xc1\x4d\x13\x3f\x39\x24\xfb\x31\xe3\x71\x9f\xe2\x70\x3b\x50\xd9\x90\xef\xf3\xf3\xbe\xc1\x2c\x8a\x9e\x36\x23\xa7\x39\x67\xd0\xad\xed\x77\xae\x2d\xd8\xde\x7f\x27\x37\xbc\x2e\xf9\x40\xdc\x69\x30\x51\xf3\x13\xf1\x33\x88\x59\x75\x7c\x37\x68\x1b\xad\x2c\xfe\x61\x24\xfb\x95\x81\x77\xfd\x3a\x5f\x5a\xd4\x0d\x34\x69\x3a\x68\x09\xa5\xb0\x80\x6b\xba\x65\x0a\x49\x8e\xfd\x46\xa8\x84\xef\xb0\x69\x1d\x25\x4d\xa9\xfa\x9b\xcf\xdc\xfa\xe9\xad\x13\x9a\x1d\xa3\x88\x93\xfe\x6e\x97\x65\x86\x99\x98\x23\xc2\xf3\x8c\xcc\x89\xd8\x24\x5f\x78\xcc\x26\x73\x86\xc1\x3f\x0f\x7a\xe9\x0e\x66\xe7\x01\x93\xc9\x05\x10\xe5\x76\xa6\xf3\x3c\x4b\xa1\x34\x16\x11\x1b\x8e\x0f\x3f\xc9\x2d\x3b\xc1\x13\x98\x98\x00\xba\x33\xfb\xa9\xf2\x6f\xc2\x58\xd6\x69\xd4\x62\xa8\xc4\x61\x34\x30\x44\xfd\x29\xbd\xdc\x36\xe3\x01\x73\xca\xf5\x2b\xd8\x2c\xf9\x22\xec\xc8\x3c\x48\xd3\x08\x35\x3b\x8f\x3b\xe3\xcd\xce\x99\x33\x63\xd6\xc9\x09\x31\xad\x3e\x3f\x98\x21\x26\x6e\xb7\x8d\xd8\x63\x20\xd9\x7b\xf8\x80\x3e\xfa\x33\xa2\xfe\x60\x5c\x25\xe7\x6d\xdd\x84\x36\xeb\x56\xd2\x94\xcb\x3c\xc5\x20\x8d\xc6\x48\x09\xa1\xc4\x75\x1f\x62\x96\x1f\x5e\xb8\x71\xa2\x08\x8e\xc1\x6a\x72\x00\x70\xa5\xb6\x48\x1f\x1c\xc4\x99\x36\x06\xab\x6e\x36\xa8\x74\x61\x39\x95\xf0\xb9\x96\x5b\x3e\xcb\x27\xc9\x05\x54\xa8\xc2\x41\x1e\x38\x39\x81\x1f\x7f\x80\xef\xbf\xe7\xd5\x4e\x64\x5e\x3c\xfa\x00\xdf\x80\x3c\x75\x32\x68\x76\x49\xe3\x98\x76\x1f\x36\x0e\x21\xfc\xf1\x87\x83\xac\x14\x86\x84\x8d\x62\xf8\xa5\x5f\x3d\xfa\xb0\x5d\xed\x1b\x45\x6e\x6d\x1a\xaa\x52\x79\x27\x88\xd7\x8b\xf0\xd1\xc6\x70\x4f\xb6\x2f\x71\x9d\x9c\x63\xa6\x73\xec\x4d\x3c\xb1\xd9\xbe\x29\x62\xd7\xbf\x93\xd3\x3c\x1f\xbe\x02\xe6\xbc\x97\x79\x10\x77\xbc\xde\x74\x3a\xa7\xd1\xbc\x7b\xd0\x4d\x3e\xca\xe2\x42\xe5\x52\xa8\xe4\x77\xb6\x6f\x38\x4a\xf5\xef\x5f\x8e\xff\xd3\x7b\xd7\xe0\x2a\x2f\x8b\xda\x1b\xee\xaf\x4b\x4a\x8c\x7f\x4f\xd0\x41\xa4\x41\xc6\xc7\x31\x0e\xca\x84\xd3\xf6\x97\xbb\xbb\x79\x68\x56\x31\x70\x43\xff\x18\xf1\x74\xd8\x55\xb8\x9d\x62\xb9\x6d\x20\xb6\x5d\x51\x8e\x36\x33\xf2\x81\x5b\x27\x6a\x97\x44\xd3\x54\xb2\x7b\x44\xe0\x3a\xf3\x3b\x35\x32\x3c\x55\xa0\x63\x77\x6b\x9b\xee\x96\xf9\x29\x90\x0b\xed\x38\x53\x6d\x8b\xf2\x9e\x49\x88\x02\x71\x29\x0c\x1d\xb0\x53\x51\x9e\x64\xf3\xb3\x61\xe0\x1d\xb8\xfa\xd1\x79\xf7\xed\x6b\xfe\xdb\xf9\x3d\xa5\xaf\x9d\xa4\x35\x60\x4e\x1f\xc9\x4e\xe7\xf3\xfb\xeb\xd3\xab\x0b\xc2\xd8\x3e\x78\xed\x50\xfc\x59\xa4\x09\x90\xef\x99\xde\x33\x46\x15\xaf\xd0\x14\x18\x72\xfd\xe8\x57\xce\xbb\xd9\x86\x9f\x14\xb6\xab\xd7\xb8\xa2\x52\xb7\x93\x14\x39\xa9\x77\x4f\xc0\xc9\x6d\x56\x62\x2d\x7e\xbf\xb9\x8c\x27\xab\xdb\x82\xf9\x0f\xdc\x0c\x19\xa9\x17\x93\xe1\xfb\x67\x8b\xbe\x76\x19\xff\xd1\xff\x5f\x00\x00\x00\xff\xff\x53\x18\x05\x26\xf7\x18\x00\x00")
func _hardcodedTracingGoBytes() ([]byte, error) {
return bindataRead(
@@ -127,7 +127,7 @@ func _hardcodedTracingGo() (*asset, error) {
}
info := bindataFileInfo{name: "../_hardcoded/tracing.go", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
- a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xaa, 0x4b, 0x32, 0x62, 0xec, 0x1e, 0x8e, 0x49, 0x44, 0x9e, 0x9f, 0x3a, 0xbb, 0x2e, 0xb9, 0xea, 0x7c, 0xf1, 0x16, 0xf5, 0xa1, 0xb8, 0x29, 0xda, 0x6f, 0xba, 0x6a, 0xf3, 0xa2, 0x6c, 0xde, 0xc9}}
+ a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x91, 0x5b, 0x60, 0x67, 0xc0, 0x1, 0xc2, 0x25, 0xe5, 0x52, 0x40, 0xa6, 0x17, 0x69, 0xb6, 0xc7, 0x37, 0x35, 0x0, 0x48, 0xd5, 0x4f, 0x7c, 0x7d, 0x2b, 0x18, 0x77, 0xdd, 0x0, 0x32, 0x7b, 0xea}}
return a, nil
}

MODIFY
models/genmodels.go
models/genmodels.go
@@ -62,11 +62,16 @@ func Generate(packageName, basePath string, s spec.Swagger) error {
func extractModuleNameAndVersionSuffix(packageName string) (moduleName string, versionSuffix string) {
regex, err := regexp.Compile("/v[0-9]/gen-go$|/v[0-9][0-9]/gen-go")
if err != nil {
- log.Fatalf("Error getting module name: %s", err.Error())
+ log.Fatalf("Error getting module name from packageName: %s", err.Error())
}
versionSuffix = strings.TrimSuffix(regex.FindString(packageName), "/gen-go")
+ if bool(regex.MatchString(packageName)) {
moduleName = regex.ReplaceAllString(packageName, "")
+ } else {
+ moduleName = strings.TrimSuffix(packageName, "/gen-go")
+ }
return
+
}
//CreateModFile creates a go.mod file for the client module.

MODIFY
samples/gen-go/client/client.go
samples/gen-go/client/client.go
package client
// Using Alpha version of WAG Yay!
-//SWAGGER_TEST , swagger-test, 0.1.0, github.com/Clever/wag/samples/v8/gen-go
import (
"bytes"
"context"
@@ -14,7 +13,7 @@ import (
"strings"
"time"
- "github.com/Clever/swagger-test/models"
+ "github.com/Clever/swagger-test/gen-go/models"
discovery "github.com/Clever/discovery-go"
wcl "github.com/Clever/wag/wagclientlogger"

MODIFY
samples/gen-go/client/go.mod
samples/gen-go/client/go.mod
-module github.com/Clever/swagger-test/client
+module github.com/Clever/swagger-test/gen-go/client
go 1.16
require (
- //removed this because it can never get the right version. Adding with: go get github.com/Clever/dapple/gen-go/models@INFRANG-4918-Testing-nested-modules
- github.com/Clever/swagger-test/models v0.1.0
+ //removed this because it can never get the right version unless I tag it first. Adding with: go get github.com/Clever/dapple/gen-go/models@INFRANG-5015
+ //github.com/Clever/swagger-test/gen-go/models v0.1.0
github.com/Clever/discovery-go v1.8.1
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5
github.com/donovanhide/eventsource v0.0.0-20171031113327-3ed64d21fb0b
@@ -41,5 +41,5 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect
)
-
-//replace github.com/Clever/swagger-test/models v0.1.0 => ../models
\ No newline at end of file
+//Replace directives will work locally but mess up imports.
+//replace github.com/Clever/swagger-test/gen-go/models v0.1.0 => ../models
\ No newline at end of file

MODIFY
samples/gen-go/client/interface.go
samples/gen-go/client/interface.go
@@ -3,7 +3,7 @@ package client
import (
"context"
- "github.com/Clever/wag/samples/v8/gen-go/models"
+ "github.com/Clever/wag/samples/gen-go/models/v8"
)
//go:generate mockgen -source=$GOFILE -destination=mock_client.go -package=client

MODIFY
samples/gen-go/models/go.mod
samples/gen-go/models/go.mod
-module github.com/Clever/wag/samples/v8/gen-go/models
-// vs:
-// mn:github.com/Clever/wag/samples/v8/gen-go
+module github.com/Clever/wag/samples/gen-go/models/v8
+
go 1.16

MODIFY
samples/gen-go/server/handlers.go
samples/gen-go/server/handlers.go
@@ -10,7 +10,7 @@ import (
"strconv"
"github.com/Clever/kayvee-go/v7/logger"
- "github.com/Clever/wag/samples/v8/gen-go/models"
+ "github.com/Clever/wag/samples/gen-go/models/v8"
"github.com/go-errors/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"

MODIFY
samples/gen-go/server/interface.go
samples/gen-go/server/interface.go
@@ -3,7 +3,7 @@ package server
import (
"context"
- "github.com/Clever/wag/samples/v8/gen-go/models"
+ "github.com/Clever/wag/samples/gen-go/models/v8"
)
//go:generate mockgen -source=$GOFILE -destination=mock_controller.go -package=server

DELETE
samples/gen-go/server/mock_controller.go
-// Code generated by MockGen. DO NOT EDIT.
-// Source: interface.go
-
-// Package server is a generated GoMock package.
-package server
-
-import (
- context "context"
- reflect "reflect"
-
- models "github.com/Clever/wag/samples/v8/gen-go/models"
- gomock "github.com/golang/mock/gomock"
-)
-
-// MockController is a mock of Controller interface.
-type MockController struct {
- ctrl *gomock.Controller
- recorder *MockControllerMockRecorder
-}
-
-// MockControllerMockRecorder is the mock recorder for MockController.
-type MockControllerMockRecorder struct {
- mock *MockController
-}
-
-// NewMockController creates a new mock instance.
-func NewMockController(ctrl *gomock.Controller) *MockController {
- mock := &MockController{ctrl: ctrl}
- mock.recorder = &MockControllerMockRecorder{mock}
- return mock
-}
-
-// EXPECT returns an object that allows the caller to indicate expected use.
-func (m *MockController) EXPECT() *MockControllerMockRecorder {
- return m.recorder
-}
-
-// CreateBook mocks base method.
-func (m *MockController) CreateBook(ctx context.Context, i *models.Book) (*models.Book, error) {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "CreateBook", ctx, i)
- ret0, _ := ret[0].(*models.Book)
- ret1, _ := ret[1].(error)
- return ret0, ret1
-}
-
-// CreateBook indicates an expected call of CreateBook.
-func (mr *MockControllerMockRecorder) CreateBook(ctx, i interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBook", reflect.TypeOf((*MockController)(nil).CreateBook), ctx, i)
-}
-
-// GetAuthors mocks base method.
-func (m *MockController) GetAuthors(ctx context.Context, i *models.GetAuthorsInput) (*models.AuthorsResponse, string, error) {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "GetAuthors", ctx, i)
- ret0, _ := ret[0].(*models.AuthorsResponse)
- ret1, _ := ret[1].(string)
- ret2, _ := ret[2].(error)
- return ret0, ret1, ret2
-}
-
-// GetAuthors indicates an expected call of GetAuthors.
-func (mr *MockControllerMockRecorder) GetAuthors(ctx, i interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthors", reflect.TypeOf((*MockController)(nil).GetAuthors), ctx, i)
-}
-
-// GetAuthorsWithPut mocks base method.
-func (m *MockController) GetAuthorsWithPut(ctx context.Context, i *models.GetAuthorsWithPutInput) (*models.AuthorsResponse, string, error) {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "GetAuthorsWithPut", ctx, i)
- ret0, _ := ret[0].(*models.AuthorsResponse)
- ret1, _ := ret[1].(string)
- ret2, _ := ret[2].(error)
- return ret0, ret1, ret2
-}
-
-// GetAuthorsWithPut indicates an expected call of GetAuthorsWithPut.
-func (mr *MockControllerMockRecorder) GetAuthorsWithPut(ctx, i interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthorsWithPut", reflect.TypeOf((*MockController)(nil).GetAuthorsWithPut), ctx, i)
-}
-
-// GetBookByID mocks base method.
-func (m *MockController) GetBookByID(ctx context.Context, i *models.GetBookByIDInput) (*models.Book, error) {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "GetBookByID", ctx, i)
- ret0, _ := ret[0].(*models.Book)
- ret1, _ := ret[1].(error)
- return ret0, ret1
-}
-
-// GetBookByID indicates an expected call of GetBookByID.
-func (mr *MockControllerMockRecorder) GetBookByID(ctx, i interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBookByID", reflect.TypeOf((*MockController)(nil).GetBookByID), ctx, i)
-}
-
-// GetBookByID2 mocks base method.
-func (m *MockController) GetBookByID2(ctx context.Context, id string) (*models.Book, error) {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "GetBookByID2", ctx, id)
- ret0, _ := ret[0].(*models.Book)
- ret1, _ := ret[1].(error)
- return ret0, ret1
-}
-
-// GetBookByID2 indicates an expected call of GetBookByID2.
-func (mr *MockControllerMockRecorder) GetBookByID2(ctx, id interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBookByID2", reflect.TypeOf((*MockController)(nil).GetBookByID2), ctx, id)
-}
-
-// GetBooks mocks base method.
-func (m *MockController) GetBooks(ctx context.Context, i *models.GetBooksInput) ([]models.Book, int64, error) {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "GetBooks", ctx, i)
- ret0, _ := ret[0].([]models.Book)
- ret1, _ := ret[1].(int64)
- ret2, _ := ret[2].(error)
- return ret0, ret1, ret2
-}
-
-// GetBooks indicates an expected call of GetBooks.
-func (mr *MockControllerMockRecorder) GetBooks(ctx, i interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBooks", reflect.TypeOf((*MockController)(nil).GetBooks), ctx, i)
-}
-
-// HealthCheck mocks base method.
-func (m *MockController) HealthCheck(ctx context.Context) error {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "HealthCheck", ctx)
- ret0, _ := ret[0].(error)
- return ret0
-}
-
-// HealthCheck indicates an expected call of HealthCheck.
-func (mr *MockControllerMockRecorder) HealthCheck(ctx interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HealthCheck", reflect.TypeOf((*MockController)(nil).HealthCheck), ctx)
-}
-
-// PutBook mocks base method.
-func (m *MockController) PutBook(ctx context.Context, i *models.Book) (*models.Book, error) {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "PutBook", ctx, i)
- ret0, _ := ret[0].(*models.Book)
- ret1, _ := ret[1].(error)
- return ret0, ret1
-}
-
-// PutBook indicates an expected call of PutBook.
-func (mr *MockControllerMockRecorder) PutBook(ctx, i interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutBook", reflect.TypeOf((*MockController)(nil).PutBook), ctx, i)
-}

MODIFY
samples/gen-go/servertracing/tracing.go
samples/gen-go/servertracing/tracing.go
@@ -119,7 +119,6 @@ func MuxServerMiddleware(serviceName string) func(http.Handler) http.Handler {
// otelmux has extracted the span. now put it into the ctx-specific logger
s := trace.SpanFromContext(r.Context())
rid := r.Header.Get("X-Request-ID")
- fmt.Println("rid: ", rid)
if rid != "" {
s.SetAttributes(attribute.String("X-Request-ID", rid))
} else {

MODIFY
server/genserver.go
server/genserver.go
@@ -191,11 +191,16 @@ func jsonMarshalNoError(i interface{}) string {
func extractModuleNameAndVersionSuffix(packageName string) (moduleName string, versionSuffix string) {
regex, err := regexp.Compile("/v[0-9]/gen-go$|/v[0-9][0-9]/gen-go")
if err != nil {
- log.Fatalf("Error getting module name: %s", err.Error())
+ log.Fatalf("Error getting module name from packageName: %s", err.Error())
}
versionSuffix = strings.TrimSuffix(regex.FindString(packageName), "/gen-go")
+ if bool(regex.MatchString(packageName)) {
moduleName = regex.ReplaceAllString(packageName, "")
+ } else {
+ moduleName = strings.TrimSuffix(packageName, "/gen-go")
+ }
return
+
}
func generateHandlers(packageName, basePath string, s *spec.Swagger, paths *spec.Paths) error {

MODIFY
wag
wag
Binary files a/wag and b/wag differ

small fixes/logging