standardize commonly used attributes
Some commonly used at maal attributes have been encoded as consts with convinience wrappers similar to those of semconv package from otel sdk. Additionally some utils that can generate mutliple attributes were added.
This commit is contained in:
1 parent
6fb12e9e9d
commit
ab5b70704d
8 files changed
+389
-66
No files matched your search
+2
-2
@@ -70,7 +70,7 @@ func main() {
|
||||
}
|
||||
|
||||
func Serv(ctx context.Context) *fiber.Error {
|
||||
ctx, span := tracer.Service(ctx, "name of the span")
|
||||
ctx, span := tracer.Service(ctx, "service", "service span")
|
||||
defer span.End()
|
||||
|
||||
for range []int{1, 2, 3} {
|
||||
@@ -86,7 +86,7 @@ func Serv(ctx context.Context) *fiber.Error {
|
||||
}
|
||||
|
||||
func Repo(ctx context.Context) error {
|
||||
ctx, span := tracer.Repository(ctx, "name of the span")
|
||||
ctx, span := tracer.Repository(ctx, "repo", "repo span")
|
||||
defer span.End()
|
||||
|
||||
for range []int{1, 2, 3} {
|
||||
|
||||
Reference in new issue
Block a user