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

Sentry datasource querying wrong Sentry URL #258

Closed
skygrammas opened this issue May 23, 2024 · 9 comments
Closed

Sentry datasource querying wrong Sentry URL #258

skygrammas opened this issue May 23, 2024 · 9 comments
Assignees
Labels

Comments

@skygrammas
Copy link

What happened:
Sentry data source is attempting to fetch data from an invalid host/URL.

What you expected to happen:
Sentry data source to attempt to fetch data from the URL that is explicitly listed in the data source configuration.

How to reproduce it (as minimally and precisely as possible):

  1. Deploy Grafana using the Grafana Operator v5.8.1 on Kubernetes.
  2. Configure the Sentry data source in the Grafana Kubernetes custom resource (see snippet below for exact configuration).
  3. In the Grafana UI, visit Home > Connections > Data sources.
  4. Click the Sentry data source, then click Explore data in the top-right corner

Screenshots, Recordings, and Configuration

sentrydatasourceissue.mov

It is expected that the data source fetches data from https://cruise.sentry.io/api/0/organizations/cruise/projects instead of https://cruise.sentry.iohttps//sentry.io/api/0/organizations/cruise/projects/ (which is not a valid host).

Screenshot 2024-05-23 at 10 45 15 AM

The URL in the configuration of the data source is shown in the screen recording above. I will also share the codified configuration below:

- name: sentry 
  type: grafana-sentry-datasource
  access: proxy
  isDefault: false
  basicAuth: false
  jsonData:
    url: "https://cruise.sentry.io"
    orgSlug: "cruise"
  secureJsonData:
    authToken: "${SENTRY_TOKEN}"
  secrets:
    - name: sentry-token
      env: SENTRY_TOKEN
      targetPath: secureJsonData.authToken
      value: [redacted]
  plugins:
    - name: grafana-sentry-datasource
      version: 1.7.0
  • Grafana version: 10.4.1
  • Plugin version: 1.7.0
  • Grafana platform: Kubernetes v1.27.11 via Grafana CR using the Grafana Operator v5.8.1
  • User OS & Browser: MacOS 14.5 & Google Chrome
@skygrammas
Copy link
Author

This also happens even when the data source is configured via Grafana UI instead of code.

@adamyeats adamyeats moved this from Incoming to Next in Partner Datasources May 24, 2024
@adamyeats adamyeats self-assigned this May 24, 2024
@adamyeats
Copy link
Contributor

I have been unable to reproduce this issue locally, with either a provisioning file or through the UI. In the code, there doesn't actually seem to be any concatenation of URL strings happening at all, making this doubly strange. This leads me to think there may be an issue in the K8S Operator that is causing this. I will continue to investigate. 🔍

@skygrammas
Copy link
Author

I have been unable to reproduce this issue locally, with either a provisioning file or through the UI. In the code, there doesn't actually seem to be any concatenation of URL strings happening at all, making this doubly strange. This leads me to think there may be an issue in the K8S Operator that is causing this. I will continue to investigate. 🔍

thank you @adamyeats! that is a reasonable suspicion, i tried looking around the code for this data source to see where this might be happening and i couldn't find it. fair callout that the Grafana Operator may be the offender in this case. please do circle back after your investigation; it may be in my best interest to migrate this issue to the operator's repo.

@artechventure
Copy link

Hi @adamyeats our team (Coupang) is facing exactly same issue. Not pushing you, just to let you know

@aangelisc
Copy link
Contributor

Hi @artechventure, do you have any more information on what you're seeing? What is your data source configuration, do you have logs of the issue?

@aangelisc aangelisc moved this from Next to Waiting in Partner Datasources Jul 26, 2024
@alyssabull
Copy link
Contributor

Hi @artechventure - are you still experiencing this issue? If so, can you provide more information on your data source configuration and any logs of the issue?

@aangelisc
Copy link
Contributor

Closing this issue due to lack of response. If this reoccurs please let us know!

@github-project-automation github-project-automation bot moved this from Waiting to Done in Partner Datasources Sep 6, 2024
@artechventure
Copy link

artechventure commented Nov 21, 2024

@aangelisc @alyssabull
Hi sorry for the late response, when I try to use Sentry Grafana Datasource,
It show the error below

Image

cURL for this request is below

curl 'https://coupos.couwatch.net/api/datasources/uid/d784f303-a487-4aca-8c5c-470ab94f794e/resources/api/0/organizations/coupang/projects'

and the response is

Get "https://coupang.sentry.iohttps//sentry.io/api/0/organizations/coupang/projects/?&cursor=100:1:0": downstream error: dial tcp: lookup coupang.sentry.iohttps on 172.20.0.10:53: no such host

I can see that the url from the response is wrong

it should be

https://coupang.sentry.io/api/0/organizations/coupang/projects/

or

https//sentry.io/api/0/organizations/coupang/projects/

not

https://coupang.sentry.iohttps//sentry.io/api/0/organizations/coupang/projects/

@artechventure
Copy link

Our Sentry URL in the plugin configuration is https://coupang.sentry.io/

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

No branches or pull requests

5 participants