add-struct-field

The add-struct-field advice inserts a new field in a struct type declaration (typically matched by struct-definition).

This is typically used to insert new state to structs when instrumenting libraries that return struct pointers (as opposed to interface values).

Examples

add-struct-field:
    name: __dd_configuration
    type: any
add-struct-field:
    name: clientOptions
    type: gopkg.in/DataDog/dd-trace-go.v1/contrib/elastic/go-elasticsearch.v6.ClientOption