Skip to main content

Pyroscope

Oodle supports continuous profiling through a Pyroscope-compatible ingestion endpoint. You can send CPU, memory, goroutine, mutex, and block profiles from any language that has a Pyroscope SDK — and visualize flame graphs directly in Grafana.

Prerequisites

You will need:

  • OODLE_INSTANCE — your Oodle instance ID. Find it under Settings → API Keys in the Oodle UI. (ap1, us1)
  • OODLE_API_KEY — an API key for authentication. Choose one from the same page. (ap1, us1)
  • OODLE_COLLECTOR — your collector domain (e.g. <INSTANCE>.collector.oodle.ai).

Send Profiles to Oodle

Install the Pyroscope Go SDK:

go get github.com/grafana/pyroscope-go

Add the following to your application's main() or initialization code:

import "github.com/grafana/pyroscope-go"

func main() {
pyroscope.Start(pyroscope.Config{
ApplicationName: "my-app",
ServerAddress:
"https://<OODLE_COLLECTOR>" +
"/v1/pyroscope/<OODLE_INSTANCE>",
AuthToken: "<OODLE_API_KEY>",
ProfileTypes: []pyroscope.ProfileType{
pyroscope.ProfileCPU,
pyroscope.ProfileAllocObjects,
pyroscope.ProfileAllocSpace,
pyroscope.ProfileInuseObjects,
pyroscope.ProfileInuseSpace,
pyroscope.ProfileGoroutines,
pyroscope.ProfileMutexCount,
pyroscope.ProfileMutexDuration,
pyroscope.ProfileBlockCount,
pyroscope.ProfileBlockDuration,
},
})

// ... your application code ...
}

Supported Profile Types

Profile typeWhat it measures
CPUTime spent executing code
Alloc ObjectsNumber of heap allocations
Alloc SpaceBytes allocated on the heap
Inuse ObjectsLive objects on the heap
Inuse SpaceLive bytes on the heap
GoroutinesNumber of goroutines (Go)
Mutex CountMutex contention events
Mutex DurationTime spent waiting on mutexes
Block CountBlocking events (channels, I/O)
Block DurationTime spent blocked

Visualize Profiles

Profiles are queryable through the Grafana Explore interface using the Pyroscope datasource. Navigate to Dashboards → Explore in the Oodle UI and select the Pyroscope datasource to view flame graphs, filter by application name, and compare profiles across time ranges.

Labels and Filtering

The Pyroscope SDK automatically attaches labels like service_name (from ApplicationName). You can add custom labels to correlate profiles with specific requests, users, or feature flags:

pyroscope.TagWrapper(
context.Background(),
pyroscope.Labels("controller", "order"),
func(ctx context.Context) {
handleOrder(ctx)
},
)

Best Practices

  • Start with CPU and memory profiles — they surface the most actionable insights with minimal overhead.
  • Use labels to separate profiles by environment, region, or request type so you can filter in the flame graph UI.
  • Sample rate — the default 100 Hz CPU sample rate is a good starting point. Avoid going above 250 Hz in production as it increases overhead.
  • Profile in production — continuous profiling is designed for always-on use with low overhead (typically <1% CPU).

Support

If you need assistance or have any questions, please reach out to us through: