Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Tracing接入 --story=121703175 #1260

Open
wants to merge 1 commit into
base: v1.7.x
Choose a base branch
from

Conversation

fxdgg
Copy link
Collaborator

@fxdgg fxdgg commented Feb 10, 2025

No description provided.

enable: false
# service name of APM in bk-monitor
serviceName:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个配置实际没有用到吧,其他同

if len(segments) == 1 {
// Only the function name is present, no package or struct name
return "unknown", "unknown", segments[0]
} else if len(segments) == 2 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直接if就好了,不需要else if,下面 else也不需要

sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
"go.opentelemetry.io/otel/trace"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这咋空了一行捏

sdktrace.WithBatcher(exporter),
sdktrace.WithResource(res),
}
if opt.Enabled {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个逻辑是为了做什么呢,看现在的实现的话,能走到这个函数的都是true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants