chaos-mesh / chaos-mesh/datasource
Grafana query for chaos mesh gives "Object(...) is not a function"
- Dominant language
- TypeScript
- Stars
- 11
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
### What version of Chaos Mesh Datasource are you using?
2.2.3
### What version of Chaos Mesh are you using?
2.6.2
### What version of Grafana are you using?
7.5.15
### What did you do?
I installed Chaos Mesh v2.6.2 using the tutorial [there](https://chaos-mesh.org/docs/offline-installation/). I created some experiments and workflows that worked fine.
I tried to follow the manual part of [this tutorial](https://chaos-mesh.org/docs/use-grafana-data-source/) to install the Grafana plugin. It worked well until the **Query** section.
### What did you expect to see?
I expect to be able to run queries as explained in the tutorial.
### What did you see instead?
Grafana is producing an error when running a query.
```
runRequest.catchError TypeError: Object(...) is not a function
at c.value (datasource.ts:64:41)
at c.value (datasource.ts:36:1)
at c.eval (datasource.ts:114:38)
at c (runtime.js:63:40)
at Generator._invoke (runtime.js:293:22)
at Generator.next (runtime.js:118:21)
at eval (module.js:1:9839)
at new Promise ()
at Q (tslib.es6.js:70:37)
at eval (datasource.ts:96:41)
```
When I try to create an Annotation I also get an error.
```
AnnotationSrv.query error TypeError: Object(...) is not a function
at c.value (datasource.ts:64:41)
at c.value (datasource.ts:36:1)
at c.eval (datasource.ts:168:28)
at c (runtime.js:63:40)
at Generator._invoke (runtime.js:293:22)
at Generator.next (runtime.js:118:21)
at eval (module.js:1:9839)
at new Promise ()
at Q (tslib.es6.js:70:37)
at c.value (module.js:1:15071)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the query and annotation failures with Chaos Mesh Datasource 2.2.3, Chaos Mesh 2.6.2, and Grafana 7.5.15. Inspect datasource.ts around line 64 and the query and annotation paths shown in the stack traces; done means both operations run without the “Object(...) is not a function” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grafana, typescript
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100