Skip to content

[Go] how to get remote address in SpanDecoratorFunc #35

@NeoCN

Description

@NeoCN

I notice that there is SpanDecoratorFunc to use, and I want to add peer.Address Tag in both client and server span, according to the doc

// SpanDecoratorFunc provides an (optional) mechanism for otgrpc users to add
// arbitrary tags/logs/etc to the opentracing.Span associated with client
// and/or server RPCs.
type SpanDecoratorFunc func(
	span opentracing.Span,
	method string,
	req, resp interface{},
	grpcError error)

How can I get remote address without context.Context or peer.Peer as argument?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions