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

github.com/elastic/apm-agent-go @v2.7.12

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.7.12 ↗ · + Follow
2,671 symbols 13,302 edges 404 files 880 documented · 33%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Build Status PkgGoDev Go Report Card codecov.io

NOTE: This repository is in maintenance mode. Bug fixes will continue to be applied, but no new features will be implemented. To replace this agent, we recommend you to migrate to the OpenTelemetry Go API and SDK, which provides similar features. In order to help you do a seamless migration, we recommend using our OpenTelemetry Bridge. Please refer to the blog post above for further details.

apm-agent-go: APM Agent for Go

This is the official Go package for Elastic APM.

The Go agent enables you to trace the execution of operations in your application, sending performance metrics and errors to the Elastic APM server.

Installation

Within a Go module:

go get go.elastic.co/apm/v2

Requirements

Requires APM Server v6.5 or newer.

You can find a list of the supported frameworks and other technologies in the documentation.

License

Apache 2.0.

Documentation

Elastic APM Go documentation.

Getting Help

If you find a bug, please report an issue. For any other assistance, please open or add to a topic on the APM discuss forum.

Extension points exported contracts — how you extend this code

Transport (Interface)
Transport provides an interface for sending streams of encoded model entities to the Elastic APM server, and for queryin [6 …
transport/api.go
Conn (Interface)
Conn is the interface returned by ContextConn. Conn's Do method reports spans using the bound context. [5 implementers]
module/apmredigo/conn.go
MetricsGatherer (Interface)
MetricsGatherer provides an interface for gathering metrics. [4 implementers]
metrics.go
Logger (Interface)
import "go.elastic.co/apm/v2" Logger is an interface for logging, used by the tracer to log tracer errors and other inte [3 …
logger.go
Client (Interface)
Client is the interface returned by Wrap. Client implements redis.UniversalClient [3 implementers]
module/apmgoredis/client.go
Logger (Interface)
Logger defines the interface for logging while fetching cloud metadata. [3 implementers]
internal/apmcloudutil/provider.go
Sampler (Interface)
Sampler provides a means of sampling transactions. [1 implementers]
sampler.go
Causer (Interface)
(no doc) [3 implementers]
error_test.go

Core symbols most depended-on inside this repo

Len
called by 349
internal/ringbuffer/buffer.go
End
called by 246
span.go
Payloads
called by 246
transport/transporttest/recorder.go
Close
called by 238
module/apmhttp/client.go
Close
called by 209
tracer.go
Run
called by 199
module/apmzerolog/context.go
NewRecorderTracer
called by 167
transport/transporttest/recorder.go
Add
called by 144
metrics.go

Shape

Function 1,411
Method 805
Struct 345
FuncType 47
TypeAlias 33
Interface 30

Languages

Go100%

Modules by API surface

model/model.go61 symbols
error_test.go54 symbols
tracer.go50 symbols
model/marshal_fastjson.go50 symbols
model/marshal.go41 symbols
error.go39 symbols
config.go38 symbols
model/marshal_test.go36 symbols
internal/apmschema/validation_test.go36 symbols
module/apmot/wrapper.go35 symbols
transport/http.go34 symbols
span_test.go32 symbols

Datastores touched

test_collCollection · 1 repos
test_dbDatabase · 1 repos
(mysql)Database · 1 repos
(mongodb)Database · 1 repos
test_dbDatabase · 1 repos
dbinstDatabase · 1 repos
mydbDatabase · 1 repos
non_existing_dbDatabase · 1 repos

For agents

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

⬇ download graph artifact