Expvar Receiver
contrib
Maintainers: @jamesmoessis, @MovieStoreGuy
Source: opentelemetry-collector-contrib
Supported Telemetry
Overview
Configuration
Default
By default, without any configuration, a request will be sent tohttp://localhost:8000/debug/vars
every 60 seconds. The default configuration is achieved by the following:
Customising
The following can be configured:- Configure the HTTP client for scraping the expvar variables. The full set of
configuration options for the client can be found in the core repoβs
confighttp.
- defaults:
endpoint = http://localhost:8000/debug/varstimeout = 3s
- defaults:
collection_interval- Configure how often the metrics are scraped.- default: 1m
initial_delay(default =1s): defines how long this receiver waits before starting.metrics- Enable or disable metrics by name.
Example configuration
Metrics
| Metric Name | Description | Unit | Type | Attributes |
|---|---|---|---|---|
β
process.runtime.memstats.buck_hash_sys | Bytes of memory in profiling bucket hash tables. | By | UpDownCounter | |
β
process.runtime.memstats.frees | Cumulative count of heap objects freed. | {objects} | Counter | |
β
process.runtime.memstats.gc_cpu_fraction | The fraction of this programβs available CPU time used by the GC since the program started. | 1 | Gauge | |
β
process.runtime.memstats.gc_sys | Bytes of memory in garbage collection metadata. | By | UpDownCounter | |
β
process.runtime.memstats.heap_alloc | Bytes of allocated heap objects. | By | UpDownCounter | |
β
process.runtime.memstats.heap_idle | Bytes in idle (unused) spans. | By | UpDownCounter | |
β
process.runtime.memstats.heap_inuse | Bytes in in-use spans. | By | UpDownCounter | |
β
process.runtime.memstats.heap_objects | Number of allocated heap objects. | {objects} | UpDownCounter | |
β
process.runtime.memstats.heap_released | Bytes of physical memory returned to the OS. | By | UpDownCounter | |
β
process.runtime.memstats.heap_sys | Bytes of heap memory obtained by the OS. | By | UpDownCounter | |
β
process.runtime.memstats.last_pause | The most recent stop-the-world pause time. | ns | Gauge | |
β process.runtime.memstats.lookups | Number of pointer lookups performed by the runtime. | {lookups} | UpDownCounter | |
β
process.runtime.memstats.mallocs | Cumulative count of heap objects allocated. | {objects} | Counter | |
β
process.runtime.memstats.mcache_inuse | Bytes of allocated mcache structures. | By | UpDownCounter | |
β
process.runtime.memstats.mcache_sys | Bytes of memory obtained from the OS for mcache structures. | By | UpDownCounter | |
β
process.runtime.memstats.mspan_inuse | Bytes of allocated mspan structures. | By | UpDownCounter | |
β
process.runtime.memstats.mspan_sys | Bytes of memory obtained from the OS for mspan structures. | By | UpDownCounter | |
β
process.runtime.memstats.next_gc | The target heap size of the next GC cycle. | By | UpDownCounter | |
β
process.runtime.memstats.num_forced_gc | Number of GC cycles that were forced by the application calling the GC function. | By | Counter | |
β
process.runtime.memstats.num_gc | Number of completed GC cycles. | By | Counter | |
β
process.runtime.memstats.other_sys | Bytes of memory in miscellaneous off-heap runtime allocations. | By | UpDownCounter | |
β
process.runtime.memstats.pause_total | The cumulative nanoseconds in GC stop-the-world pauses since the program started. | By | Counter | |
β
process.runtime.memstats.stack_inuse | Bytes in stack spans. | By | UpDownCounter | |
β
process.runtime.memstats.stack_sys | Bytes of stack memory obtained from the OS. | By | UpDownCounter | |
β
process.runtime.memstats.sys | Total bytes of memory obtained from the OS. | By | UpDownCounter | |
β process.runtime.memstats.total_alloc | Cumulative bytes allocated for heap objects. | By | Counter |
Configuration
Example Configuration
Last generated: 2026-04-13