Comments (2)
Works on my machine:
$.get("/api/datasources/33/resources/boom")
DBUG[04-29|09:01:45] panic: BOOM logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] goroutine 69 [running]: logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] github.com/grafana/test-datasource/pkg/datasource.(*testDatasource).testPanicHandler(...) logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] /home/kbrandt/go/github.com/grafana/test-datasource/pkg/datasource/resource_handler.go:102 logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] net/http.HandlerFunc.ServeHTTP(0xc0000ac5a0, 0xbe9ea0, 0xc000214a50, 0xc0001f4100) logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] /usr/local/go/src/net/http/server.go:2012 +0x44 logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] net/http.(*ServeMux).ServeHTTP(0xc0000c4280, 0xbe9ea0, 0xc000214a50, 0xc0001f4100) logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] /usr/local/go/src/net/http/server.go:2387 +0x1a5 logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] github.com/grafana/grafana-plugin-sdk-go/backend/resource/httpadapter.(*httpResourceHandler).CallResource(0xc0000ac5b0, 0xbece60, 0xc000214420, 0xc0003c6100, 0xbde380, 0xc000542200, 0xc00006c380, 0x7f032ecaa560) logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] /home/kbrandt/go/pkg/mod/github.com/grafana/[email protected]/backend/resource/httpadapter/handler.go:58 +0x42b logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] github.com/grafana/grafana-plugin-sdk-go/backend.(*resourceSDKAdapter).CallResource(0xc0000ac5c0, 0xc0003c6000, 0xbf1900, 0xc00056c440, 0x1, 0xc00056c440) logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] /home/kbrandt/go/pkg/mod/github.com/grafana/[email protected]/backend/resource_adapter.go:37 +0xec logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] github.com/grafana/grafana-plugin-sdk-go/backend/grpcplugin.(*resourceGRPCServer).CallResource(0xc0000ac860, 0xc0003c6000, 0xbf1900, 0xc00056c440, 0xc0000ac860, 0x20) logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] /home/kbrandt/go/pkg/mod/github.com/grafana/[email protected]/backend/grpcplugin/grpc_resource.go:42 +0x51 logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] github.com/grafana/grafana-plugin-sdk-go/genproto/pluginv2._Resource_CallResource_Handler(0xa16be0, 0xc0000ac860, 0xbefc80, 0xc0005421e0, 0x1f, 0xc00057c0a0) logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] /home/kbrandt/go/pkg/mod/github.com/grafana/[email protected]/genproto/pluginv2/backend.pb.go:1213 +0x109 logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] github.com/grpc-ecosystem/go-grpc-prometheus.(*ServerMetrics).StreamServerInterceptor.func1(0xa16be0, 0xc0000ac860, 0xbefe00, 0xc0002a20c0, 0xc000542160, 0xb279e8, 0xc000542180, 0xc000542160) logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] /home/kbrandt/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/server_metrics.go:121 +0xeb logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] github.com/grpc-ecosystem/go-grpc-middleware.ChainStreamServer.func1.1.1(0xa16be0, 0xc0000ac860, 0xbefe00, 0xc0002a20c0, 0xc000112c50, 0x40ce28) logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] /home/kbrandt/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:49 +0x5f logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] github.com/grpc-ecosystem/go-grpc-middleware.ChainStreamServer.func1(0xa16be0, 0xc0000ac860, 0xbefe00, 0xc0002a20c0, 0xc000542160, 0xb279e8, 0xbece60, 0xc000214420) logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] /home/kbrandt/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:58 +0xcf logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] google.golang.org/grpc.(*Server).processStreamingRPC(0xc000092480, 0xbf39a0, 0xc000130780, 0xc0001f4000, 0xc0000b13e0, 0x1056e60, 0x0, 0x0, 0x0) logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] /home/kbrandt/go/pkg/mod/google.golang.org/[email protected]/server.go:1244 +0x505 logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] google.golang.org/grpc.(*Server).handleStream(0xc000092480, 0xbf39a0, 0xc000130780, 0xc0001f4000, 0x0) logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] /home/kbrandt/go/pkg/mod/google.golang.org/[email protected]/server.go:1317 +0xcd6 logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc000117760, 0xc000092480, 0xbf39a0, 0xc000130780, 0xc0001f4000) logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] /home/kbrandt/go/pkg/mod/google.golang.org/[email protected]/server.go:722 +0xa1 logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] created by google.golang.org/grpc.(*Server).serveStreams.func1 logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] /home/kbrandt/go/pkg/mod/google.golang.org/[email protected]/server.go:720 +0xa1 logger=plugins.backend pluginId=grafana-test-datasource
DBUG[04-29|09:01:45] plugin process exited logger=plugins.backend pluginId=grafana-test-datasource path=/home/kbrandt/go/github.com/grafana/test-datasource/dist/gpx_test_linux_amd64 pid=15335 error="exit status 2"
EROR[04-29|09:01:45] Failed to logger=context userId=1 orgId=1 uname=admin error="Failed to receive response from resource call: rpc error: code = Unavailable desc = transport is closing"
EROR[04-29|09:01:45] Request Completed logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/33/resources/boom status=500 remote_addr=[::1] time_ms=9 size=148 referer="http://localhost:3000/d/DnYrXoNZk/new-dashboard-copy?editPanel=8&orgId=1"
from grafana-plugin-sdk-go.
@kylebrandt @marefr what do you think about giving panics a higher logging level? I understand that crashy plugins could cause problems, but catching panics is extremely valuable in production environments and debug logging often isn't turned on.
If we're worried about a ton of noise here, maybe Grafana itself could expose some kind of logEvery
handler that would log only 1/10 panics or something similar.
from grafana-plugin-sdk-go.
Related Issues (20)
- An error occurred when executing mage - v HOT 9
- Add a way to get the Grafana instance URL from backend plugins HOT 2
- Darwin ARM64 not built for build:debug mage target HOT 3
- Debug mode not working in LLM plugin HOT 7
- Frame incorrectly parses Uint64 values HOT 1
- Support building plugins for FreeBSD amd64 HOT 1
- sqlutil.FrameFromRows: multiple results sets with different columns fail
- Allow to set the same header multiple time in Prometheus Datascources HOT 1
- Fix flaky test
- Errorsource's RoundTripper returns custom error alongside response HOT 3
- Supports "Host" custom header for DataSources HOT 2
- Update functionality brought in from sqlds
- Macros can consume too much of a query containing parentheses
- getMacroMatches panics if given a macro arg string missing its close bracket HOT 1
- Standalone not erroring when required files are missing
- PDC request values should be handled as file contents instead of file paths
- Internal Data Links: Go & Typescript mismatch
- Support for executing queries in parallel
- Support build tags in Magefile
- Improve building of nested plugins
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana-plugin-sdk-go.