-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<chore>: Replace deprecated 'opentracing-go' imports with 'openteleme…
…try' The 'opentracing-go' package has been deprecated, so this commit replaces the import paths from 'github.com/opentracing/opentracing-go' to 'go.opentelemetry.io/otel'. This ensures compatibility with the latest tracing libraries and best practices. and opentracing-go repository has been archived by the owner on May 24, 2023. It is now read-only. opentracing/specification#163 ref #9
- Loading branch information
Showing
11 changed files
with
124 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
docker run -d --name jaeger \ | ||
-e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \ | ||
-e COLLECTOR_OTLP_ENABLED=true \ | ||
-p 6831:6831/udp \ | ||
-p 6832:6832/udp \ | ||
-p 5778:5778 \ | ||
-p 16686:16686 \ | ||
-p 4317:4317 \ | ||
-p 4318:4318 \ | ||
-p 14250:14250 \ | ||
-p 14268:14268 \ | ||
-p 14269:14269 \ | ||
-p 9411:9411 \ | ||
jaegertracing/all-in-one:1.46 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
package global | ||
|
||
import "github.com/opentracing/opentracing-go" | ||
import ( | ||
tracesdk "go.opentelemetry.io/otel/sdk/trace" | ||
) | ||
|
||
var ( | ||
// Tracer opentracing.Tracer | ||
Tracer opentracing.Tracer | ||
// Tracer opentelemetry tracesdk | ||
Tracer *tracesdk.TracerProvider | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,6 +82,6 @@ func TestMultiHandler(t *testing.T) { | |
} | ||
|
||
func TestMain(t *testing.T) { | ||
t.SkipNow() | ||
//t.SkipNow() | ||
main() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package tracer | ||
|
||
/* | ||
span := opentracing.StartSpan("func1") | ||
defer span.Finish() | ||
// 添加标签和注释 | ||
span.SetTag("my-tag", "tag-value") | ||
span.LogKV("my-log-key", "log-value") | ||
// 在 func1 中执行代码 | ||
// ... | ||
*/ | ||
|
||
// type Plugin interface { | ||
// Name() string | ||
// Initialize(*gorm.DB) error | ||
// } |
Oops, something went wrong.