MCPcopy Index your code
hub / github.com/elastic/apm-agent-java

github.com/elastic/apm-agent-java @v1.56.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.56.0 ↗ · + Follow
17,239 symbols 73,772 edges 2,076 files 1,446 documented · 8%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

main codecov Maven Central

apm-agent-java

Please fill out this survey to help us prioritizing framework support: https://docs.google.com/forms/d/e/1FAIpQLScd0RYiwZGrEuxykYkv9z8Hl3exx_LKCtjsqEo1OWx8BkLrOQ/viewform?usp=sf_link

Release announcements

To get notified about new releases, watch this repository for Releases only.

Documentation

Docs are located here.

Getting Help

If you find a bug or an issue, please 1. open a new topic on the APM discuss forum (or add to an existing one) 1. report an issue on the java agent repository

Please note that we reserve GitHub tickets for actionable things we can work on, thus confirmed bugs and enhancement requests only.

Help requests are better served in APM discuss forum.

Contributing

See the contributing documentation

Build form source

Execute ./mvnw clean install -DskipTests=true -Dmaven.javadoc.skip=true to build the artifacts and to install them to your local maven repository. The build process requires JDK 17. The agent jar is in the folder elastic-apm-agent/target.

License

Elastic APM Java Agent is licensed under Apache License, Version 2.0.

Extension points exported contracts — how you extend this code

ValueSupplier (Interface)
Supplies a value, given a key. @param the key type @param the value type [78 implementers]
apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/weakconcurrent/WeakKeySoftValueLoadingCache.java
BootstrapCheck (Interface)
A check that gets executed when the agent starts up. If any check fails, the agent won't start unless the {@code elastic [8 …
elastic-apm-agent-premain/src/main/java/co/elastic/apm/agent/premain/BootstrapCheck.java
Scope (Interface)
Within a scope, a AbstractSpan is active on the current thread. Calling #close() detaches them from the [70 implementers]
apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Scope.java
Scope (Interface)
Scopes are designed to be used in combination with try-with-resource statements to remove {@link Span#activate() activat [75 …
apm-agent-api/src/main/java/co/elastic/apm/api/Scope.java
Resetter (Interface)
Defines reset strategy to use for a given pooled object type when they are returned to pool @param pooled object ty [22 …
apm-agent-core/src/main/java/co/elastic/apm/agent/objectpool/Resetter.java
LongLongConsumer (Interface)
This is an (long, long) primitive specialisation of a BiConsumer [24 implementers]
apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/collections/LongLongConsumer.java
HelloWorldService (Interface)
(no doc) [16 implementers]
integration-tests/soap-test/src/main/java/co/elastic/apm/soap/HelloWorldService.java
JvmDiscoverer (Interface)
(no doc) [6 implementers]
apm-agent-attach-cli/src/main/java/co/elastic/apm/attach/JvmDiscoverer.java

Core symbols most depended-on inside this repo

get
called by 1420
apm-agent-core/src/main/java/co/elastic/apm/agent/metrics/builtin/JvmMemoryMetrics.java
get
called by 1180
apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/weakconcurrent/WeakMap.java
of
called by 730
apm-agent-plugins/apm-java-concurrent-plugin/src/test/java/co/elastic/apm/agent/concurrent/ExecutorServiceInstrumentationTest.java
end
called by 628
apm-agent-api/src/main/java/co/elastic/apm/api/Span.java
add
called by 496
apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/weakconcurrent/WeakSet.java
isEmpty
called by 487
apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/Id.java
append
called by 476
apm-agent-tracer/src/main/java/co/elastic/apm/agent/tracer/metadata/BodyCapture.java
put
called by 438
apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/weakconcurrent/WeakMap.java

Shape

Method 14,204
Class 2,791
Interface 185
Enum 59

Languages

Java100%

Modules by API surface

apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/sql/BlackholeConnection.java214 symbols
apm-agent-core/src/test/java/co/elastic/apm/agent/bci/InstrumentationTest.java173 symbols
apm-agent-core/src/main/java/co/elastic/apm/agent/report/serialize/DslJsonSerializer.java112 symbols
apm-agent-plugins/apm-api-plugin/src/main/java/co/elastic/apm/agent/pluginapi/AbstractSpanInstrumentation.java100 symbols
apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/sql/BlackholeResultSet.java98 symbols
apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java84 symbols
apm-agent-core/src/test/java/co/elastic/apm/agent/report/serialize/DslJsonSerializerTest.java79 symbols
apm-agent-benchmarks/src/main/java/co/elastic/apm/agent/benchmark/MockHttpServletRequest.java74 symbols
apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/collections/Long2LongHashMap.java71 symbols
apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/collections/Int2IntHashMap.java71 symbols
apm-agent-core/src/main/java/co/elastic/apm/agent/impl/transaction/AbstractSpanImpl.java71 symbols
apm-agent-plugins/apm-profiling-plugin/src/main/java/co/elastic/apm/agent/profiler/collections/Long2ObjectHashMap.java67 symbols

Datastores touched

(mongodb)Database · 1 repos
(mysql)Database · 1 repos
dbDatabase · 1 repos
sakilaDatabase · 1 repos
dbDatabase · 1 repos

For agents

$ claude mcp add apm-agent-java \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact