Skip to content
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

Support using the Java tracer with both -javaagent and -jar at the same time #4924

Merged

Conversation

mcculls
Copy link
Contributor

@mcculls mcculls commented Mar 20, 2023

What Does This Do

Cleans up how we load classes via the CLI to avoid checking the code source location unless we really need it.
For example, if the agent classloader is already installed then we don't need the tracer's code source location.

Motivation

This avoids a potential exception when dd-java-agent is used with both -javaagent and -jar at the same time.

(The original exception occurred because the code source location of AgentJar became null after we added dd-java-agent to the boot-class-path - determining that we're running dd-java-agent with -jar from premain turns out to be non-trivial, it was easier to adjust the code so dd-java-agent can work in both places.)

@mcculls mcculls force-pushed the mcculls/support-tracer-as-javaagent-and-jar-at-same-time branch from d083335 to 6e53f1c Compare March 20, 2023 12:37
…me time (start JMX at same time to exercise runtime metrics)
@mcculls mcculls force-pushed the mcculls/support-tracer-as-javaagent-and-jar-at-same-time branch from 6e53f1c to d1c68f7 Compare March 20, 2023 12:38
@mcculls mcculls marked this pull request as ready for review March 20, 2023 12:49
@mcculls mcculls requested a review from a team as a code owner March 20, 2023 12:49
@mcculls mcculls merged commit bf59dae into master Mar 20, 2023
@mcculls mcculls deleted the mcculls/support-tracer-as-javaagent-and-jar-at-same-time branch March 20, 2023 14:28
@github-actions github-actions bot added this to the 1.11.0 milestone Mar 20, 2023
@mcculls mcculls added comp: core Tracer core tag: no release notes Changes to exclude from release notes labels Mar 28, 2023
ValentinZakharov pushed a commit that referenced this pull request Mar 28, 2023
…me time (start JMX at same time to exercise runtime metrics) (#4924)
@PerfectSlayer PerfectSlayer added comp: tooling Build & Tooling and removed dev/tooling labels Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: core Tracer core comp: tooling Build & Tooling tag: no release notes Changes to exclude from release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants