grafana / grafana/pyroscope

Self-profiling push fails with TLS-enabled HTTP server -- no config option to set push URL or disable push

Open
#5,173 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
11.7k
Forks
802
Avg merge
1d 19h
Merged PRs (30d)
80

Description

#### Describe the bug

When Pyroscope is configured with `http_tls_config` (TLS enabled on the HTTP server), the built-in self-profiling client fails to push profiles to the `/ingest` endpoint. The self-profiling client hardcodes `http://localhost:` as the push destination and has no awareness of TLS, resulting in repeated 400 errors.

The `self_profiling` configuration block exposes no option to override the push URL or disable the push entirely, making it impossible to resolve this through configuration.

#### To Reproduce

1. Start Pyroscope 2.0.2 with `http_tls_config.cert_file` and `http_tls_config.key_file` set
2. Observe logs -- TLS handshake errors appear every ~15 seconds
3. Confirm with tcpdump on loopback: the self-profiling Go spy (`spyName=gospy`) is sending plain HTTP POST requests to `/ingest` against the TLS-enabled server

```
POST /ingest?aggregationType=average&...&spyName=gospy&units=goroutines... HTTP/1.1
Host: localhost:4040
User-Agent: Go-http-client/1.1
```

Server responds:

```
HTTP/1.0 400 Bad Request
Client sent an HTTP request to an HTTPS server.
```

#### Expected behavior

Either the self-profiling client should detect that the server is TLS-enabled and use `https://` accordingly, or the `self_profiling` config block should expose a `push_url` field (and ideally a `disable_push` boolean) so operators can configure or disable the push independently of the server TLS settings.

The full `self_profiling` block as returned by `/api/v1/status/config`:

```yaml
self_profiling:
mutex_profile_fraction: 5
block_profile_rate: 5
```

No push URL or disable option is present.

#### Environment

- Infrastructure: bare-metal (Docker)
- Deployment tool: Docker Compose

#### Additional Context

N/A

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.