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

opentracing.enable not work after v7.1.0 #50508

Closed
Defined2014 opened this issue Jan 17, 2024 · 0 comments · Fixed by #50551
Closed

opentracing.enable not work after v7.1.0 #50508

Defined2014 opened this issue Jan 17, 2024 · 0 comments · Fixed by #50551
Assignees

Comments

@Defined2014
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

First start jaeger with command below

docker run --rm -d -p6831:6831/udp -p16686:16686 --name jaeger jaegertracing/all-in-one:latest

Use the config below to start a TiDB cluster

diff --git a/pkg/config/config.toml.example b/pkg/config/config.toml.example
index 47096de93e..5bfdd81049 100644
--- a/pkg/config/config.toml.example
+++ b/pkg/config/config.toml.example
@@ -301,7 +301,7 @@ header-timeout = 5

 [opentracing]
 # Enable opentracing.
-enable = false
+enable = true

 # Whether to enable the rpc metrics.
 rpc-metrics = false
@@ -321,7 +321,7 @@ type = "const"
 param = 1.0

 # SamplingServerURL is the address of jaeger-agent's HTTP sampling server
-sampling-server-url = ""
+sampling-server-url = "192.168.1.22:6831"

 # MaxOperations is the maximum number of operations that the sampler
 # will keep track of. If an operation is not tracked, a default probabilistic
@@ -330,25 +330,25 @@ max-operations = 0

 # SamplingRefreshInterval controls how often the remotely controlled sampler will poll
 # jaeger-agent for the appropriate sampling strategy.
-sampling-refresh-interval = 0
+sampling-refresh-interval = 5

 [opentracing.reporter]
 # QueueSize controls how many spans the reporter can keep in memory before it starts dropping
 # new spans. The queue is continuously drained by a background go-routine, as fast as spans
 # can be sent out of process.
-queue-size = 0
+queue-size = 1000

 # BufferFlushInterval controls how often the buffer is force-flushed, even if it's not full.
 # It is generally not useful, as it only matters for very low traffic services.
-buffer-flush-interval = 0
+buffer-flush-interval = 5

 # LogSpans, when true, enables LoggingReporter that runs in parallel with the main reporter
 # and logs all submitted spans. Main Configuration.Logger must be initialized in the code
 # for this option to have any effect.
-log-spans = false
+log-spans = true

 #  LocalAgentHostPort instructs reporter to send spans to jaeger-agent at this address
-local-agent-host-port = ""
+local-agent-host-port = "192.168.1.22:6831"

 [pd-client]
 # Max time which PD client will wait for the PD server in seconds.
@@ -476,7 +476,7 @@ tidb_check_mb4_value_in_utf8 = true
 tidb_enable_slow_log = true

 # Queries with execution time greater than this value will be logged. (Milliseconds)
-tidb_slow_log_threshold = 300
+tidb_slow_log_threshold = 30

run SQL below

create table t(a int);
insert into t values (1);
select *, sleep(0.1) from t;

Then access Jaeger UI to get trace information.

2. What did you expect to see? (Required)

See SQL related information, like

image

3. What did you see instead (Required)

Nothing related with slow sql.

4. What is your TiDB version? (Required)

Happened after v7.1.0

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

Successfully merging a pull request may close this issue.

1 participant