zipkin-js
zipkin-js copied to clipboard
AWS Trace ID support
Particularly as AWS lambda functions have tracing data impossible to access outside of X-Ray, we should at least make it possible to propagate their identifier such that we can correlate with it.
Brave, for example, has a feature that allows this called ExtraFieldPropagation https://github.com/openzipkin/brave-webmvc-example/blob/master/servlet3/src/main/java/brave/webmvc/TracingConfiguration.java#L50
cc @pbadenski in case you are interested
I found a piece that may be useful for those working on this in AWS's Doc's Using Environment Variables to Communicate with AWS X-Ray section:
_X_AMZN_TRACE_ID: Contains the tracing header, which includes the sampling decision, trace ID, and parent segment ID. (To learn more about these properties, see Tracing Header.)
If Lambda receives a tracing header when your function is invoked, that header will be used to populate the _X_AMZN_TRACE_ID environment variable. If a tracing header was not received, Lambda will generate one for you.
good point. in the brave code, I noticed this and added a helper (which could probably be hidden) https://github.com/openzipkin/brave/blob/master/propagation/aws/src/main/java/brave/propagation/aws/AWSPropagation.java#L201
Recently, AWS have open sourced their SDKs so we can probably also look to see how they implement things like this.