grafana/sentry-datasource

Sentry datasource querying wrong Sentry URL

Closed this issue · 7 comments

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

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

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. 🔍

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.

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

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?

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?

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