-
Notifications
You must be signed in to change notification settings - Fork 11
Auto convert w3c trace format (#184) #332
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
Auto convert w3c trace format (#184) #332
Conversation
d9786f6
to
a3359b5
Compare
@@ -414,7 +414,7 @@ func TestDatasource(t *testing.T) { | |||
}) | |||
|
|||
t.Run("getTrace query with different region", func(t *testing.T) { | |||
response, err := queryDatasource(ds, datasource.QueryGetTrace, datasource.GetTraceQueryData{Query: "traceID", Region: "us-east-1"}) | |||
response, err := queryDatasource(ds, datasource.QueryGetTrace, datasource.GetTraceQueryData{Query: "trace1", Region: "us-east-1"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to fix this test as I had to remove hardcoded traceId
in line 185
@@ -398,7 +398,7 @@ func TestDatasource(t *testing.T) { | |||
}) | |||
|
|||
t.Run("getTrace query", func(t *testing.T) { | |||
response, err := queryDatasource(ds, datasource.QueryGetTrace, datasource.GetTraceQueryData{Query: "traceID"}) | |||
response, err := queryDatasource(ds, datasource.QueryGetTrace, datasource.GetTraceQueryData{Query: "trace1"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to fix this test as I had to remove hardcoded traceId
in line 185
func convertW3CToXRayTraceID(w3cTraceID string) string { | ||
// X-Ray format: 1-{8 chars}-{24 chars} | ||
if len(w3cTraceID) == 32 { | ||
return fmt.Sprintf("1-%s-%s", w3cTraceID[0:8], w3cTraceID[8:]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @vineethawal!
@kevinwcyu Do we have any plans for next release of this plugin? |
This PR implements support for automatically converting W3C Trace Context format to AWS X-Ray format. This mimics the transformation behavior available in the AWS X-Ray console and allows the plugin to interoperate more effectively with systems using the standardized W3C trace context specification.
Resolves: #184