Caution

Grafana Agent has reached End-of-Life (EOL) on November 1, 2025. Agent is no longer receiving vendor support and will no longer receive security or bug fixes. Current users of Agent Static mode, Agent Flow mode, and Agent Operator should proceed with migrating to Grafana Alloy. If you have already migrated to Alloy, no further action is required. Read more about why we recommend migrating to Grafana Alloy.

Open source

pyroscope.write

BETA: This is a beta component. Beta components are subject to breaking changes, and may be replaced with equivalent functionality that cover the same use case.

pyroscope.write receives performance profiles from other components and forwards them to a series of user-supplied endpoints using Pyroscope’ Push API.

Multiple pyroscope.write components can be specified by giving them different labels.

Usage

Alloy
pyroscope.write "LABEL" {
  endpoint {
    url = PYROSCOPE_URL

    ...
  }

  ...
}

Arguments

The following arguments are supported:

NameTypeDescriptionDefaultRequired
external_labelsmap(string)Labels to add to profiles sent over the network.no

Blocks

The following blocks are supported inside the definition of pyroscope.write:

HierarchyBlockDescriptionRequired
endpointendpointLocation to send profiles to.no
endpoint > basic_authbasic_authConfigure basic_auth for authenticating to the endpoint.no
endpoint > authorizationauthorizationConfigure generic authorization to the endpoint.no
endpoint > oauth2oauth2Configure OAuth2 for authenticating to the endpoint.no
endpoint > oauth2 > tls_configtls_configConfigure TLS settings for connecting to the endpoint.no
endpoint > tls_configtls_configConfigure TLS settings for connecting to the endpoint.no

The > symbol indicates deeper levels of nesting. For example, endpoint > basic_auth refers to a basic_auth block defined inside an endpoint block.

endpoint block

The endpoint block describes a single location to send profiles to. Multiple endpoint blocks can be provided to send profiles to multiple locations.

The following arguments are supported:

NameTypeDescriptionDefaultRequired
urlstringFull URL to send metrics to.yes
namestringOptional name to identify the endpoint in metrics.no
remote_timeoutdurationTimeout for requests made to the URL."10s"no
headersmap(string)Extra headers to deliver with the request.no