diff --git a/pkg/inst-api/instrumenter/instrumenter.go b/pkg/inst-api/instrumenter/instrumenter.go index 9be8f7f7..b9982765 100644 --- a/pkg/inst-api/instrumenter/instrumenter.go +++ b/pkg/inst-api/instrumenter/instrumenter.go @@ -170,7 +170,7 @@ func (p *PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) StartAndEndWith } func (p *PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) Start(parentContext context.Context, request REQUEST, options ...trace.SpanStartOption) context.Context { - newCtx := p.base.Start(parentContext, request) + newCtx := p.base.Start(parentContext, request, options...) if p.carrierGetter != nil { if p.prop != nil { p.prop.Inject(newCtx, p.carrierGetter(request)) @@ -183,7 +183,7 @@ func (p *PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) Start(parentCon } func (p *PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) End(ctx context.Context, request REQUEST, response RESPONSE, err error, options ...trace.SpanEndOption) { - p.base.End(ctx, request, response, err) + p.base.End(ctx, request, response, err, options...) } func (p *PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) StartAndEnd(parentContext context.Context, request REQUEST, response RESPONSE, err error, startTime, endTime time.Time) { @@ -226,12 +226,12 @@ func (p *PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) Start(parentCon } else { extracted = otel.GetTextMapPropagator().Extract(parentContext, p.carrierGetter(request)) } - return p.base.Start(extracted, request) + return p.base.Start(extracted, request, options...) } else { return parentContext } } func (p *PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) End(ctx context.Context, request REQUEST, response RESPONSE, err error, options ...trace.SpanEndOption) { - p.base.End(ctx, request, response, err) + p.base.End(ctx, request, response, err, options...) } diff --git a/pkg/rules/http/client_setup.go b/pkg/rules/http/client_setup.go index 2567a622..52679c30 100644 --- a/pkg/rules/http/client_setup.go +++ b/pkg/rules/http/client_setup.go @@ -47,7 +47,7 @@ func clientOnEnter(call api.CallContext, t *http.Transport, req *http.Request) { return } -func clientOnExit(call http.CallContext, res *http.Response, err error) { +func clientOnExit(call api.CallContext, res *http.Response, err error) { data, ok := call.GetData().(map[string]interface{}) if !ok || data == nil || data["ctx"] == nil { return