---
auth:
# Specifies which role will be granted to a newly signed up user.
# Supported roles: Admin, ReadOnly. Defaults to ReadOnly.
# The parameter affects all authentication providers.
signup-default-role: ReadOnly
# Internal authentication provider configuration.
internal:
admin:
create: true
enabled: true
signup-enabled: true
# Disables analytics.
analytics-opt-out: "false"
# Log level: debug|info|warn|error.
log-level: "info"
# Log level: debug|info|warn|error.
badger-log-level: "error"
# Directory where pyroscope stores profiling data.
storage-path: "/var/lib/pyroscope"
# Port for the HTTP server used for data ingestion and web UI.
api-bind-addr: ":4040"
# Base URL for when the server is behind a reverse proxy with a different path.
base-url: ""
# Percentage of memory at which cache evictions start.
cache-evict-threshold: "0.25"
# Percentage of cache that is evicted per eviction run.
cache-evict-volume: "0.33"
# Database configuration. By default, Pyroscope Server uses embedded sqlite3 database.
database:
# Indicates the database type. Supported DB engines: sqlite3.
type: "sqlite3"
# Database connection string. Specific to the engine.
url: "/var/lib/pyroscope/pyroscope.db"
# Indicates whether value log files should be truncated to delete corrupt data, if any.
badger-no-truncate: "false"
# Disables /debug/pprof route.
disable-pprof-endpoint: "false"
# Max number of nodes used when saving profiles to disk.
max-nodes-serialization: "2048"
# Max number of nodes used to display data on the frontend.
max-nodes-render: "8192"
# Please don't use, this will soon be deprecated.
hide-applications: []
# Sets the maximum amount of time the profiling data is stored for. Data before this threshold is deleted. Disabled by default.
# retention: "0s"
retention: "480h"
# Specifies how long the profiling data is stored per aggregation level. Disabled by default.
# retention-levels: {}# 0: 720h # 30 days
# 1: 2160h # 90 days
retention-levels:
0: 480h # 20 days
1: 1440h # 60 days
# Metrics export rules.
metrics-export-rules: {}# A list of scrape configurations.
scrape-configs: []
# Location of TLS Certificate file (.crt).
tls-certificate-file: ""
# Location of TLS Private key file (.key).
tls-key-file: ""
packagemainimport"github.com/pyroscope-io/client/pyroscope"funcmain(){pyroscope.Start(pyroscope.Config{ApplicationName:"simple.golang.app",// replace this with the address of pyroscope server
ServerAddress:"http://pyroscope-server:4040",// you can disable logging by setting this to nil
Logger:pyroscope.StandardLogger,// optionally, if authentication is enabled, specify the API key:
// AuthToken: os.Getenv("PYROSCOPE_AUTH_TOKEN"),
// by default all profilers are enabled,
// but you can select the ones you want to use:
ProfileTypes:[]pyroscope.ProfileType{pyroscope.ProfileCPU,pyroscope.ProfileAllocObjects,pyroscope.ProfileAllocSpace,pyroscope.ProfileInuseObjects,pyroscope.ProfileInuseSpace,},})// your code goes here
}