-
Notifications
You must be signed in to change notification settings - Fork 1k
Intercept metrics in test runner #13891
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
0956fd7
5b71e52
275b5d5
22a06ce
1630e8d
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 |
---|---|---|
|
@@ -57,6 +57,7 @@ derby.log | |
hs_err_pid* | ||
replay_pid* | ||
.attach_pid* | ||
**/.telemetry* | ||
|
||
!java-agent/benchmark/releases/*.jar | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
plugins { | ||
id("otel.java-conventions") | ||
id("otel.nullaway-conventions") | ||
} | ||
|
||
otelJava { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
|
||
instrumentations=( | ||
"alibaba-druid-1.0:javaagent:test" | ||
) | ||
|
||
# Initialize an empty string to hold the Gradle tasks | ||
gradle_tasks="" | ||
|
||
# Iterate over each instrumentation | ||
for instrumentation in "${instrumentations[@]}"; do | ||
# Extract the parts of the instrumentation | ||
IFS=':' read -r -a parts <<< "$instrumentation" | ||
module="${parts[0]}" | ||
version="${parts[1]}" | ||
type="${parts[2]}" | ||
suffix="${parts[3]}" | ||
|
||
# Assemble the path to the instrumentation | ||
path="instrumentation/$module/$version" | ||
|
||
# Remove any occurrence of /javaagent/ or /library/ from the path | ||
path=$(echo "$path" | sed -e 's/\/javaagent//g' -e 's/\/library//g') | ||
|
||
# Debugging: Print the path being checked | ||
echo "Checking path: $path/.telemetry" | ||
|
||
# Check if the .telemetry directory exists and remove it if it does | ||
if [ -d "$path/.telemetry" ]; then | ||
echo "Removing directory: $path/.telemetry" | ||
rm -rf "$path/.telemetry" | ||
else | ||
echo "Directory does not exist: $path/.telemetry" | ||
fi | ||
|
||
# Append the Gradle task to the gradle_tasks string with a colon between type and suffix if suffix is non-empty | ||
if [ -n "$suffix" ]; then | ||
gradle_tasks+=":instrumentation:$module:$version:$type:$suffix" | ||
else | ||
gradle_tasks+=":instrumentation:$module:$version:$type" | ||
fi | ||
done | ||
|
||
# rerun-tasks is used to force re-running tests that might be cached | ||
echo Running: ./gradlew "$gradle_tasks" -PcollectMetadata=true --rerun-tasks | ||
./gradlew "$gradle_tasks" -PcollectMetadata=true --rerun-tasks | ||
./gradlew :instrumentation-docs:runAnalysis | ||
|
||
# Remove all .telemetry directories recursively from the project root | ||
echo "Searching for and removing all .telemetry directories..." | ||
find . -type d -name ".telemetry" -exec rm -rf {} + | ||
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. @trask - from your question during the SIG meeting:
|
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.
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.
there is a directory generated per instrumentation module
Uh oh!
There was an error while loading. Please reload this page.
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 should work
if you only want to ignore it in the root, it would be different: