Skip to content

Commit

Permalink
fix invalid package (#223)
Browse files Browse the repository at this point in the history
* fix invalid package

* fix options
  • Loading branch information
123liuziming authored Nov 25, 2024
1 parent c0dd0a0 commit 8b3738a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pkg/inst-api/instrumenter/instrumenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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) {
Expand Down Expand Up @@ -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...)
}
2 changes: 1 addition & 1 deletion pkg/rules/http/client_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8b3738a

Please sign in to comment.