Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#738 Fix wrong URL in GrafanaCloudHostedMetrics #748

Open
wants to merge 1 commit into
base: features/4.4.0
Choose a base branch
from

Conversation

gajewskiArek
Copy link

The issue or feature being addressed

#738

Details on the issue fix or feature implementation

The problem describe in original issues exists because we have following code:
var response = await _client.PostAsync("/metrics", content, cancellationToken);
client is initialized with your Url which looks like :
"https://graphite-prod-01-eu-west-0.grafana.net/graphite"

then when you inspect the request in f.e. fidler you would expect the payload to be sent to https://graphite-prod-01-eu-west-0.grafana.net/graphite/metrics. In fact is sent to https://graphite-prod-01-eu-west-0.grafana.net/metrics

this behavior of http is described here:
https://stackoverflow.com/questions/23438416/why-is-httpclient-baseaddress-not-working

the provided fix makes we're pushing the metrics to the address that grafana cloud expects

Confirm the following

  • [X ] I have ensured that I have merged the latest changes from the dev branch
  • I have successfully run a local build
  • I have included unit tests for the issue/feature
  • [X ] I have included the github issue number in my commits

@chinwobble
Copy link
Contributor

I'm having the same issue. Could we get this merged?

@sabesam
Copy link

sabesam commented Feb 28, 2023

I have the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants