- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
Supported OS
Track the memory usage of your Go services and collect metrics instrumented from Go’s expvar package.
If you prefer to instrument your Go code using only dogstats-go, you can still use this integration to collect memory-related metrics.
The Go Expvar check is packaged with the Agent, so install the Agent anywhere you run Go services to collect metrics.
If your Go service doesn’t use the expvar package already, import it (import "expvar"
). If you don’t want to instrument your own metrics with expvar - that is you only want to collect your service’s memory metrics - import the package using the blank identifier (import _ "expvar"
). If your service doesn’t already listen for HTTP requests (with the http package), make it listen locally just for the Datadog Agent.
To configure this check for an Agent running on a host:
Edit the file go_expvar.d/conf.yaml
, in the conf.d/
folder at the root of your Agent’s configuration directory. See the sample go_expvar.d/conf.yaml for all available configuration options.
Note: If you don’t configure a metrics
list, the Agent still collects memstat metrics. Use metrics
to tell the Agent which expvar vars to collect.
Note: The Go Expvar integration can potentially emit custom metrics, which may impact your billing. By default, there is a limit of 350 metrics. If you require additional metrics, contact Datadog support.
For containerized environments, see the Autodiscovery Integration Templates for guidance on applying the parameters below.
Parameter | Value |
---|---|
<INTEGRATION_NAME> | go_expvar |
<INIT_CONFIG> | blank or {} |
<INSTANCE_CONFIG> | {"expvar_url": "http://%%host%%:8080"} |
Run the Agent’s status subcommand and look for go_expvar
under the Checks section.
go_expvar.memstats.alloc (gauge) | Bytes allocated and not yet freed Shown as byte |
go_expvar.memstats.frees (gauge) | Number of frees Shown as operation |
go_expvar.memstats.heap_alloc (gauge) | Bytes allocated and not yet freed Shown as byte |
go_expvar.memstats.heap_idle (gauge) | Bytes in idle spans Shown as byte |
go_expvar.memstats.heap_inuse (gauge) | Bytes in non-idle spans Shown as byte |
go_expvar.memstats.heap_objects (gauge) | Total number of allocated objects Shown as item |
go_expvar.memstats.heap_released (gauge) | Bytes released to the OS Shown as byte |
go_expvar.memstats.heap_sys (gauge) | Bytes obtained from system Shown as byte |
go_expvar.memstats.lookups (gauge) | Number of pointer lookups Shown as operation |
go_expvar.memstats.mallocs (gauge) | Number of mallocs Shown as operation |
go_expvar.memstats.num_gc (gauge) | Number of garbage collections Shown as garbage collection |
go_expvar.memstats.pause_ns.95percentile (gauge) | 95th percentile of recent GC pause durations Shown as nanosecond |
go_expvar.memstats.pause_ns.avg (gauge) | Average of recent GC pause durations Shown as nanosecond |
go_expvar.memstats.pause_ns.count (rate) | Number of submitted GC pause durations Shown as sample |
go_expvar.memstats.pause_ns.max (gauge) | Max GC pause duration Shown as nanosecond |
go_expvar.memstats.pause_ns.median (gauge) | Median GC pause duration Shown as nanosecond |
go_expvar.memstats.pause_total_ns (gauge) | Total GC pause duration over lifetime of process Shown as nanosecond |
go_expvar.memstats.total_alloc (gauge) | Bytes allocated (even if freed) Shown as byte |
go_expvar.memstats.total_alloc.count (count) | Bytes allocated (even if freed) as monotonic count Shown as byte |
The Go-Expvar check does not include any events.
The Go-Expvar check does not include any service checks.
Need help? Contact Datadog support.