With a given configuration profile-exporter
queries a Parca compatible API, transforms the result into metrics and sends the metrics to a Prometheus remote write endpoint.
It produces the follow metrics:
profile_exporter_root_cumulative_value
(labels:query
,query_name
): The total value as it would be the root in a flamegraph.profile_exporter_cumulative_value
(labels:query
,query_name
,function_name
): The value of the function plus all the functions it called.profile_exporter_flat_value
(labels:query
,query_name
,function_name
): The value that only the function used itself.
profile-exporter
is configured by a single configuration file passed via the --config-file
flag (defaults to profile-exporter.yaml
). See profile-exporter.yaml
as an example.
remote_write:
# The URL of the endpoint to send samples to.
url: <string>
# Timeout for requests to the remote write endpoint.
[ remote_timeout: <duration | default = 30s> ]
# All Prometheus HTTP client configuration options,
# sigv4 and Azure AD authentication options are available.
parca:
# gRPC endpoint without protocol
address: <string>
# bearer token to use for authentication, `bearerTokenFile` is recommended
bearer_token: <string>
# file to read bearer token from for authentication
bearer_token_file: <string>
# connect to Parca-compatible API via an insecure connection
insecure: <bool>
# ignore verification of TLS certificate used by Parca-compatible API
insecure_skip_verify: <bool>
queries:
# Name of query (will be a label in metrics).
- name: <string>
# Query to run against Parca-compatible API.
query: <string>
# Duration to run query for, as in "last 5m".
duration: <string>
# Which functions to generate metrics for.
matchers:
# Function name contains the substring
- contains: <string>
- Run Prometheus with the
--web.enable-remote-write-receiver
flag. - Run Parca.
- Run profile-exporter.
Flags:
Usage: profile-exporter
Flags:
-h, --help Show context-sensitive help.
--log-level="info" Log level.
--config-file="profile-exporter.yaml"
Path to the config file.