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

Using the OpenTelemerty plugin with Agent will throw some undocumented exceptions #32793

Open
linghengqian opened this issue Sep 4, 2024 · 0 comments
Labels
feature: agent shardingsphere agent

Comments

@linghengqian
Copy link
Member

Bug Report

For English only, other languages will not accept.

Before report a bug, make sure you have:

Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Which version of ShardingSphere did you use?

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

  • ShardingSphere-JDBC

Expected behavior

  • OpenTelemerty plugin using Agent should not throw any undocumented exceptions.

Actual behavior

  • Using the OpenTelemerty plugin with Agent will throw some undocumented exceptions.
2024-09-04T17:46:36.946+08:00 ERROR 45222 --- [shardingsphere-agent-master-test] [           main] s.a.c.a.e.t.InstanceMethodAdviceExecutor : Failed to execute the pre-method of method `parse` in class `org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine`, Cannot invoke "org.apache.shardingsphere.shade.io.opentelemetry.context.ImplicitContextKeyed.storeInContext(org.apache.shardingsphere.shade.io.opentelemetry.context.Context)" because "value" is null.
2024-09-04T17:46:37.336+08:00 ERROR 45222 --- [shardingsphere-agent-master-test] [           main] s.a.c.a.e.t.InstanceMethodAdviceExecutor : Failed to execute the post-method of method `parse` in class `org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine`, Cannot invoke "org.apache.shardingsphere.shade.io.opentelemetry.api.trace.Span.setStatus(org.apache.shardingsphere.shade.io.opentelemetry.api.trace.StatusCode)" because "span" is null.

Reason analyze (If you can)

  • Not yet confirmed.

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

  • Execute the following commands on Ubuntu 22.04.4 WSL with Docker Engine and SDKMAN! installed.
  • The Jaeger UI is at http://localhost:16686/, and the ingestion backend that accepts data over the OpenTelemetry
    protocol over GRPC is at http://localhost:4317.
sdk install java 22.0.2-graalce

git clone git@github.com:apache/shardingsphere.git
cd ./shardingsphere/
git reset --hard 1a41252ff91ce497c4b117dff87defc5abda5e28
sdk use java 22.0.2-graalce
./mvnw clean install -Prelease -T1C -DskipTests -Djacoco.skip=true -Dcheckstyle.skip=true -Drat.skip=true -Dmaven.javadoc.skip=true
cd ../

git clone git@github.com:linghengqian/shardingsphere-agent-master-test.git
cd ./shardingsphere-agent-master-test/

docker run --rm -d \
  -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
  -p 16686:16686 \
  -p 4317:4317 \
  -p 4318:4318 \
  -p 9411:9411 \
  jaegertracing/all-in-one:1.60.0

./mvnw clean spring-boot:run \
  -Dspring-boot.run.agents="./apache-shardingsphere-5.5.1-SNAPSHOT-shardingsphere-agent-bin/agent/shardingsphere-agent-5.5.1-SNAPSHOT.jar"

Example codes for reproduce this issue (such as a github link).

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

No branches or pull requests

2 participants