Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
oldme-git committed Mar 22, 2024
1 parent 313d9d1 commit f7c1ed5
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 0 deletions.
5 changes: 5 additions & 0 deletions example/trace/grpc-with-db/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
package main

import (
"time"

"github.com/gogf/gf/contrib/registry/etcd/v2"
"github.com/gogf/gf/contrib/rpc/grpcx/v2"
"github.com/gogf/gf/contrib/trace/otlpgrpc/v2"
Expand Down Expand Up @@ -81,4 +83,7 @@ func StartRequests() {
return
}
g.Log().Info(ctx, "delete id:", -1)

// Leave a little time to complete the report.
time.Sleep(3 * time.Second)
}
5 changes: 5 additions & 0 deletions example/trace/http-with-db/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
package main

import (
"time"

"github.com/gogf/gf/contrib/trace/otlphttp/v2"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
Expand Down Expand Up @@ -81,4 +83,7 @@ func StartRequests() {
panic(err)
}
g.Log().Info(ctx, "delete result:", deleteRes)

// Leave a little time to complete the report.
time.Sleep(3 * time.Second)
}
5 changes: 5 additions & 0 deletions example/trace/http/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
package main

import (
"time"

"github.com/gogf/gf/contrib/trace/otlphttp/v2"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/gtrace"
Expand Down Expand Up @@ -39,4 +41,7 @@ func StartRequests() {

content := g.Client().GetContent(ctx, "http://127.0.0.1:8199/hello")
g.Log().Print(ctx, content)

// Leave a little time to complete the report.
time.Sleep(3 * time.Second)
}
4 changes: 4 additions & 0 deletions example/trace/inprocess/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package main

import (
"context"
"time"

"github.com/gogf/gf/contrib/trace/otlphttp/v2"
"github.com/gogf/gf/v2/frame/g"
Expand Down Expand Up @@ -40,6 +41,9 @@ func main() {
// Trace 2.
user100 := GetUser(ctx, 100)
g.Dump(user100)

// Leave a little time to complete the report.
time.Sleep(3 * time.Second)
}

// GetUser retrieves and returns hard coded user data for demonstration.
Expand Down
5 changes: 5 additions & 0 deletions example/trace/otlp/grpc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
package main

import (
"time"

"github.com/gogf/gf/contrib/trace/otlpgrpc/v2"

"github.com/gogf/gf/v2/frame/g"
Expand All @@ -29,6 +31,9 @@ func main() {
defer shutdown()

StartRequests()

// Leave a little time to complete the report.
time.Sleep(3 * time.Second)
}

// StartRequests starts requests.
Expand Down
5 changes: 5 additions & 0 deletions example/trace/otlp/http/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
package main

import (
"time"

"github.com/gogf/gf/contrib/trace/otlphttp/v2"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/gtrace"
Expand All @@ -28,6 +30,9 @@ func main() {
defer shutdown()

StartRequests()

// Leave a little time to complete the report.
time.Sleep(3 * time.Second)
}

// StartRequests starts requests.
Expand Down

0 comments on commit f7c1ed5

Please sign in to comment.