Skip to content

Commit

Permalink
fix linters warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Valery Piashchynski <[email protected]>
  • Loading branch information
rustatian committed May 10, 2022
1 parent 64c095b commit 9dffecc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ func (g *Plugin) Middleware(next http.Handler) http.Handler {
return gzhttp.GzipHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if val, ok := r.Context().Value(utils.OtelTracerNameKey).(string); ok {
tp := trace.SpanFromContext(r.Context()).TracerProvider()
ctx, span := tp.Tracer(val, trace.WithSchemaURL(semconv.SchemaURL), trace.WithInstrumentationVersion(otelhttp.SemVersion())).Start(r.Context(), PluginName, trace.WithSpanKind(trace.SpanKindServer))
ctx, span := tp.Tracer(val, trace.WithSchemaURL(semconv.SchemaURL),
trace.WithInstrumentationVersion(otelhttp.SemVersion())).
Start(r.Context(), PluginName, trace.WithSpanKind(trace.SpanKindServer))
defer span.End()

// inject
Expand Down

0 comments on commit 9dffecc

Please sign in to comment.