Skip to content

Commit

Permalink
Fixes opentracing-contrib#135 : add ContainerRequestContext to decora…
Browse files Browse the repository at this point in the history
…teResponse arguments.
  • Loading branch information
JACQUES Francois authored and JACQUES Francois committed Jan 5, 2020
1 parent 32ca3b8 commit ffd154d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ public interface ServerSpanDecorator {
/**
* Decorate spans by outgoing object.
*
* @param requestContext
* @param responseContext
* @param span
*/
void decorateResponse(ContainerResponseContext responseContext, Span span);
void decorateResponse(ContainerRequestContext requestContext, ContainerResponseContext responseContext, Span span);

/**
* Adds standard tags: {@link io.opentracing.tag.Tags#SPAN_KIND},
Expand All @@ -45,7 +46,7 @@ public void decorateRequest(ContainerRequestContext requestContext, Span span) {
}

@Override
public void decorateResponse(ContainerResponseContext responseContext, Span span) {
public void decorateResponse(ContainerRequestContext requestContext, ContainerResponseContext responseContext, Span span) {
Tags.HTTP_STATUS.set(span, responseContext.getStatus());
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void filter(ContainerRequestContext requestContext,

if (spanDecorators != null) {
for (ServerSpanDecorator decorator: spanDecorators) {
decorator.decorateResponse(responseContext, spanWrapper.get());
decorator.decorateResponse(requestContext, responseContext, spanWrapper.get());
}
}
}
Expand Down

0 comments on commit ffd154d

Please sign in to comment.