-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move class to bootstrap and fix native image build
- Loading branch information
Showing
5 changed files
with
28 additions
and
22 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...va-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/InstrumentationErrors.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package datadog.trace.bootstrap; | ||
|
||
import java.util.concurrent.atomic.AtomicLong; | ||
|
||
public class InstrumentationErrors { | ||
private static final AtomicLong COUNTER = new AtomicLong(); | ||
|
||
public static long getErrorCount() { | ||
return COUNTER.get(); | ||
} | ||
|
||
@SuppressWarnings("unused") | ||
public static void incrementErrorCount() { | ||
COUNTER.incrementAndGet(); | ||
} | ||
|
||
// Visible for testing | ||
public static void resetErrorCount() { | ||
COUNTER.set(0); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters