Cloudwatch: Remove core imports from infra/log (#81543)

* Cloudwatch: use logging from plugin-sdk-go instead of infra/log
* Add a link to the TODO issue for moving `instrumentContext`
This commit is contained in:
Nathan Vērzemnieks
2024-02-07 13:53:05 +01:00
committed by GitHub
parent c16cb7ed3c
commit b5f26560c2
28 changed files with 211 additions and 172 deletions
+10
View File
@@ -1,3 +1,13 @@
package utils
import "github.com/go-stack/stack"
func Pointer[T any](arg T) *T { return &arg }
// Stack is copied from grafana/pkg/infra/log
// TODO: maybe this should live in grafana-plugin-sdk-go?
func Stack(skip int) string {
call := stack.Caller(skip)
s := stack.Trace().TrimBelow(call).TrimRuntime()
return s.String()
}