-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-22120 Replace HTrace with OpenTelemetry #2901
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
Changes from all commits
db77af8
da67fad
a7ba387
92fd790
8704b90
b2c76d1
b4239a4
acc8b0e
4a6e539
fcda8b6
17e4fd9
a854b22
1f79571
2a8da1f
29480e2
d7b490a
c12e0a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -480,6 +480,11 @@ add_jdk11_deps_to_classpath() { | |
| done | ||
| } | ||
|
|
||
| enable_trace() { | ||
| agent_jar=$(find lib/trace -type f -name "opentelemetry-javaagent-*") | ||
| HBASE_OPTS="$HBASE_OPTS -javaagent:$agent_jar $HBASE_TRACE_OPTS" | ||
| } | ||
|
|
||
| #Add the development env class path stuff | ||
| if $in_dev_env; then | ||
| add_maven_deps_to_classpath "cached_classpath.txt" | ||
|
|
@@ -772,6 +777,11 @@ elif [ "${DEBUG}" = "true" ]; then | |
| echo "JDK11 jars skipped from classpath." | ||
| fi | ||
|
|
||
| if [[ -n "${HBASE_TRACE_OPTS}" ]]; then | ||
| echo "Attach opentelemetry agent to enable trace" | ||
| enable_trace | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This trick looks good. Where will you document it? Maybe if there was an 'hbase trace' command and if you ran it, you'd get output telling you to populate HBASE_TRACE_OPTs giving examples... perhaps that would be enough to get folks going? Would also advertise the new facility exits.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In hbase-env.sh, uncomment the last line and modify the options. Will fill this in the ref guide. |
||
| fi | ||
|
|
||
| # Have JVM dump heap if we run out of memory. Files will be 'launch directory' | ||
| # and are named like the following: java_pid21612.hprof. Apparently it doesn't | ||
| # 'cost' to have this flag enabled. Its a 1.6 flag only. See: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'll just fail if two classes w/ same prefix... that is fine I think and shouldn't happen usually.