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.
shardingsphere-agent-master-test-1  | 2024-10-29T07:25:38.816Z 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.
shardingsphere-agent-master-test-1  | 2024-10-29T07:25:39.493Z 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.
sdk install java 22.0.2-graalce
sdk use java 22.0.2-graalce

git clone git@github.com:apache/shardingsphere.git
cd ./shardingsphere/
git reset --hard d10aa6fbb6b3b1ad3b6ff2caeca9384f5ebe7937
./mvnw clean install -Prelease -T1C -DskipTests -Djacoco.skip=true -Dcheckstyle.skip=true -Drat.skip=true -Dmaven.javadoc.skip=true
./mvnw -am -pl distribution/agent -Prelease,docker -T1C -DskipTests clean package
cd ../

git clone git@github.com:linghengqian/shardingsphere-agent-master-test.git
cd ./shardingsphere-agent-master-test/
./mvnw clean package -DskipTests
docker compose up -d
docker compose logs --follow shardingsphere-agent-master-test

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