99designs / 99designs/gqlgen-contrib

Add operation ctx safety for prometheus tracing

未关闭
#36 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Go
星标
96
派生
36
PR 合并指标
30 天内没有已合并 PR

描述

Last year a PR on the main repo https://github.com/99designs/gqlgen/pull/2709 fixed a ```panic``` related to the Apollo tracing. The prometheus tracing here in gqlgen-contrib seems to suffer from the exact same issue.

I would guess that this same check:

```golang
if !graphql.HasOperationContext(ctx) {
return next(ctx)
}
```

Should be added before the call to ```GetOperationContext``` [here](https://github.com/99designs/gqlgen-contrib/blob/7be2c32e86b8c154211b86823c35bd56e08ab831/prometheus/prometheus.go#L129).

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。