Skip to content

Add Tracer and AWS X-Ray middlewares. #1004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 10, 2017
Merged

Add Tracer and AWS X-Ray middlewares. #1004

merged 1 commit into from
Jan 10, 2017

Conversation

raphael
Copy link
Member

@raphael raphael commented Jan 10, 2017

The Tracer middleware retrieves the trace ID and parent span ID from the
incoming request if present and stores the in the context. The middleware
provides a goa Doer wrapper function that extract the values from the context
and sets them in the outgoing request.

The middleware constructor accepts a percentage as argument which specifies the
sampling value. This value is used when the incoming request does not include
tracing headers to determine whether a new trace ID should be computed and set
in the context.

The xray middleware leverages the values set in the context by the Tracer
middleware to report tracing information to the AWS X-Ray service. The package
also makes it possible to attach further information to the traces such as
annotations and metadata. The middleware also reports errors to the service.

The xray package also provides a WrapClient function for wrapping an instance
of http.Client to trace requests made to external services.

The Tracer middleware retrieves the trace ID and parent span ID from the
incoming request if present and stores the in the context. The middleware
provides a goa Doer wrapper function that extract the values from the context
and sets them in the outgoing request.

The middleware constructor accepts a percentage as argument which specifies the
sampling value. This value is used when the incoming request does *not* include
tracing headers to determine whether a new trace ID should be computed and set
in the context.

The xray middleware leverages the values set in the context by the Tracer
middleware to report tracing information to the AWS X-Ray service. The package
also makes it possible to attach further information to the traces such as
annotations and metadata. The middleware also reports errors to the service.

The xray package also provides a WrapClient function for wrapping an instance
of http.Client to trace requests made to external services.
@raphael raphael merged commit b76da45 into v1 Jan 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant