append-args

The append-args advice adds new arguments at the tail of a function call. This can only be used on Call nodes (typically matched by function-call), and usually requires the called function to have a variadic signature.

The type attribute must match the function’s signature, and is used to compose the complete viardic arguments slice in cases where the original argument list includes a splat expression (slice...).

Examples

append-args:
    type: google.golang.org/grpc.DialOption
    values:
        - imports:
            grpc: google.golang.org/grpc
            grpctrace: gopkg.in/DataDog/dd-trace-go.v1/contrib/google.golang.org/grpc
          template: grpc.WithStreamInterceptor(grpctrace.StreamClientInterceptor())
        - imports:
            grpc: google.golang.org/grpc
            grpctrace: gopkg.in/DataDog/dd-trace-go.v1/contrib/google.golang.org/grpc
          template: grpc.WithUnaryInterceptor(grpctrace.UnaryClientInterceptor())