RATIS-2398. Add opentelemetry-javaagent to ratis-examples and assembly#1428
RATIS-2398. Add opentelemetry-javaagent to ratis-examples and assembly#1428taklwu wants to merge 1 commit into
Conversation
|
@szetszwo @OneSizeFitsQuorum any comments? |
|
those failure are not related, but let's see if we can retrigger... org.apache.ratis.grpc.TestLinearizableReadWithGrpc |
ab0513f to
ae781fb
Compare
|
@adoroszlai @szetszwo the PR github tests looks green now, do you have any other comments? |
| if (properties.getRaw(ENABLED_KEY) != null) { | ||
| return getBoolean(properties::getBoolean, ENABLED_KEY, ENABLED_DEFAULT, logger); | ||
| } | ||
| final String fromSystem = System.getProperty(ENABLED_KEY); |
There was a problem hiding this comment.
Let's don't fallback to JVM system properties.
Ratis currently do not handle how the confs are stored (e.g. in a file, in a DB, in an external service, or JVM system properties). The application uses Ratis has to decide how to do it and pass it to Ratis via a RaftProperties object.
Also, using JVM system properties could cause problem for applications using Ratis for multiple components -- e.g. there could be two different services running in the same JVM using Ratis. They may use different confs.
There was a problem hiding this comment.
sorry for coming back on this.
it's fine to remove JVM or system properties.
When we want to use this tracing with Ozone, does it mean we need to create a special keys in Ozone e.g. hdds.ratis.client.* or hdds.ratis.server.* such that the open telemetry could be enabled?
There was a problem hiding this comment.
For Ozone, we may add a prefix to set any Ratis conf; see https://github.com/apache/ozone/blob/master/hadoop-hdds/docs/content/feature/multi-raft-support.md#advanced-ratis-configuration
| shift | ||
|
|
||
| java ${LOGGER_OPTS} -jar $ARTIFACT "$example" "$subcommand" "$@" | ||
| java ${OTEL_OPTS} ${LOGGER_OPTS} -jar $ARTIFACT "$example" "$subcommand" "$@" |
There was a problem hiding this comment.
For the example command, we could change it to get the JVM property and then set it to RaftProperties.
One idea is to add a new ExampleLuancher class, which will read JVM property and then pass it to the examples (e.g. "filestore" or "arithmetic").
|
@taklwu , please wait for RATIS-2558, which will move OpenTelemetry code and its dependency to a separated module. Or, you may update this with master...szetszwo:ratis:RATIS-2558 |
- fixed a bug that a client needs to issue the parent span in the client request
got it, I will have another update once RATIS-2558 completes |
also fixed a bug that client need to issue the parent span in the client request
What changes were proposed in this pull request?
What is the link to the Apache JIRA
RATIS-2389
How was this patch tested?
manual tests for running the https://github.com/apache/ratis/tree/master/ratis-examples locally, tested with below