DataDog / datadog-lambda-go

The Datadog AWS Lambda package for Go
Apache License 2.0
59 stars 40 forks source link

xray trace_id should be uint64 not hex #55

Closed xrn closed 3 years ago

xrn commented 3 years ago

I already described this in - https://github.com/DataDog/datadog-lambda-go/pull/44

I would like to ask, are you sure that x-ray mode is working with Datadog traces? From tests, I see that it is generating trace_id as hex

{
    "traces": [
        [
            {
                "trace_id": "6fb744bf13869d00",
                "span_id": "1e8538262a43c188",
                "parent_id": "1e5df70157538a8e",
                "name": "aws.lambda",

And traces are not connecting with logs - https://docs.datadoghq.com/tracing/connect_logs_and_traces/ - because Datadog is making query like @lambda.request_id:(fe757c85-ef6f-4c09-8e24-ca5a16edbdae) OR trace_id:8049978446405082368 (converted hex to uint64 is giving correct value). Also reading documentation https://docs.datadoghq.com/api/v1/tracing/#send-traces looks like DataDog is expecting trace_id as uint64

Even in #44 we can find

fmt.Println("Current trace ID: " + strconv.FormatUint(currentSpanContext.TraceID(), 10))

Bottom line: In current Hex format traces are not connected to Logs - it should be fixed and send as uint64

What do you think? Or maybe I am doing something wrong

CC @nhinsch @DarcyRaynerDD