Skip to content

request params not correctly passed to request.get in PrometheusConnect.custom_query #260

Description

@GiulioGx

At line 346 of prometheus_connect.py we have:

response = self._session.get(
"{0}/api/v1/query".format(self.url),
params={**{"query": query}, **params},
verify=self.ssl_verification,
headers=self.headers,
)

the params dict, ultimately used to pass params (for instance timeouts) to the requests get method is not correctly passed.

It should be modified to:

response = self._session.get(
"{0}/api/v1/query".format(self.url),
params={**{"query": query}},
**params,
verify=self.ssl_verification,
headers=self.headers,
)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions