grafana / grafana-plugin-examples

189 stars 53 forks source link

Examples: Add log data source #200

Closed ivanahuckova closed 1 year ago

ivanahuckova commented 1 year ago

Based on conversation with @xnyo I am creating a PR that adds a new datasource example with datasource that implements logging features. The datasource just mocks receiving of logs trough mockDataRequest.ts. Let me know if there is anything I need to change/update. 🙂

ivanahuckova commented 1 year ago

Just wanted to check on this - if you've had time to review/have any feedback 🙂

ivanahuckova commented 1 year ago

@xnyo the integration test is failing on Build plugin with canary_version @grafana dependencies but not sure how to debug that. Do you have any thoughts?

image
ivanahuckova commented 1 year ago

Okay, I was able to figure it out. Seems like @swc/core version was an issue and this https://stackoverflow.com/questions/76884057/grafana-build-a-panel-plugin-from-template-error helped me to resolve it. Interestingly, all other examples in this repo use the same 1.3.75 version, so it seems like it is a known issue. Have you considered changing dependency to version in template to 1.3.75 as it works, compared to other versions.

xnyo commented 1 year ago

Okay, I was able to figure it out. Seems like @swc/core version was an issue and this https://stackoverflow.com/questions/76884057/grafana-build-a-panel-plugin-from-template-error helped me to resolve it. Interestingly, all other examples in this repo use the same 1.3.75 version, so it seems like it is a known issue. Have you considered changing dependency to version in template to 1.3.75 as it works, compared to other versions.

It looks like this has been bumped to ^1.3.90 in the latest template: https://github.com/grafana/plugin-tools/blob/18adb4b38dc283c7a7d10c8355580cbdad96e72e/packages/create-plugin/templates/common/_package.json#L26