openzipkin / zipkin-aws

Reporters and collectors for use in Amazon's cloud
Apache License 2.0
69 stars 34 forks source link

Implement support for aws ec2 segment in X-Ray UDP #129

Closed SerCeMan closed 5 years ago

SerCeMan commented 5 years ago

This PR implements support for the EC2 section of the AWS segment in the X-Ray span metadata.

As a result, X-Ray is able to regognise the tag as a special tag instead of having it as an annotation.

Screen Shot 2019-04-14 at 2 33 25 pm
SerCeMan commented 5 years ago

Hey, @devinsba! Thanks for merging. In our case, there is no specific instrumentation, we add these tags manually when an instance of tracer is constructed, similar to the following:

.addFinishedSpanHandler(new FinishedSpanHandler() {
  @Override
  public boolean handle(TraceContext context, MutableSpan span) {
    if (instanceId != null) {
      span.tag("aws.ec2.instance_id", instanceId);
    }
    // ...
    return true;
  }
})
devinsba commented 5 years ago

Ok, looks about like what I was planning to implement at some point. I'll ping you when I build it to see if you have anything I missed