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

linghengqian commented Sep 4, 2024

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-21T02:48:58.999Z ERROR 1 --- [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-21T02:48:59.572Z ERROR 1 --- [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 [email protected]:apache/shardingsphere.git
cd ./shardingsphere/
git reset --hard aa99ff660c6ad27cd9e7ae4f4ab9d7472ec47bef
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 ../

docker network create lingh-test
docker run --rm -d \
  --name jaeger \
  -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
  -p 16686:16686 \
  -p 4317:4317 \
  -p 4318:4318 \
  -p 9411:9411 \
  --network lingh-test \
  jaegertracing/all-in-one:1.60.0

git clone [email protected]:linghengqian/shardingsphere-agent-master-test.git
cd ./shardingsphere-agent-master-test/
./mvnw clean package -DskipTests && docker build -t linghengqian/shardingsphere-agent-master-test:latest .
docker run -p 8080:8080 --network lingh-test linghengqian/shardingsphere-agent-master-test:latest

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