Skip to content

Commit d2d5dfc

Browse files
committed
review notes
1 parent 961171e commit d2d5dfc

File tree

3 files changed

+17
-36
lines changed

3 files changed

+17
-36
lines changed

CONTRIBUTING.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ https://gradle.com/s/ila4qwp5lcf5s
8787
```
8888

8989
Opening the build scan link can sometimes take several seconds (it's a large build), but it
90-
typically makes it a lot clearer what's failing.
90+
typically makes it a lot clearer what's failing. Sometimes there will be several build scans in a
91+
log, so look for one that follows the "BUILD FAILED" message.
9192

9293
You can also try the "Explain error" button at the top of the GitHub Actions page,
9394
which often does a reasonable job of parsing the long build log and displaying the important part.

docs/contributing/debugging.md

+12
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
Debugging javaagent instrumentation can be a challenging task since instrumentation
44
code is directly inlined into target classes.
55

6+
## Indy compatible instrumentation
7+
8+
For instrumentation that has been migrated to use the
9+
[invokedynamic based instrumentation mechanism](https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/8999),
10+
you can leverage breakpoints and standard debugging strategies by adding `-PtestIndy=true` to the
11+
gradle command when running tests:
12+
13+
```
14+
./gradlew -PtestIndy=true :instrumentation:<INSTRUMENTATION_NAME>:test
15+
```
16+
17+
618
## Advice methods
719

820
Breakpoints do not work in advice methods, because their code is directly inlined

docs/contributing/running-tests.md

+3-35
Original file line numberDiff line numberDiff line change
@@ -105,40 +105,8 @@ The following environment variables can be used for configuration:
105105

106106
# Troubleshooting CI Test Failures
107107

108-
CI test logs are pretty large, sometimes exceeding 75MB. To make it easier to troubleshoot test failures, you can download or
109-
view the raw logs from the CI job and then look for `Publishing build scan...` in the logs. There may be several occurrences
110-
of this phrase, so look for the one that follows "BUILD FAILED".
108+
See [Troubleshooting CI Test Failures](../../CONTRIBUTING.md#troubleshooting-pr-build-failures) for common issues and solutions.
111109

112-
Example:
110+
# Debugging
113111

114-
```
115-
2025-01-01T05:06:24.8710392Z BUILD FAILED in 15m 4s
116-
2025-01-01T05:06:24.8710682Z
117-
2025-01-01T05:06:24.8713216Z 1121 actionable tasks: 1103 executed, 18 up-to-date
118-
2025-01-01T05:06:25.2671952Z
119-
2025-01-01T05:06:25.2672609Z Publishing build scan...
120-
2025-01-01T05:06:25.4674291Z https://gradle.com/s/u4vbxhlidd5ka
121-
```
122-
123-
Copy the gradle.com URL and open it in a browser. This will give you a nice view of the test execution breakdown.
124-
125-
## How to download the raw logs
126-
127-
1. Click on the `Details` link in one of the failing CI jobs under `Some checks were not successful` section of your PR.
128-
2. Click on one of the failed tests in the left panel.
129-
3. Click on the `Setting` gear in the top right corner of the logs panel.
130-
4. Right click on 'View raw logs' and then 'Save link as' to save the page as a text file locally.
131-
5. Once the file is downloaded, open it in a text editor and search for `Publishing build scan...` that follows an occurrence of "BUILD FAILED" to find the URL.
132-
6. Open the URL in a browser to view the test execution breakdown. It might prompt you to "Activate your Build Scan" the very 1st time, you can use your own email address and activate it via email.
133-
134-
Unfortunately, the Build Scan service hosted via Develocity has an allowed size limits of the free build scans. Once you exceed the limit, then you won't be able to view the scan anymore.
135-
Then you can just use the raw logs to search for "FAILED" or "Task failed with an exception" to identify the failing tests.
136-
137-
# Using breakpoints in instrumentation
138-
139-
For instrumentation that has been migrated to use the [invokedynamic based instrumentation mechanism](https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/8999),
140-
you can leverage breakpoints and standard debugging strategies by adding `-PtestIndy=true` to the gradle command:
141-
142-
```
143-
./gradlew -PtestIndy=true :instrumentation:<INSTRUMENTATION_NAME>:test
144-
```
112+
For information on debugging tests or instrumentation, see [Debugging](debugging.md).

0 commit comments

Comments
 (0)