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

io.opentelemetry:opentelemetry-bom should be updated from 1.31.0 to 1.41.0 #32786

Closed
linghengqian opened this issue Sep 3, 2024 · 6 comments · Fixed by #32790
Closed

io.opentelemetry:opentelemetry-bom should be updated from 1.31.0 to 1.41.0 #32786

linghengqian opened this issue Sep 3, 2024 · 6 comments · Fixed by #32790
Labels
feature: agent shardingsphere agent type: dependencies Pull requests that update a dependency file

Comments

@linghengqian
Copy link
Member

Feature Request

For English only, other languages will not be accepted.

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

Please answer these questions before submitting your issue. Thanks!

Is your feature request related to a problem?

  • No.

Describe the feature you would like.

  • io.opentelemetry:opentelemetry-bom should be updated from 1.31.0 to 1.41.0.
  • The io.opentelemetry:opentelemetry-bom version used by the master branch is too old, which results in the following error when trying to export data to Elastic APM Server through the OpenTelemetry Plugin of ShardingSphere Agent. This uses ShardingSphere JDBC and ShardingSphere Agent from 6e356c8 .
2024-09-03T14:19:20.849+08:00 ERROR 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] 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-03T14:19:20.849+08:00 ERROR 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] 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.
2024-09-03T14:19:20.849+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Logic SQL: SELECT * FROM t_order
2024-09-03T14:19:20.850+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT * FROM t_order_0 UNION ALL SELECT * FROM t_order_1 UNION ALL SELECT * FROM t_order_2
2024-09-03T14:19:20.851+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Logic SQL: SELECT i.* FROM t_order o, t_order_item i WHERE o.order_id = i.order_id
2024-09-03T14:19:20.851+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_0 o, t_order_item_0 i WHERE o.order_id = i.order_id
2024-09-03T14:19:20.851+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_0 o, t_order_item_1 i WHERE o.order_id = i.order_id
2024-09-03T14:19:20.851+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_0 o, t_order_item_2 i WHERE o.order_id = i.order_id
2024-09-03T14:19:20.851+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_1 o, t_order_item_0 i WHERE o.order_id = i.order_id
2024-09-03T14:19:20.851+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_1 o, t_order_item_1 i WHERE o.order_id = i.order_id
2024-09-03T14:19:20.851+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_1 o, t_order_item_2 i WHERE o.order_id = i.order_id
2024-09-03T14:19:20.851+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_2 o, t_order_item_0 i WHERE o.order_id = i.order_id
2024-09-03T14:19:20.851+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_2 o, t_order_item_1 i WHERE o.order_id = i.order_id
2024-09-03T14:19:20.851+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_2 o, t_order_item_2 i WHERE o.order_id = i.order_id
2024-09-03T14:19:20.852+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Logic SQL: SELECT * FROM t_address
2024-09-03T14:19:20.852+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT * FROM t_address
2024-09-03T14:19:20.852+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Logic SQL: INSERT INTO t_order_item (order_id, user_id, phone, status) VALUES (2024, 2024, '13800000001', 'INSERT_TEST')
2024-09-03T14:19:20.852+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: INSERT INTO t_order_item_0 (order_id, user_id, phone, status, ORDER_ITEM_ID) VALUES (2024, 2024, '13800000001', 'INSERT_TEST', 1037732721100587008)
2024-09-03T14:19:20.853+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Logic SQL: SELECT * FROM t_order_item WHERE user_id = 2024
2024-09-03T14:19:20.853+08:00  INFO 210444 --- [shardingsphere-smoke-tests] [cat-handler-138] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT * FROM t_order_item_0 WHERE user_id = 2024
  • This ultimately manifests itself in Kibana's incomplete links.
  • image
@jiangML
Copy link
Contributor

jiangML commented Sep 4, 2024

@linghengqian Hi, thanks for your suggestion, can this problem be fixed after upgrading the version?

@linghengqian
Copy link
Member Author

@linghengqian Hi, thanks for your suggestion, can this problem be fixed after upgrading the version?

I haven't opened the PR to see what happens in CI. Creating unit tests for the current issue is a bit of a hassle, mainly because Elastic APM Server cannot be started independently, it needs to start 5 prerequisite Docker Images first. Let me see if there is any problem with CI first.

@linghengqian
Copy link
Member Author

linghengqian commented Sep 4, 2024

2024-09-04T12:53:11.348+08:00 ERROR 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] 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-04T12:53:11.348+08:00 ERROR 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] 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.
2024-09-04T12:53:11.348+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Logic SQL: SELECT * FROM t_order
2024-09-04T12:53:11.348+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT * FROM t_order_0 UNION ALL SELECT * FROM t_order_1 UNION ALL SELECT * FROM t_order_2
2024-09-04T12:53:11.350+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Logic SQL: SELECT i.* FROM t_order o, t_order_item i WHERE o.order_id = i.order_id
2024-09-04T12:53:11.351+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_0 o, t_order_item_0 i WHERE o.order_id = i.order_id
2024-09-04T12:53:11.351+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_0 o, t_order_item_1 i WHERE o.order_id = i.order_id
2024-09-04T12:53:11.351+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_0 o, t_order_item_2 i WHERE o.order_id = i.order_id
2024-09-04T12:53:11.351+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_1 o, t_order_item_0 i WHERE o.order_id = i.order_id
2024-09-04T12:53:11.351+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_1 o, t_order_item_1 i WHERE o.order_id = i.order_id
2024-09-04T12:53:11.351+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_1 o, t_order_item_2 i WHERE o.order_id = i.order_id
2024-09-04T12:53:11.351+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_2 o, t_order_item_0 i WHERE o.order_id = i.order_id
2024-09-04T12:53:11.351+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_2 o, t_order_item_1 i WHERE o.order_id = i.order_id
2024-09-04T12:53:11.351+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_2 o, t_order_item_2 i WHERE o.order_id = i.order_id
2024-09-04T12:53:11.353+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Logic SQL: SELECT * FROM t_address
2024-09-04T12:53:11.353+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT * FROM t_address
2024-09-04T12:53:11.354+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Logic SQL: INSERT INTO t_order_item (order_id, user_id, phone, status) VALUES (2024, 2024, '13800000001', 'INSERT_TEST')
2024-09-04T12:53:11.354+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: INSERT INTO t_order_item_0 (order_id, user_id, phone, status, ORDER_ITEM_ID) VALUES (2024, 2024, '13800000001', 'INSERT_TEST', 1038073426515853312)
2024-09-04T12:53:11.356+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Logic SQL: SELECT * FROM t_order_item WHERE user_id = 2024
2024-09-04T12:53:11.356+08:00  INFO 52021 --- [shardingsphere-smoke-tests] [mcat-handler-10] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT * FROM t_order_item_0 WHERE user_id = 2024
  • This Error Log follows each newly started virtual thread of Spring Boot 3.3.3 under GraalVM CE For JDK 22.0.2. Then I discovered something even more amazing.
  • I changed spring.threads.virtual.enabled from true to false to make the default TaskScheduler Spring Bean use only platform threads. Now, this Error Log only appears for a few platform threads at startup. The Spring Boot application continues to run without this Error Log.
2024-09-04T12:56:33.746+08:00 ERROR 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] 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-04T12:56:33.747+08:00 ERROR 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] 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.
2024-09-04T12:56:33.748+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Logic SQL: SELECT * FROM t_order
2024-09-04T12:56:33.748+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT * FROM t_order_0 UNION ALL SELECT * FROM t_order_1 UNION ALL SELECT * FROM t_order_2
2024-09-04T12:56:33.751+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Logic SQL: SELECT i.* FROM t_order o, t_order_item i WHERE o.order_id = i.order_id
2024-09-04T12:56:33.751+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_0 o, t_order_item_0 i WHERE o.order_id = i.order_id
2024-09-04T12:56:33.751+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_0 o, t_order_item_1 i WHERE o.order_id = i.order_id
2024-09-04T12:56:33.751+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_0 o, t_order_item_2 i WHERE o.order_id = i.order_id
2024-09-04T12:56:33.751+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_1 o, t_order_item_0 i WHERE o.order_id = i.order_id
2024-09-04T12:56:33.751+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_1 o, t_order_item_1 i WHERE o.order_id = i.order_id
2024-09-04T12:56:33.751+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_1 o, t_order_item_2 i WHERE o.order_id = i.order_id
2024-09-04T12:56:33.751+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_2 o, t_order_item_0 i WHERE o.order_id = i.order_id
2024-09-04T12:56:33.751+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_2 o, t_order_item_1 i WHERE o.order_id = i.order_id
2024-09-04T12:56:33.751+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT i.* FROM t_order_2 o, t_order_item_2 i WHERE o.order_id = i.order_id
2024-09-04T12:56:33.755+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Logic SQL: SELECT * FROM t_address
2024-09-04T12:56:33.756+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT * FROM t_address
2024-09-04T12:56:33.758+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Logic SQL: INSERT INTO t_order_item (order_id, user_id, phone, status) VALUES (2024, 2024, '13800000001', 'INSERT_TEST')
2024-09-04T12:56:33.758+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: INSERT INTO t_order_item_0 (order_id, user_id, phone, status, ORDER_ITEM_ID) VALUES (2024, 2024, '13800000001', 'INSERT_TEST', 1038074275459760128)
2024-09-04T12:56:33.760+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Logic SQL: SELECT * FROM t_order_item WHERE user_id = 2024
2024-09-04T12:56:33.760+08:00  INFO 56889 --- [shardingsphere-smoke-tests] [nio-8080-exec-7] ShardingSphere-SQL                       : Actual SQL: ds_0 ::: SELECT * FROM t_order_item_0 WHERE user_id = 2024
  • @jiangML Am I missing some documentation? This Error Log appears following thread creation, whether it is a virtual thread or a platform thread on OpenJDK 22.0.2. I use the following agent.yaml configuration for shardingsphere agent. http://localhost:34321 points to the host port of Elastic Agent with Elastic APM policy enabled.
plugins:
  tracing:
    OpenTelemetry:
      props:
        otel.service.name: "5-shardingsphere-smoke-tests"
        otel.traces.sampler: "always_on"
        otel.exporter.otlp.traces.endpoint: "http://localhost:34321"

@linghengqian linghengqian added the type: dependencies Pull requests that update a dependency file label Sep 4, 2024
@jiangML jiangML added the feature: agent shardingsphere agent label Sep 4, 2024
@jiangML
Copy link
Contributor

jiangML commented Sep 4, 2024

@linghengqian
The error is caused by the mismatch between the Agent and JDBC that should be used.
image

@linghengqian
Copy link
Member Author

@linghengqian The error is caused by the mismatch between the Agent and JDBC that should be used. image

@jiangML
Copy link
Contributor

jiangML commented Sep 6, 2024

Ok thanks for the feedback, I'll test it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: agent shardingsphere agent type: dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants