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

Scatter plot dashboard cell doesn't render #16984

Closed
alsargent opened this issue Feb 24, 2020 · 3 comments · Fixed by #17013
Closed

Scatter plot dashboard cell doesn't render #16984

alsargent opened this issue Feb 24, 2020 · 3 comments · Fixed by #17013
Assignees

Comments

@alsargent
Copy link

alsargent commented Feb 24, 2020

Steps to reproduce:
List the minimal actions needed to reproduce the behavior.

  1. Create a dashboard cell with the Flux code below, type = graph
  2. Close configuration view
  3. Mouse over the dashboard cell; no issues.
  4. Open the configuration view
  5. Change type to scatter
  6. Close configuration view
  7. Mouse over the dashboard cell; you get message An InfluxDB error has occurred.

Here's the flux code behind that dashboard cell; it's taking data from the http telegraf plugin, hitting public aws endpoints. I'm wondering if the fact that I'm removing _value is an issue.

from(bucket: "initial")
  // Although we just want the last measurement, 
  // collect the last 60 minutes of to ensure we have something to report.
  |> range(start: -60m)
  |> filter(fn: (r) => r._measurement == "http_response")
  |> filter(fn: (r) => r.company == "Amazon")
  |> filter(fn: (r) => r.service == "AWS")
  |> filter(fn: (r) => r._field == "result_code") 
  // You need to put these filters later for some reason.
  |> filter(fn: (r) => r.subservice == "DynamoDB")
  |> filter(fn: (r) => r.region == "us-east-2")
  |> group()
  |> sort(columns: ["_time"], desc: true)
  // If the result field is success, then return "Up", else "Down".
  |> map(fn: (r) => ({
  // Create a new column called Availability.
    r with Availability: 
      if (r.result != "success" or int(v: r.status_code) >= 500) then (0)
      else (1)
    }))
   // Drop all columns except Availability and _time.
   // If we don't keep _time, we can get the message that "not latest value found".
   // If we don't drop _value, we'll display the result code (a number).
   |> keep(columns: ["Availability", "_time"])

Expected behavior:
You should be able to mouse over a scatter cell in a dashboard and not have issues.

Actual behavior:
The dashboard cell displays an error when you mouse over it.

InfluxDB 2 bug - dashboard cells error out 2020-02-24 at 9 16 24 AM 3
InfluxDB 2 bug - dashboard cells error out 2020-02-24 at 9 16 24 AM 2
InfluxDB 2 bug - dashboard cells error out 2020-02-24 at 9 16 24 AM

Here's a video showing of happens:
https://www.dropbox.com/s/n7gkidfvuj3tpg3/InfluxDB%202%20bug%20-%20dashboard%20cells%20error%20out%202020-02-24%20at%209.16.24%20AM.mov?dl=0

Environment info:

  • System info: Run uname -srm and copy the output here
  • InfluxDB version: Run influxd version and copy the output here
  • Other relevant environment details: Container runtime, disk info, etc

uname -srm
Darwin 19.3.0 x86_64

influxd version
InfluxDB 2.0.0-beta.4 (git: 3e054aa) build_date: 2020-02-24T18:12:53Z

Config:
Copy any non-default config values here or attach the full config as a gist or file.

Logs:
Include snippet of errors in log.

Performance:
Generate profiles with the following commands for bugs related to performance, locking, out of memory (OOM), etc.

# Commands should be run when the bug is actively happening.
# Note: This command will run for at least 30 seconds.
curl -o profiles.tar.gz "http://localhost:8086/debug/pprof/all?cpu=true"
curl -o vars.txt "http://localhost:8086/debug/vars"
iostat -xd 1 30 > iostat.txt
# Attach the `profiles.tar.gz`, `vars.txt`, and `iostat.txt` output files.
@cmd-influx
Copy link
Contributor

image

I have something similar. When I touch the cells in this scatter plot, I get the error that something is wrong. Mine can be found in tools, under "Log File Studies V1.x" and I am trying to show the four services as scatter plots over time.

@asalem1 asalem1 assigned asalem1 and unassigned drdelambre Feb 25, 2020
@asalem1 asalem1 added the v2-prod-bug Trying to track all issues in V2 Prod to check code quality label Feb 25, 2020
@asalem1
Copy link
Contributor

asalem1 commented Feb 26, 2020

This seems to be a prod issue that was introduced in the following PR:

influxdata/giraffe@f8920cf

I still haven't managed to narrow it down, but it might have something to do with the Tooltip additions since the ScatterHoverLayer component makes use of it. More specifically, it looks like the issue is that the ScatterHoverLayer doesn't have the lineData property that is required for getting the correct sort order:

influxdata/giraffe@f8920cf#diff-91b5987f198cda42b904bbfe44f6dc9fR31

A potential solution would be to refactor the implementation to consider undefined parameters

@kubark42
Copy link

kubark42 commented Feb 27, 2020

I'm having this identical issue with InfluxDB 2.0 Cloud. It happens as soon as my mouse cursor enters the graph field. Is it possible the fix hasn't been deployed yet?

@gshif gshif added v2-prod-bug-reviewed The production issues was reviewed by QA and removed v2-prod-bug Trying to track all issues in V2 Prod to check code quality labels Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants