message: testing lowering otelhttp version for kayvee compatability

diff:
@@ -4,7 +4,8 @@ go 1.16
require (
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.0 // indirect
- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.33.0
+ //otelhttp v0.31.0 is latest, but v0.28.0 is the latest one that uses the same otel/metric@v0.26.0 as kayvee
+ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0
go.opentelemetry.io/otel v1.8.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.8.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.8.0

diff:
@@ -76,9 +76,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
@@ -89,15 +88,18 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
-github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk=
-github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
+github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o=
+github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
+github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
+github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
+github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
@@ -202,14 +204,12 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -222,8 +222,15 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.33.0 h1:Z0lVKLXU+jxGf3ANoh+UWx9Ai5bjpQVnZXI1zEzvqS0=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.33.0/go.mod h1:U5rUt7Rw6zuORsWNfpMRy8XMNKLrmIlv/4HgLVW/d5M=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0 h1:hpEoMBvKLC6CqFZogJypr9IHwwSNF3ayEkNzD502QAM=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0/go.mod h1:Ihno+mNBfZlT0Qot3XyRTdZ/9U/Cg2Pfgj75DTdIfq4=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.30.0 h1:UWZ4BLzqvZOktTauQxRZONVet1hDRrvL0VxhiFWa/2Y=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.30.0/go.mod h1:OoQiI4C9O38fTJWSHQjy6qCWqRli3FFV8c1oeiA9Rs8=
+go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs=
+go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk=
+go.opentelemetry.io/otel v1.5.0/go.mod h1:Jm/m+rNp/z0eqJc74H7LPwQ3G87qkU/AnnAydAjSAHk=
go.opentelemetry.io/otel v1.8.0 h1:zcvBFizPbpa1q7FehvFiHbQwGzmPILebO0tyqIR5Djg=
go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM=
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.8.0 h1:ao8CJIShCaIbaMsGxy+jp2YHSudketpDgDRcbirov78=
@@ -232,10 +239,19 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.8.0 h1:LrHL1A3KqIgAgi6mK7Q0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.8.0/go.mod h1:w8aZL87GMOvOBa2lU/JlVXE1q4chk/0FX+8ai4513bw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.8.0 h1:00hCSGLIxdYK/Z7r8GkaX0QIlfvgU3tmnLlQvcnix6U=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.8.0/go.mod h1:twhIvtDQW2sWP1O2cT1N8nkSBgKCRZv2z6COTTBrf8Q=
-go.opentelemetry.io/otel/metric v0.31.0 h1:6SiklT+gfWAwWUR0meEMxQBtihpiEs4c+vL9spDTqUs=
-go.opentelemetry.io/otel/metric v0.31.0/go.mod h1:ohmwj9KTSIeBnDBm/ZwH2PSZxZzoOaG2xZeekTRzL5A=
+go.opentelemetry.io/otel/internal/metric v0.26.0 h1:dlrvawyd/A+X8Jp0EBT4wWEe4k5avYaXsXrBr4dbfnY=
+go.opentelemetry.io/otel/internal/metric v0.26.0/go.mod h1:CbBP6AxKynRs3QCbhklyLUtpfzbqCLiafV9oY2Zj1Jk=
+go.opentelemetry.io/otel/internal/metric v0.27.0 h1:9dAVGAfFiiEq5NVB9FUJ5et+btbDQAUIJehJ+ikyryk=
+go.opentelemetry.io/otel/internal/metric v0.27.0/go.mod h1:n1CVxRqKqYZtqyTh9U/onvKapPGv7y/rpyOTI+LFNzw=
+go.opentelemetry.io/otel/metric v0.26.0 h1:VaPYBTvA13h/FsiWfxa3yZnZEm15BhStD8JZQSA773M=
+go.opentelemetry.io/otel/metric v0.26.0/go.mod h1:c6YL0fhRo4YVoNs6GoByzUgBp36hBL523rECoZA5UWg=
+go.opentelemetry.io/otel/metric v0.27.0 h1:HhJPsGhJoKRSegPQILFbODU56NS/L1UE4fS1sC5kIwQ=
+go.opentelemetry.io/otel/metric v0.27.0/go.mod h1:raXDJ7uP2/Jc0nVZWQjJtzoyssOYWu/+pjZqRzfvZ7g=
go.opentelemetry.io/otel/sdk v1.8.0 h1:xwu69/fNuwbSHWe/0PGS888RmjWY181OmcXDQKu7ZQk=
go.opentelemetry.io/otel/sdk v1.8.0/go.mod h1:uPSfc+yfDH2StDM/Rm35WE8gXSNdvCg023J6HeGNO0c=
+go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk=
+go.opentelemetry.io/otel/trace v1.4.0/go.mod h1:uc3eRsqDfWs9R7b92xbQbU42/eTNz4N+gLP8qJCi4aE=
+go.opentelemetry.io/otel/trace v1.5.0/go.mod h1:sq55kfhjXYr1zVSyexg0w1mpa03AYXR5eyTkB9NPPdE=
go.opentelemetry.io/otel/trace v1.8.0 h1:cSy0DF9eGI5WIfNwZ1q2iUyGj00tGzP24dE1lOlHrfY=
go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=


message: lowered otelhttp ver

change_type: MODIFY

license: Apache License 2.0

repo: clever/wag

original_message: lowered otelhttp ver


message: go mod tidy tracing

change_type: DELETE

diff:
-{"buildTargets":[],"launchTargets":[],"customConfigurationProvider":{"workspaceBrowse":{"browsePath":[],"compilerArgs":[]},"fileIndex":[]}}
\ No newline at end of file

diff:
-make --dry-run --always-make --keep-going --print-directory
-make: Entering directory `/Users/chris.martin/go/src/github.com/Clever/wag/tracing'
-make: Leaving directory `/Users/chris.martin/go/src/github.com/Clever/wag/tracing'
-
-make: *** No targets specified and no makefile found. Stop.
-

diff:
-{
- "makefile.extensionOutputFolder": "./.vscode"
-}

diff:
-make all --print-data-base --no-builtin-variables --no-builtin-rules --question
-# GNU Make 3.81
-# Copyright (C) 2006 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions.
-# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# This program built for i386-apple-darwin11.3.0
-
-# Make data base, printed on Wed Jul 20 12:00:22 2022
-
-# Variables
-
-# automatic
-<D = $(patsubst %/,%,$(dir $<))
-# automatic
-?F = $(notdir $?)
-# environment
-VSCODE_LOG_NATIVE = false
-# automatic
-?D = $(patsubst %/,%,$(dir $?))
-# automatic
-@D = $(patsubst %/,%,$(dir $@))
-# automatic
-@F = $(notdir $@)
-# makefile
-CURDIR := /Users/chris.martin/go/src/github.com/Clever/wag/tracing
-# makefile
-SHELL = /bin/sh
-# environment
-VSCODE_NLS_CONFIG = {"locale":"en-us","availableLanguages":{},"_languagePackSupport":true}
-# environment
-_ = /usr/bin/make
-# makefile
-MAKEFILE_LIST :=
-# environment
-VSCODE_AMD_ENTRYPOINT = vs/workbench/api/node/extensionHostProcess
-# environment
-VSCODE_VERBOSE_LOGGING = true
-# environment
-__CFBundleIdentifier = com.microsoft.VSCode
-# environment
-VSCODE_IPC_HOOK_EXTHOST = /var/folders/b7/x7tpm4rs7l10c3mcml9vjssr0000gn/T/vscode-ipc-b27723c6-c526-41e4-9e36-aa4cb3de0ef8.sock
-# environment
-VSCODE_CWD = /
-# environment
-GOPROXY = https://proxy.golang.org,direct
-# environment
-PATH = /usr/local/go/bin:/usr/bin:/bin:/usr/sbin:/sbin
-# environment
-GOPATH = /Users/chris.martin/go
-# environment
-LaunchInstanceID = 6FEB183F-B4D2-4787-A5C1-E95FEFF921BF
-# environment
-VSCODE_LOG_STACK = false
-# environment
-ELECTRON_RUN_AS_NODE = 1
-# default
-.FEATURES := target-specific order-only second-expansion else-if archives jobserver check-symlink
-# environment
-SSH_AUTH_SOCK = /private/tmp/com.apple.launchd.k7eDZd6snX/Listeners
-# automatic
-%F = $(notdir $%)
-# environment
-VSCODE_PIPE_LOGGING = true
-# environment
-PWD = /Users/chris.martin/go/src/github.com/Clever/wag/tracing
-# environment
-ORIGINAL_XDG_CURRENT_DESKTOP = undefined
-# environment
-GOMODCACHE = /Users/chris.martin/go/pkg/mod
-# environment
-HOME = /Users/chris.martin
-# default
-MAKEFILEPATH = $(shell /usr/bin/xcode-select -print-path 2>/dev/null || echo /Developer)/Makefiles
-# environment
-VSCODE_CODE_CACHE_PATH = /Users/chris.martin/Library/Application Support/Code/CachedData/30d9c6cd9483b2cc586687151bcbcd635f373630
-# environment
-LOGNAME = chris.martin
-# environment
-APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL = 1
-# environment
-VSCODE_HANDLES_UNCAUGHT_ERRORS = true
-# automatic
-^D = $(patsubst %/,%,$(dir $^))
-# environment
-XPC_FLAGS = 0x0
-# default
-MAKE = $(MAKE_COMMAND)
-# default
-MAKECMDGOALS := all
-# environment
-SHLVL = 1
-# default
-MAKE_VERSION := 3.81
-# environment
-USER = chris.martin
-# makefile
-.DEFAULT_GOAL :=
-# automatic
-%D = $(patsubst %/,%,$(dir $%))
-# default
-MAKE_COMMAND := /Library/Developer/CommandLineTools/usr/bin/make
-# default
-.VARIABLES :=
-# environment
-TMPDIR = /var/folders/b7/x7tpm4rs7l10c3mcml9vjssr0000gn/T/
-# automatic
-*F = $(notdir $*)
-# environment
-VSCODE_IPC_HOOK = /Users/chris.martin/Library/Application Support/Code/1.68.1-main.sock
-# makefile
-MAKEFLAGS = Rrqp
-# environment
-MFLAGS = -Rrqp
-# automatic
-*D = $(patsubst %/,%,$(dir $*))
-# environment
-XPC_SERVICE_NAME = application.com.microsoft.VSCode.18349245.18349251
-# automatic
-+D = $(patsubst %/,%,$(dir $+))
-# automatic
-+F = $(notdir $+)
-# environment
-__CF_USER_TEXT_ENCODING = 0x1F5:0x0:0x0
-# environment
-COMMAND_MODE = unix2003
-# default
-MAKEFILES :=
-# automatic
-<F = $(notdir $<)
-# environment
-LC_ALL = C
-# environment
-SECURITYSESSIONID = 186b3
-# automatic
-^F = $(notdir $^)
-# default
-SUFFIXES :=
-# default
-.INCLUDE_DIRS = /usr/local/include
-# environment
-MAKELEVEL := 0
-# environment
-LANG = C
-# environment
-VSCODE_PID = 756
-# variable set hash-table stats:
-# Load=67/1024=7%, Rehash=0, Collisions=2/88=2%
-
-# Pattern-specific Variable Values
-
-# No pattern-specific variable values.
-
-# Directories
-
-# . (device 16777230, inode 17298407): 7 files, no impossibilities.
-
-# 7 files, no impossibilities in 1 directories.
-
-# Implicit Rules
-
-# No implicit rules.
-
-# Files
-
-# Not a target:
-all:
-# Command-line target.
-# Implicit rule search has been done.
-# File does not exist.
-# File has not been updated.
-# variable set hash-table stats:
-# Load=0/32=0%, Rehash=0, Collisions=0/0=0%
-
-# Not a target:
-.SUFFIXES:
-# Implicit rule search has not been done.
-# Modification time never checked.
-# File has not been updated.
-
-# Not a target:
-Makefile:
-# A default, MAKEFILES, or -include/sinclude makefile.
-# Implicit rule search has been done.
-# File does not exist.
-# File has been updated.
-# Failed to be updated.
-# variable set hash-table stats:
-# Load=0/32=0%, Rehash=0, Collisions=0/0=0%
-
-# Not a target:
-makefile:
-# A default, MAKEFILES, or -include/sinclude makefile.
-# Implicit rule search has been done.
-# File does not exist.
-# File has been updated.
-# Failed to be updated.
-# variable set hash-table stats:
-# Load=0/32=0%, Rehash=0, Collisions=0/0=0%
-
-# Not a target:
-.DEFAULT:
-# Implicit rule search has not been done.
-# Modification time never checked.
-# File has not been updated.
-
-# Not a target:
-GNUmakefile:
-# A default, MAKEFILES, or -include/sinclude makefile.
-# Implicit rule search has been done.
-# File does not exist.
-# File has been updated.
-# Failed to be updated.
-# variable set hash-table stats:
-# Load=0/32=0%, Rehash=0, Collisions=0/0=0%
-
-# files hash-table stats:
-# Load=6/1024=1%, Rehash=0, Collisions=0/17=0%
-# VPATH Search Paths
-
-# No `vpath' search paths.
-
-# No general (`VPATH' variable) search path.
-
-# # of strings in strcache: 0
-# # of strcache buffers: 0
-# strcache size: total = 0 / max = 0 / min = 4096 / avg = 0
-# strcache free: total = 0 / max = 0 / min = 4096 / avg = 0
-
-# Finished Make data base on Wed Jul 20 12:00:22 2022
-
-
-make: *** No rule to make target `all'. Stop.
-

diff:
@@ -224,13 +224,7 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0 h1:hpEoMBvKLC6CqFZogJypr9IHwwSNF3ayEkNzD502QAM=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0/go.mod h1:Ihno+mNBfZlT0Qot3XyRTdZ/9U/Cg2Pfgj75DTdIfq4=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.30.0 h1:UWZ4BLzqvZOktTauQxRZONVet1hDRrvL0VxhiFWa/2Y=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.30.0/go.mod h1:OoQiI4C9O38fTJWSHQjy6qCWqRli3FFV8c1oeiA9Rs8=
go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs=
-go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk=
-go.opentelemetry.io/otel v1.5.0/go.mod h1:Jm/m+rNp/z0eqJc74H7LPwQ3G87qkU/AnnAydAjSAHk=
go.opentelemetry.io/otel v1.8.0 h1:zcvBFizPbpa1q7FehvFiHbQwGzmPILebO0tyqIR5Djg=
go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM=
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.8.0 h1:ao8CJIShCaIbaMsGxy+jp2YHSudketpDgDRcbirov78=
@@ -241,17 +235,11 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.8.0 h1:00hCSG
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.8.0/go.mod h1:twhIvtDQW2sWP1O2cT1N8nkSBgKCRZv2z6COTTBrf8Q=
go.opentelemetry.io/otel/internal/metric v0.26.0 h1:dlrvawyd/A+X8Jp0EBT4wWEe4k5avYaXsXrBr4dbfnY=
go.opentelemetry.io/otel/internal/metric v0.26.0/go.mod h1:CbBP6AxKynRs3QCbhklyLUtpfzbqCLiafV9oY2Zj1Jk=
-go.opentelemetry.io/otel/internal/metric v0.27.0 h1:9dAVGAfFiiEq5NVB9FUJ5et+btbDQAUIJehJ+ikyryk=
-go.opentelemetry.io/otel/internal/metric v0.27.0/go.mod h1:n1CVxRqKqYZtqyTh9U/onvKapPGv7y/rpyOTI+LFNzw=
go.opentelemetry.io/otel/metric v0.26.0 h1:VaPYBTvA13h/FsiWfxa3yZnZEm15BhStD8JZQSA773M=
go.opentelemetry.io/otel/metric v0.26.0/go.mod h1:c6YL0fhRo4YVoNs6GoByzUgBp36hBL523rECoZA5UWg=
-go.opentelemetry.io/otel/metric v0.27.0 h1:HhJPsGhJoKRSegPQILFbODU56NS/L1UE4fS1sC5kIwQ=
-go.opentelemetry.io/otel/metric v0.27.0/go.mod h1:raXDJ7uP2/Jc0nVZWQjJtzoyssOYWu/+pjZqRzfvZ7g=
go.opentelemetry.io/otel/sdk v1.8.0 h1:xwu69/fNuwbSHWe/0PGS888RmjWY181OmcXDQKu7ZQk=
go.opentelemetry.io/otel/sdk v1.8.0/go.mod h1:uPSfc+yfDH2StDM/Rm35WE8gXSNdvCg023J6HeGNO0c=
go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk=
-go.opentelemetry.io/otel/trace v1.4.0/go.mod h1:uc3eRsqDfWs9R7b92xbQbU42/eTNz4N+gLP8qJCi4aE=
-go.opentelemetry.io/otel/trace v1.5.0/go.mod h1:sq55kfhjXYr1zVSyexg0w1mpa03AYXR5eyTkB9NPPdE=
go.opentelemetry.io/otel/trace v1.8.0 h1:cSy0DF9eGI5WIfNwZ1q2iUyGj00tGzP24dE1lOlHrfY=
go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=

original_message: go mod tidy tracing


message: trying some more Logging fixes

diff:
@@ -160,7 +160,7 @@ type circuitBreakerDoer struct {
d doer
debug bool
circuitName string
- logger WagClientLogger
+ logger wcl.WagClientLogger
}
var circuitSSEOnce sync.Once
@@ -185,7 +185,7 @@ type HystrixSSEEvent struct {
LatencyTotalMean int `json:"latencyTotal_mean"`
}
-func logEvent(l WagClientLogger, e HystrixSSEEvent) {
+func logEvent(l wcl.WagClientLogger, e HystrixSSEEvent) {
l.Log(wcl.Info, "", map[string]interface{}{
"requestCount": e.RequestCount,
"errorCount": e.ErrorCount,

original_message: trying some more Logging fixes


message: Can't get kayvee on old metric working even with lower version of otelhttp, so I'm just updating it and I'll have to update kayvee-go too :(

diff:
@@ -4,7 +4,7 @@ go 1.16
require (
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.0 // indirect
- //otelhttp v0.31.0 is latest, but v0.28.0 is the latest one that uses the same otel/metric@v0.26.0 as kayvee
+ //otelhttp v0.34.0 is latest, but v0.28.0 is the latest one that uses the same otel/metric@v0.26.0 as kayvee
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0
go.opentelemetry.io/otel v1.8.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.8.0


message: bump otelhttp

diff:
@@ -5,7 +5,7 @@ go 1.16
require (
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.0 // indirect
//otelhttp v0.34.0 is latest, but v0.28.0 is the latest one that uses the same otel/metric@v0.26.0 as kayvee
- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0
+ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.33.0
go.opentelemetry.io/otel v1.8.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.8.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.8.0

diff:
@@ -76,8 +76,9 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
-github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
@@ -88,18 +89,15 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
-github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o=
-github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
+github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk=
+github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
-github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
-github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
-github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
@@ -204,12 +202,14 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -222,9 +222,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0 h1:hpEoMBvKLC6CqFZogJypr9IHwwSNF3ayEkNzD502QAM=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0/go.mod h1:Ihno+mNBfZlT0Qot3XyRTdZ/9U/Cg2Pfgj75DTdIfq4=
-go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.33.0 h1:Z0lVKLXU+jxGf3ANoh+UWx9Ai5bjpQVnZXI1zEzvqS0=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.33.0/go.mod h1:U5rUt7Rw6zuORsWNfpMRy8XMNKLrmIlv/4HgLVW/d5M=
go.opentelemetry.io/otel v1.8.0 h1:zcvBFizPbpa1q7FehvFiHbQwGzmPILebO0tyqIR5Djg=
go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM=
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.8.0 h1:ao8CJIShCaIbaMsGxy+jp2YHSudketpDgDRcbirov78=
@@ -233,13 +232,10 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.8.0 h1:LrHL1A3KqIgAgi6mK7Q0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.8.0/go.mod h1:w8aZL87GMOvOBa2lU/JlVXE1q4chk/0FX+8ai4513bw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.8.0 h1:00hCSGLIxdYK/Z7r8GkaX0QIlfvgU3tmnLlQvcnix6U=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.8.0/go.mod h1:twhIvtDQW2sWP1O2cT1N8nkSBgKCRZv2z6COTTBrf8Q=
-go.opentelemetry.io/otel/internal/metric v0.26.0 h1:dlrvawyd/A+X8Jp0EBT4wWEe4k5avYaXsXrBr4dbfnY=
-go.opentelemetry.io/otel/internal/metric v0.26.0/go.mod h1:CbBP6AxKynRs3QCbhklyLUtpfzbqCLiafV9oY2Zj1Jk=
-go.opentelemetry.io/otel/metric v0.26.0 h1:VaPYBTvA13h/FsiWfxa3yZnZEm15BhStD8JZQSA773M=
-go.opentelemetry.io/otel/metric v0.26.0/go.mod h1:c6YL0fhRo4YVoNs6GoByzUgBp36hBL523rECoZA5UWg=
+go.opentelemetry.io/otel/metric v0.31.0 h1:6SiklT+gfWAwWUR0meEMxQBtihpiEs4c+vL9spDTqUs=
+go.opentelemetry.io/otel/metric v0.31.0/go.mod h1:ohmwj9KTSIeBnDBm/ZwH2PSZxZzoOaG2xZeekTRzL5A=
go.opentelemetry.io/otel/sdk v1.8.0 h1:xwu69/fNuwbSHWe/0PGS888RmjWY181OmcXDQKu7ZQk=
go.opentelemetry.io/otel/sdk v1.8.0/go.mod h1:uPSfc+yfDH2StDM/Rm35WE8gXSNdvCg023J6HeGNO0c=
-go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk=
go.opentelemetry.io/otel/trace v1.8.0 h1:cSy0DF9eGI5WIfNwZ1q2iUyGj00tGzP24dE1lOlHrfY=
go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=

old_path: wag

new_path: wag

diff: Binary files a/wag and b/wag differ

original_message: bump otelhttp


message: readded servertracing code

diff:
@@ -3,15 +3,11 @@ module github.com/Clever/wag/tracing
go 1.16
require (
- github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.0 // indirect
- //otelhttp v0.34.0 is latest, but v0.28.0 is the latest one that uses the same otel/metric@v0.26.0 as kayvee
- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.33.0
- go.opentelemetry.io/otel v1.8.0
+ github.com/Clever/kayvee-go/v7 v7.5.1-0.20220809022937-ea1e87b3d8d5
+ go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.34.0
+ go.opentelemetry.io/otel v1.9.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.8.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.8.0
- go.opentelemetry.io/otel/sdk v1.8.0
- go.opentelemetry.io/otel/trace v1.8.0
- golang.org/x/net v0.0.0-20220708220712-1185a9018129 // indirect
- golang.org/x/sys v0.0.0-20220721230656-c6bc011c0c49 // indirect
- google.golang.org/genproto v0.0.0-20220720214146-176da50484ac // indirect
+ go.opentelemetry.io/otel/sdk v1.9.0
+ go.opentelemetry.io/otel/trace v1.9.0
)

diff:
@@ -56,8 +56,13 @@ cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
+github.com/Clever/kayvee-go/v7 v7.5.1-0.20220809022937-ea1e87b3d8d5 h1:bW4pM3seDMxYMwZhTLk18282MxLrMwc5OouEyt7hKIk=
+github.com/Clever/kayvee-go/v7 v7.5.1-0.20220809022937-ea1e87b3d8d5/go.mod h1:S34k1t715DJo489ZmkQMJ6ae6PyvYGvyp8jk+l9vYXo=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
+github.com/aws/aws-sdk-go v1.30.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
+github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
+github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4=
github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
@@ -79,6 +84,7 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
@@ -95,11 +101,15 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
+github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
+github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
+github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
+github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ=
github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
@@ -180,21 +190,27 @@ github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/Oth
github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM=
github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c=
github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4=
+github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
+github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.0 h1:Ghn7copILfeIg0y8sTGRppI1bd8I4l2VN3cob0Xeqwg=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.0/go.mod h1:dnjr4snxnhRSn5GWqJUva2AoMbeaxyAcepvc0Tg8lXk=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2 h1:BqHID5W5qnMkug0Z8UmL8tN0gAy4jQ+B4WFt8cCgluU=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2/go.mod h1:ZbS3MZTZq/apAfAEHGoB5HbsQQstoqP92SjAqtQ9zeg=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
+github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
@@ -210,6 +226,12 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/xeipuuv/gojsonpointer v0.0.0-20170225233418-6fe8760cad35 h1:0TnXeVP6mx+A4CBf8cQVkQfkhyGBQCmJcT4g6zKzm7M=
+github.com/xeipuuv/gojsonpointer v0.0.0-20170225233418-6fe8760cad35/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
+github.com/xeipuuv/gojsonreference v0.0.0-20150808065054-e02fc20de94c h1:XZWnr3bsDQWAZg4Ne+cPoXRPILrNlPNQfxBuwLl43is=
+github.com/xeipuuv/gojsonreference v0.0.0-20150808065054-e02fc20de94c/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
+github.com/xeipuuv/gojsonschema v0.0.0-20171025060643-212d8a0df7ac h1:4VBKAdTNqxLs00+bB+9Lnosfg6keGxPEXZ28e7hZV3A=
+github.com/xeipuuv/gojsonschema v0.0.0-20171025060643-212d8a0df7ac/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -222,22 +244,38 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.33.0 h1:Z0lVKLXU+jxGf3ANoh+UWx9Ai5bjpQVnZXI1zEzvqS0=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.33.0/go.mod h1:U5rUt7Rw6zuORsWNfpMRy8XMNKLrmIlv/4HgLVW/d5M=
-go.opentelemetry.io/otel v1.8.0 h1:zcvBFizPbpa1q7FehvFiHbQwGzmPILebO0tyqIR5Djg=
+go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.34.0 h1:OkXMRbgldT4yZR7RwB4SFYTjYJGTXwPQVX69pYtTnc4=
+go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.34.0/go.mod h1:zMu+r6aEorSQi8Ad0Y1fNrznm+VM8F10D2WlZp3HeFw=
+go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs=
go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM=
-go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.8.0 h1:ao8CJIShCaIbaMsGxy+jp2YHSudketpDgDRcbirov78=
+go.opentelemetry.io/otel v1.9.0 h1:8WZNQFIB2a71LnANS9JeyidJKKGOOremcUtb/OtHISw=
+go.opentelemetry.io/otel v1.9.0/go.mod h1:np4EoPGzoPs3O67xUVNoPPcmSvsfOxNlNA4F4AC+0Eo=
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.8.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY=
+go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.9.0 h1:ggqApEjDKczicksfvZUCxuvoyDmR6Sbm56LwiK8DVR0=
+go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.9.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY=
+go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.31.0 h1:H0+xwv4shKw0gfj/ZqR13qO2N/dBQogB1OcRjJjV39Y=
+go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.31.0/go.mod h1:nkenGD8vcvs0uN6WhR90ZVHQlgDsRmXicnNadMnk+XQ=
+go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.31.0 h1:BaQ2xM5cPmldVCMvbLoy5tcLUhXCtIhItDYBNw83B7Y=
+go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.31.0/go.mod h1:VRr8tlXQEsTdesDCh0qBe2iKDWhpi3ZqDYw6VlZ8MhI=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.8.0 h1:LrHL1A3KqIgAgi6mK7Q0aczmzU414AONAGT5xtnp+uo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.8.0/go.mod h1:w8aZL87GMOvOBa2lU/JlVXE1q4chk/0FX+8ai4513bw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.8.0 h1:00hCSGLIxdYK/Z7r8GkaX0QIlfvgU3tmnLlQvcnix6U=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.8.0/go.mod h1:twhIvtDQW2sWP1O2cT1N8nkSBgKCRZv2z6COTTBrf8Q=
+go.opentelemetry.io/otel/internal/metric v0.26.0/go.mod h1:CbBP6AxKynRs3QCbhklyLUtpfzbqCLiafV9oY2Zj1Jk=
+go.opentelemetry.io/otel/metric v0.26.0/go.mod h1:c6YL0fhRo4YVoNs6GoByzUgBp36hBL523rECoZA5UWg=
go.opentelemetry.io/otel/metric v0.31.0 h1:6SiklT+gfWAwWUR0meEMxQBtihpiEs4c+vL9spDTqUs=
go.opentelemetry.io/otel/metric v0.31.0/go.mod h1:ohmwj9KTSIeBnDBm/ZwH2PSZxZzoOaG2xZeekTRzL5A=
-go.opentelemetry.io/otel/sdk v1.8.0 h1:xwu69/fNuwbSHWe/0PGS888RmjWY181OmcXDQKu7ZQk=
+go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs=
go.opentelemetry.io/otel/sdk v1.8.0/go.mod h1:uPSfc+yfDH2StDM/Rm35WE8gXSNdvCg023J6HeGNO0c=
-go.opentelemetry.io/otel/trace v1.8.0 h1:cSy0DF9eGI5WIfNwZ1q2iUyGj00tGzP24dE1lOlHrfY=
+go.opentelemetry.io/otel/sdk v1.9.0 h1:LNXp1vrr83fNXTHgU8eO89mhzxb/bbWAsHG6fNf3qWo=
+go.opentelemetry.io/otel/sdk v1.9.0/go.mod h1:AEZc8nt5bd2F7BC24J5R0mrjYnpEgYHyTcM/vrSple4=
+go.opentelemetry.io/otel/sdk/export/metric v0.26.0/go.mod h1:UpqzSnUOjFeSIVQLPp3pYIXfB/MiMFyXXzYT/bercxQ=
+go.opentelemetry.io/otel/sdk/metric v0.31.0 h1:2sZx4R43ZMhJdteKAlKoHvRgrMp53V1aRxvEf5lCq8Q=
+go.opentelemetry.io/otel/sdk/metric v0.31.0/go.mod h1:fl0SmNnX9mN9xgU6OLYLMBMrNAsaZQi7qBwprwO3abk=
+go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk=
go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4=
+go.opentelemetry.io/otel/trace v1.9.0 h1:oZaCNJUjWcg60VXWee8lJKlqhPbXAPB51URuR47pQYc=
+go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
go.opentelemetry.io/proto/otlp v0.18.0 h1:W5hyXNComRa23tGpKwG+FRAc4rfF6ZUg1JReK+QHS80=
go.opentelemetry.io/proto/otlp v0.18.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U=
@@ -325,8 +363,8 @@ golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
-golang.org/x/net v0.0.0-20220708220712-1185a9018129 h1:vucSRfWwTsoXro7P+3Cjlr6flUMtzCwzlvkxEQtHHB0=
-golang.org/x/net v0.0.0-20220708220712-1185a9018129/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/net v0.0.0-20220809012201-f428fae20770 h1:dIi4qVdvjZEjiMDv7vhokAZNGnz3kepwuXqFKYDdDMs=
+golang.org/x/net v0.0.0-20220809012201-f428fae20770/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -347,7 +385,7 @@ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE=
-golang.org/x/oauth2 v0.0.0-20220718184931-c8730f7fcb92/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
+golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -419,8 +457,9 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220721230656-c6bc011c0c49 h1:TMjZDarEwf621XDryfitp/8awEhiZNiwgphKlTMGRIg=
-golang.org/x/sys v0.0.0-20220721230656-c6bc011c0c49/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664 h1:v1W7bwXHsnLLloWYTVEdvGvA7BHMeBYsPcF0GLDxIRs=
+golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -618,9 +657,9 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP
google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA=
google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA=
-google.golang.org/genproto v0.0.0-20220719170305-83ca9fad585f/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE=
-google.golang.org/genproto v0.0.0-20220720214146-176da50484ac h1:EOa+Yrhx1C0O+4pHeXeWrCwdI0tWI6IfUU56Vebs9wQ=
-google.golang.org/genproto v0.0.0-20220720214146-176da50484ac/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE=
+google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
+google.golang.org/genproto v0.0.0-20220808204814-fd01256a5276 h1:7PEE9xCtufpGJzrqweakEEnTh7YFELmnKm/ee+5jmfQ=
+google.golang.org/genproto v0.0.0-20220808204814-fd01256a5276/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@@ -669,12 +708,15 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
+google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.3 h1:fvjTMHxHEw/mxHbtzPi3JCcKXQRAnQTBRo6YCJSVHKI=
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

diff:
-package tracing
+package servertracing
import (
"context"
+ "encoding/binary"
+ "encoding/hex"
"fmt"
- "log"
"net/http"
+ "os"
+ "strconv"
"time"
- "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
+ "github.com/Clever/kayvee-go/v7/logger"
+ "go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux"
+ "go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
+ "go.opentelemetry.io/otel/sdk/trace/tracetest"
+ semconv "go.opentelemetry.io/otel/semconv/v1.10.0"
"go.opentelemetry.io/otel/trace"
)
-//propagator to use
-var propagator propagation.TextMapPropagator = propagation.TraceContext{} // traceparent header
-type Option interface {
- apply(*options)
-}
-type options struct {
- address string
-}
-
-//WithAddress takes an address in the form of Host:Port
-func WithAddress(addr string) Option {
- return addrOption{address: addr}
-}
-
-type addrOption struct {
- address string
-}
-
-func (o addrOption) apply(opts *options) {
- opts.address = o.address
-}
-
-//OtlpGrpcExporter uses the otlptracegrpc modules and the otlptrace module to produce a new exporter at our default addr
-func OtlpGrpcExporter(ctx context.Context, opts ...Option) sdktrace.SpanExporter {
-
- DefaultCollectorHost := "localhost"
+var defaultCollectorHost string = "localhost"
var defaultCollectorPort uint16 = 4317
- addr := fmt.Sprintf("%s:%d", DefaultCollectorHost, defaultCollectorPort)
- options := options{
- address: addr,
+// 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
+
+ // 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 {
+ samplingProbability = 1.0
+ } else if v := os.Getenv("TRACING_SAMPLING_PROBABILITY"); v != "" {
+ samplingProbabilityFromEnv, err := strconv.ParseFloat(v, 64)
+ if err != nil {
+ return nil, nil, fmt.Errorf("could not parse '%s' to float", v)
}
-
- for _, o := range opts {
- o.apply(&options)
+ samplingProbability = samplingProbabilityFromEnv
}
+ addr := fmt.Sprintf("%s:%d", defaultCollectorHost, defaultCollectorPort)
+
+ // Every 15 seconds we'll try to connect to opentelemetry collector at
+ // the default location of localhost:4317
+ // When running in production this is a sidecar, and when running
+ // locally this is a locally running opetelemetry-collector.
otlpClient := otlptracegrpc.NewClient(
- otlptracegrpc.WithEndpoint(addr), //Not strictly needed as we use the defaults
otlptracegrpc.WithReconnectionPeriod(15*time.Second),
+ otlptracegrpc.WithEndpoint(addr),
otlptracegrpc.WithInsecure(),
)
-
spanExporter, err := otlptrace.New(ctx, otlpClient)
+
if err != nil {
- log.Fatal(err)
- //Is doing a fatal error here too risky? No easy way to bubble up errors from here to the app using this.
- //without making each of the WithXOption() takes an error as an arg as well.
- return nil
+ return nil, nil, fmt.Errorf("error creating exporter: %v", err)
}
- return spanExporter
+ tp := newTracerProvider(spanExporter, samplingProbability, newResource())
+ otel.SetTracerProvider(tp)
+ logger.FromContext(ctx).InfoD("starting-tracer", logger.M{
+ "address": addr,
+ "sampling-rate": samplingProbability,
+ })
+ return spanExporter, tp, nil
}
func newTracerProvider(exporter sdktrace.SpanExporter, samplingProbability float64, resource *resource.Resource) *sdktrace.TracerProvider {
@@ -91,44 +94,58 @@ func newTracerProvider(exporter sdktrace.SpanExporter, samplingProbability float
)
}
-// InstrumentedTransport returns the transport to use in client requests.
-// It takes in a transport to wrap, e.g. http.DefaultTransport, and the request
-// context value to pull the span name out from.
-// 99% sure this is wrapping a wrapped thing and totally redundant. Fix later.
-func InstrumentedTransport(baseTransport http.RoundTripper, spanNameCtxValue interface{}, tp sdktrace.TracerProvider) http.RoundTripper {
- return roundTripperWithTracing{baseTransport: baseTransport, spanNameCtxValue: spanNameCtxValue, tp: tp}
-}
-
-type roundTripperWithTracing struct {
- baseTransport http.RoundTripper
- spanNameCtxValue interface{}
- tp sdktrace.TracerProvider
-}
-
-func (rt roundTripperWithTracing) RoundTrip(r *http.Request) (*http.Response, error) {
-
- return otelhttp.NewTransport(
- rt.baseTransport,
- otelhttp.WithTracerProvider(&rt.tp),
- // otelhttp.WithTracerProvider(tracer),
- otelhttp.WithPropagators(propagator),
- otelhttp.WithSpanNameFormatter(func(method string, r *http.Request) string {
- v, ok := r.Context().Value(rt.spanNameCtxValue).(string)
- if ok {
- return v
- }
- return r.Method // same as otelhttp's default span naming
- }),
- ).RoundTrip(r)
-}
-
-// ExtractSpanAndTraceID extracts span and trace IDs from an http request header.
-func ExtractSpanAndTraceID(r *http.Request) (traceID, spanID string) {
- fmt.Println("Extracting TraceID")
+// SetupGlobalTraceProviderAndExporterForTest is meant to be used in unit testing,
+// and mirrors the setup above for outside of unit testing. It returns an in-memory
+// exporter for examining generated spans.
+func SetupGlobalTraceProviderAndExporterForTest() (*tracetest.InMemoryExporter, *sdktrace.TracerProvider, error) {
+ exporter := tracetest.NewInMemoryExporter()
+ tp := newTracerProvider(exporter, 1.0, newResource())
+ otel.SetTracerProvider(tp)
+ return exporter, tp, nil
+}
+
+// MuxServerMiddleware returns middleware that should be attached to a gorilla/mux server.
+// 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))
+ 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())
- if s.SpanContext().HasTraceID() {
- return s.SpanContext().TraceID().String(), s.SpanContext().SpanID().String()
- }
- sc := trace.SpanContextFromContext(propagator.Extract(r.Context(), propagation.HeaderCarrier(r.Header)))
- return sc.SpanID().String(), sc.TraceID().String()
+ if sc := s.SpanContext(); sc.HasTraceID() {
+ spanID, traceID := sc.SpanID().String(), sc.TraceID().String()
+ // 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)
+ logger.FromContext(r.Context()).AddContext("trace_id",
+ fmt.Sprintf("%d", binary.BigEndian.Uint64(traceIDBs[8:])))
+ spanIDBs, _ := hex.DecodeString(spanID)
+ logger.FromContext(r.Context()).AddContext("span_id",
+ fmt.Sprintf("%d", binary.BigEndian.Uint64(spanIDBs)))
+ }
+ }
+ h.ServeHTTP(rw, r)
+ }))
+ }
+}
+
+// newResource returns a resource describing this application.
+// Used for setting up tracer provider
+func newResource() *resource.Resource {
+ var appName string
+
+ if os.Getenv("_POD_ID") != "" {
+ appName = os.Getenv("_APP_NAME")
+ } else if os.Getenv("POD_ID") != "" {
+ appName = os.Getenv("APP_NAME")
+ }
+ r, _ := resource.Merge(
+ resource.Default(),
+ resource.NewWithAttributes(
+ semconv.SchemaURL,
+ semconv.ServiceNameKey.String(appName),
+ ),
+ )
+ return r
}

original_message: readded servertracing code


message: added debugging to servertracing

diff:
@@ -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/exporters/otlp/otlptrace"
@@ -81,7 +82,8 @@ 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()),
+ // sdktrace.WithSampler(sdktrace.ParentBased(sdktrace.TraceIDRatioBased(samplingProbability))),
// These maximums are to guard against something going wrong and sending a ton of data unexpectedly
sdktrace.WithSpanLimits(sdktrace.SpanLimits{
AttributeCountLimit: 100,
@@ -115,7 +117,10 @@ func MuxServerMiddleware(serviceName string) func(http.Handler) http.Handler {
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())
+ fmt.Println("Got this span:")
+ spew.Dump(s)
if sc := s.SpanContext(); sc.HasTraceID() {
spanID, traceID := sc.SpanID().String(), sc.TraceID().String()
// datadog converts hex strings to uint64 IDs, so log those so that correlating logs and traces works

diff:
@@ -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/exporters/otlp/otlptrace"
@@ -19,7 +20,7 @@ import (
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
"go.opentelemetry.io/otel/sdk/trace/tracetest"
- semconv "go.opentelemetry.io/otel/semconv/v1.9.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.10.0"
"go.opentelemetry.io/otel/trace"
)
@@ -81,7 +82,8 @@ 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()),
+ // sdktrace.WithSampler(sdktrace.ParentBased(sdktrace.TraceIDRatioBased(samplingProbability))),
// These maximums are to guard against something going wrong and sending a ton of data unexpectedly
sdktrace.WithSpanLimits(sdktrace.SpanLimits{
AttributeCountLimit: 100,
@@ -115,7 +117,10 @@ func MuxServerMiddleware(serviceName string) func(http.Handler) http.Handler {
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())
+ fmt.Println("Got this span:")
+ spew.Dump(s)
if sc := s.SpanContext(); sc.HasTraceID() {
spanID, traceID := sc.SpanID().String(), sc.TraceID().String()
// datadog converts hex strings to uint64 IDs, so log those so that correlating logs and traces works

original_message: added debugging to servertracing


message: small fixes/logging

old_path: Makefile

new_path: Makefile

diff:
@@ -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,$@)

diff:
@@ -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)

diff:
@@ -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
}

diff:
@@ -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

diff:
@@ -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.

diff:
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"

diff:
-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

diff:
@@ -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

diff:
-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

diff:
@@ -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"

diff:
@@ -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

diff:
-// 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)
-}

diff:
@@ -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 {

diff:
@@ -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 {

original_message: small fixes/logging


message: adding ctx to wag client creation

diff:
@@ -256,7 +256,7 @@ func determineSampling() (samplingProbability float64, err error) {
//----------------------END TRACING RELATEDFUNCTIONS----------------------
// New creates a new client. The base path and http transport are configurable.
-func New(basePath string, opts ...Option) *WagClient {
+func New(ctx context.Context, basePath string, opts ...Option) *WagClient {
defaultTransport := http.DefaultTransport
defaultLogger := NewLogger("{{.ServiceName}}-wagclient", wcl.Info)
@@ -288,7 +288,7 @@ func New(basePath string, opts ...Option) *WagClient {
// samplingProbability := determineSampling()
tp := newTracerProvider(options.exporter, samplingProbability)
- options.transport = options.instrumentor(options.transport, opNameCtx{}, *tp)
+ options.transport = options.instrumentor(options.transport, ctx, *tp)
circuit := &circuitBreakerDoer{
d: &retry,
@@ -324,7 +324,7 @@ func NewFromDiscovery() (*WagClient, error) {
return nil, err
}
}
- return New(url), nil
+ return New(context.Backgroung(), url), nil
}
// SetRetryPolicy sets a the given retry policy for all requests.

original_message: adding ctx to wag client creation


message: added jaeger exporter for easier local testing

diff:
@@ -7,16 +7,14 @@ import (
"fmt"
"net/http"
"os"
- "strconv"
- "time"
"github.com/Clever/kayvee-go/v7/logger"
+ "go.opentelemetry.io/otel/exporters/jaeger"
+
"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"
- "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
- "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
@@ -37,31 +35,33 @@ func SetupGlobalTraceProviderAndExporter(ctx context.Context) (sdktrace.SpanExpo
propagation.Baggage{}),
)
- samplingProbability := 0.01
- isLocal := os.Getenv("_IS_LOCAL") == "true"
- if isLocal {
- samplingProbability = 1.0
- } else if v := os.Getenv("TRACING_SAMPLING_PROBABILITY"); v != "" {
- samplingProbabilityFromEnv, err := strconv.ParseFloat(v, 64)
- if err != nil {
- return nil, nil, fmt.Errorf("could not parse '%s' to float", v)
- }
- samplingProbability = samplingProbabilityFromEnv
- }
- fmt.Println("isLocal:", isLocal)
-
- addr := fmt.Sprintf("%s:%d", defaultCollectorHost, defaultCollectorPort)
-
- // Every 15 seconds we'll try to connect to opentelemetry collector at
- // the default location of localhost:4317
- // When running in production this is a sidecar, and when running
- // locally this is a locally running opetelemetry-collector.
- otlpClient := otlptracegrpc.NewClient(
- otlptracegrpc.WithReconnectionPeriod(15*time.Second),
- otlptracegrpc.WithEndpoint(addr),
- otlptracegrpc.WithInsecure(),
- )
- spanExporter, err := otlptrace.New(ctx, otlpClient)
+ // samplingProbability := 0.01
+ // isLocal := os.Getenv("_IS_LOCAL") == "true"
+ // if isLocal {
+ // samplingProbability = 1.0
+ // } else if v := os.Getenv("TRACING_SAMPLING_PROBABILITY"); v != "" {
+ // samplingProbabilityFromEnv, err := strconv.ParseFloat(v, 64)
+ // if err != nil {
+ // return nil, nil, fmt.Errorf("could not parse '%s' to float", v)
+ // }
+ // samplingProbability = samplingProbabilityFromEnv
+ // }
+ // fmt.Println("isLocal:", isLocal)
+
+ // addr := fmt.Sprintf("%s:%d", defaultCollectorHost, defaultCollectorPort)
+
+ // // Every 15 seconds we'll try to connect to opentelemetry collector at
+ // // the default location of localhost:4317
+ // // When running in production this is a sidecar, and when running
+ // // locally this is a locally running opetelemetry-collector.
+ // otlpClient := otlptracegrpc.NewClient(
+ // otlptracegrpc.WithReconnectionPeriod(15*time.Second),
+ // otlptracegrpc.WithEndpoint(addr),
+ // otlptracegrpc.WithInsecure(),
+ // )
+ // spanExporter, err := otlptrace.New(ctx, otlpClient)
+ spanExporter, err := jaeger.New(jaeger.WithCollectorEndpoint(jaeger.WithEndpoint("http://localhost:14268/api/traces")))
+
fmt.Println("Exporter Created")
if err != nil {
return nil, nil, fmt.Errorf("error creating exporter: %v", err)
@@ -79,7 +79,7 @@ func SetupGlobalTraceProviderAndExporter(ctx context.Context) (sdktrace.SpanExpo
}
func newTracerProvider(exporter sdktrace.SpanExporter, samplingProbability float64, resource *resource.Resource) *sdktrace.TracerProvider {
- return sdktrace.NewTracerProvider(
+ tp := sdktrace.NewTracerProvider(
// 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.
@@ -97,6 +97,10 @@ func newTracerProvider(exporter sdktrace.SpanExporter, samplingProbability float
//Have to figure out how I'm going to generate this resource first.
sdktrace.WithResource(resource),
)
+ otel.SetTracerProvider(tp)
+ otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
+
+ return tp
}
// SetupGlobalTraceProviderAndExporterForTest is meant to be used in unit testing,
@@ -118,6 +122,14 @@ func MuxServerMiddleware(serviceName string) func(http.Handler) http.Handler {
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
+ var carrier propagation.HeaderCarrier = propagation.HeaderCarrier{}
+
+ // otelmux has extracted the span. now put it into the ctx-specific logger
+ ctx := otel.GetTextMapPropagator().Extract(r.Context(), carrier)
+ spew.Dump(r.Header)
+ testsc := trace.SpanFromContext(ctx).SpanContext()
+ spew.Dump(testsc)
+
s := trace.SpanFromContext(r.Context())
rid := r.Header.Get("X-Request-ID")
if rid != "" {
@@ -125,6 +137,11 @@ func MuxServerMiddleware(serviceName string) func(http.Handler) http.Handler {
} else {
s.SetAttributes(attribute.String("X-Request-ID", s.SpanContext().TraceID().String()))
}
+
+ testctx := trace.ContextWithSpanContext(ctx, s.SpanContext())
+ r2 := r.Clone(testctx)
+ spew.Dump(r2.Header)
+
if sc := s.SpanContext(); sc.HasTraceID() {
spanID, traceID := sc.SpanID().String(), sc.TraceID().String()
fmt.Println("span/trace: ", spanID, " ", traceID)

diff:
@@ -212,7 +212,8 @@ func newResource() *resource.Resource {
}
func newTracerProvider(exporter sdktrace.SpanExporter, samplingProbability float64) *sdktrace.TracerProvider {
- return sdktrace.NewTracerProvider(
+
+ tp:= sdktrace.NewTracerProvider(
// 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.
@@ -227,7 +228,11 @@ func newTracerProvider(exporter sdktrace.SpanExporter, samplingProbability float
sdktrace.WithSyncer(exporter),
//sdktrace.WithBatcher(exporter),
sdktrace.WithResource(newResource()),
+
)
+ otel.SetTracerProvider(tp)
+ otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
+ return tp
}
func doNothing(baseTransport http.RoundTripper, spanNameCtxValue interface{}, tp sdktrace.TracerProvider) http.RoundTripper {
@@ -324,7 +329,7 @@ func NewFromDiscovery() (*WagClient, error) {
return nil, err
}
}
- return New(context.Backgroung(), url), nil
+ return New(context.Background(), url), nil
}
// SetRetryPolicy sets a the given retry policy for all requests.

change_type: ADD

diff:
@@ -16,7 +16,7 @@ import (
"github.com/Clever/swagger-test/gen-go/models"
discovery "github.com/Clever/discovery-go"
- wcl "github.com/Clever/wag/wagclientlogger"
+ wcl "github.com/Clever/wag/logging/wagclientlogger"
"github.com/afex/hystrix-go/hystrix"
@@ -166,11 +166,12 @@ func newResource() *resource.Resource {
}
func newTracerProvider(exporter sdktrace.SpanExporter, samplingProbability float64) *sdktrace.TracerProvider {
- return sdktrace.NewTracerProvider(
+
+ tp := sdktrace.NewTracerProvider(
// 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,
@@ -182,6 +183,9 @@ func newTracerProvider(exporter sdktrace.SpanExporter, samplingProbability float
//sdktrace.WithBatcher(exporter),
sdktrace.WithResource(newResource()),
)
+ otel.SetTracerProvider(tp)
+ otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
+ return tp
}
func doNothing(baseTransport http.RoundTripper, spanNameCtxValue interface{}, tp sdktrace.TracerProvider) http.RoundTripper {
@@ -210,7 +214,7 @@ func determineSampling() (samplingProbability float64, err error) {
//----------------------END TRACING RELATEDFUNCTIONS----------------------
// New creates a new client. The base path and http transport are configurable.
-func New(basePath string, opts ...Option) *WagClient {
+func New(ctx context.Context, basePath string, opts ...Option) *WagClient {
defaultTransport := http.DefaultTransport
defaultLogger := NewLogger("swagger-test-wagclient", wcl.Info)
@@ -240,7 +244,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, ctx, *tp)
circuit := &circuitBreakerDoer{
d: &retry,
@@ -255,7 +259,7 @@ func New(basePath string, opts ...Option) *WagClient {
basePath: basePath,
requestDoer: circuit,
client: &http.Client{
- Transport: defaultTransport,
+ Transport: options.transport,
},
retryDoer: &retry,
circuitDoer: circuit,
@@ -276,7 +280,7 @@ func NewFromDiscovery() (*WagClient, error) {
return nil, err
}
}
- return New(url), nil
+ return New(context.Background(), url), nil
}
// SetRetryPolicy sets a the given retry policy for all requests.

diff:
@@ -13,7 +13,7 @@ import (
"sync"
"time"
- wcl "github.com/Clever/wag/wagclientlogger"
+ wcl "github.com/Clever/wag/logging/wagclientlogger"
"github.com/afex/hystrix-go/hystrix"
"github.com/donovanhide/eventsource"

diff:
@@ -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 {
@@ -78,7 +79,7 @@ func SetupGlobalTraceProviderAndExporter(ctx context.Context) (sdktrace.SpanExpo
}
func newTracerProvider(exporter sdktrace.SpanExporter, samplingProbability float64, resource *resource.Resource) *sdktrace.TracerProvider {
- return sdktrace.NewTracerProvider(
+ tp := sdktrace.NewTracerProvider(
// 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.
@@ -96,6 +97,10 @@ func newTracerProvider(exporter sdktrace.SpanExporter, samplingProbability float
//Have to figure out how I'm going to generate this resource first.
sdktrace.WithResource(resource),
)
+ otel.SetTracerProvider(tp)
+ otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
+
+ return tp
}
// SetupGlobalTraceProviderAndExporterForTest is meant to be used in unit testing,
@@ -112,11 +117,19 @@ 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
+ var carrier propagation.HeaderCarrier = propagation.HeaderCarrier{}
+
+ // otelmux has extracted the span. now put it into the ctx-specific logger
+ ctx := otel.GetTextMapPropagator().Extract(r.Context(), carrier)
+ spew.Dump(r.Header)
+ testsc := trace.SpanFromContext(ctx).SpanContext()
+ spew.Dump(testsc)
+
s := trace.SpanFromContext(r.Context())
rid := r.Header.Get("X-Request-ID")
if rid != "" {
@@ -124,8 +137,15 @@ func MuxServerMiddleware(serviceName string) func(http.Handler) http.Handler {
} else {
s.SetAttributes(attribute.String("X-Request-ID", s.SpanContext().TraceID().String()))
}
+
+ testctx := trace.ContextWithSpanContext(ctx, s.SpanContext())
+ r2 := r.Clone(testctx)
+ spew.Dump(r2.Header)
+
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)

diff:
@@ -8,7 +8,8 @@ import (
"time"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
-
+ "go.opentelemetry.io/otel/exporters/jaeger"
+ "go.opentelemetry.io/otel/"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
@@ -71,24 +72,13 @@ func OtlpGrpcExporter(ctx context.Context, opts ...Option) sdktrace.SpanExporter
}
-func newTracerProvider(exporter sdktrace.SpanExporter, samplingProbability float64, resource *resource.Resource) *sdktrace.TracerProvider {
- return sdktrace.NewTracerProvider(
- // 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))),
- // These maximums are to guard against something going wrong and sending a ton of data unexpectedly
- sdktrace.WithSpanLimits(sdktrace.SpanLimits{
- AttributeCountLimit: 100,
- EventCountLimit: 100,
- LinkCountLimit: 100,
- }),
- //Batcher is more efficient, switch to it after testing
- sdktrace.WithSyncer(exporter),
- //sdktrace.WithBatcher(exporter),
- //Have to figure out how I'm going to generate this resource first.
- sdktrace.WithResource(resource),
- )
+func JaegerExporter() (spanExporter sdktrace.SpanExporter) {
+ fmt.Println("Creating Jaeger Exporter")
+ spanExporter, err := jaeger.New(jaeger.WithCollectorEndpoint(jaeger.WithEndpoint("http://localhost:14268/api/traces")))
+ if err != nil {
+ log.Fatal("Error creating Jaeger Exporter")
+ }
+ return
}
// InstrumentedTransport returns the transport to use in client requests.
@@ -109,7 +99,8 @@ func (rt roundTripperWithTracing) RoundTrip(r *http.Request) (*http.Response, er
return otelhttp.NewTransport(
rt.baseTransport,
- otelhttp.WithTracerProvider(&rt.tp),
+ otelhttp.WithTracerProvider(otel.GetTracerProvider())
+ // otelhttp.WithTracerProvider(&rt.tp),
// otelhttp.WithTracerProvider(tracer),
otelhttp.WithPropagators(propagator),
otelhttp.WithSpanNameFormatter(func(method string, r *http.Request) string {

diff: Binary files a/wag and b/wag differ


message: fixing an import

diff:
@@ -59,11 +59,12 @@ import (
"github.com/afex/hystrix-go/hystrix"
-
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/exporters/stdout/stdouttrace"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
- semconv "go.opentelemetry.io/otel/semconv/v1.10.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
)

diff:
@@ -9,7 +9,7 @@ import (
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
"go.opentelemetry.io/otel/exporters/jaeger"
- "go.opentelemetry.io/otel/"
+ "go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"

original_message: fixing an import


message: added missing ,

diff:
@@ -8,12 +8,11 @@ import (
"time"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
- "go.opentelemetry.io/otel/exporters/jaeger"
"go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/exporters/jaeger"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/propagation"
- "go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
"go.opentelemetry.io/otel/trace"
)
@@ -99,7 +98,7 @@ func (rt roundTripperWithTracing) RoundTrip(r *http.Request) (*http.Response, er
return otelhttp.NewTransport(
rt.baseTransport,
- otelhttp.WithTracerProvider(otel.GetTracerProvider())
+ otelhttp.WithTracerProvider(otel.GetTracerProvider()),
// otelhttp.WithTracerProvider(&rt.tp),
// otelhttp.WithTracerProvider(tracer),
otelhttp.WithPropagators(propagator),

original_message: added missing ,


message: removed unnescessary logging

diff:
@@ -58,19 +58,16 @@ func SetupGlobalTraceProviderAndExporter(ctx context.Context) (sdktrace.SpanExpo
spanExporter, err := otlptrace.New(ctx, otlpClient)
// spanExporter, err := jaeger.New(jaeger.WithCollectorEndpoint(jaeger.WithEndpoint("http://localhost:14268/api/traces")))
- fmt.Println("Exporter Created")
if err != nil {
return nil, nil, fmt.Errorf("error creating exporter: %v", err)
}
tp := newTracerProvider(spanExporter, newResource())
otel.SetTracerProvider(tp)
- fmt.Println("Tracer Provider Created")
- // logger.FromContext(ctx).InfoD("starting-tracer", logger.M{
- // "address": addr,
- // "sampling-rate": samplingProbability,
- // })
+ logger.FromContext(ctx).InfoD("starting-tracer", logger.M{
+ "address": addr,
+ })
return spanExporter, tp, nil
}
@@ -125,25 +122,27 @@ func MuxServerMiddleware(serviceName string) func(http.Handler) http.Handler {
// spew.Dump(r.Header)
// testsc := trace.SpanFromContext(ctx).SpanContext()
// spew.Dump(testsc)
-
s := trace.SpanFromContext(r.Context())
rid := r.Header.Get("X-Request-ID")
if rid != "" {
- s.SetAttributes(attribute.String("X-Request-ID", rid))
- } else {
- s.SetAttributes(attribute.String("X-Request-ID", s.SpanContext().TraceID().String()))
+ rid = s.SpanContext().TraceID().String())
}
+ s.SetAttributes(attribute.String("X-Request-ID", rid))
+ rw.Header().Add("X-Request-ID", rid)
+
// testctx := trace.ContextWithSpanContext(ctx, s.SpanContext())
// r2 := r.Clone(testctx)
// spew.Dump(r2.Header)
if sc := s.SpanContext(); sc.HasTraceID() {
spanID, traceID := sc.SpanID().String(), sc.TraceID().String()
+ logger.FromContext(r.Context()).AddContext("X-Request-ID", rid)
// 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)
logger.FromContext(r.Context()).AddContext("trace_id",
fmt.Sprintf("%d", binary.BigEndian.Uint64(traceIDBs[8:])))
@@ -161,7 +160,6 @@ func MuxServerMiddleware(serviceName string) func(http.Handler) http.Handler {
// Used for setting up tracer provider
func newResource() *resource.Resource {
var appName string
- fmt.Println("Creating Resource")
if os.Getenv("_POD_ID") != "" {
appName = os.Getenv("_APP_NAME")
} else if os.Getenv("POD_ID") != "" {

diff:
@@ -48,7 +48,6 @@ func SetupGlobalTraceProviderAndExporter(ctx context.Context) (sdktrace.SpanExpo
}
samplingProbability = samplingProbabilityFromEnv
}
- fmt.Println("isLocal:", isLocal)
addr := fmt.Sprintf("%s:%d", defaultCollectorHost, defaultCollectorPort)
@@ -62,14 +61,12 @@ func SetupGlobalTraceProviderAndExporter(ctx context.Context) (sdktrace.SpanExpo
otlptracegrpc.WithInsecure(),
)
spanExporter, err := otlptrace.New(ctx, otlpClient)
- fmt.Println("Exporter Created")
if err != nil {
return nil, nil, fmt.Errorf("error creating exporter: %v", err)
}
tp := newTracerProvider(spanExporter, samplingProbability, newResource())
otel.SetTracerProvider(tp)
- fmt.Println("Tracer Provider Created")
logger.FromContext(ctx).InfoD("starting-tracer", logger.M{
"address": addr,
@@ -118,7 +115,6 @@ func SetupGlobalTraceProviderAndExporterForTest() (*tracetest.InMemoryExporter,
// 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(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
@@ -144,7 +140,6 @@ 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
@@ -165,7 +160,6 @@ func MuxServerMiddleware(serviceName string) func(http.Handler) http.Handler {
// Used for setting up tracer provider
func newResource() *resource.Resource {
var appName string
- fmt.Println("Creating Resource")
if os.Getenv("_POD_ID") != "" {
appName = os.Getenv("_APP_NAME")
} else if os.Getenv("POD_ID") != "" {

diff:
@@ -114,7 +114,6 @@ func (rt roundTripperWithTracing) RoundTrip(r *http.Request) (*http.Response, er
// ExtractSpanAndTraceID extracts span and trace IDs from an http request header.
func ExtractSpanAndTraceID(r *http.Request) (traceID, spanID string) {
- fmt.Println("Extracting TraceID")
s := trace.SpanFromContext(r.Context())
if s.SpanContext().HasTraceID() {
return s.SpanContext().TraceID().String(), s.SpanContext().SpanID().String()

original_message: removed unnescessary logging