Skip to content

Duplicated seconds query parameter when scraping Pyroscope profiles #3026

Open
@Pluggi

Description

@Pluggi

What's wrong?

I am deploying 3 Alloy pods to Kubernetes with clustering mode enabled.

When scraping CPU profiles using pyroscope.scrape, the seconds query parameter gets duplicated a lot of times:

Image

I found that if I restarted one of the Alloys that is not the one scraping the target, the number of seconds params would increase by 2.

This breaks scraping for my app which requires query params to not be duplicated.

A temporary fix I found was to replace params.Add with params.Set here:

params.Add("seconds", strconv.Itoa(int(seconds)))

Steps to reproduce

Deploy 3 Alloys with clustering mode to scrape CPU profiles.
Kill one of the Alloys that is not scraping the target and observe the seconds query param is duplicated.
This is reverted to normal if you make a config change because Alloy will reload it.

System information

Kubernetes

Software version

Grafana Alloy v1.7.1

Configuration


Logs


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions