Skip to content

Commit

Permalink
added span kind tag in aws sdk invoke lambda instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Angith committed Mar 26, 2024
1 parent f7239bf commit e1a544a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion instrumentation/instaawssdk/invoke_lambda.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package instaawssdk
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/lambda"
"github.com/opentracing/opentracing-go/ext"
otlog "github.com/opentracing/opentracing-go/log"

"github.com/aws/aws-sdk-go/aws/request"
Expand All @@ -20,7 +21,9 @@ func StartInvokeLambdaSpan(req *request.Request, sensor instana.TracerLogger) {
// an exit span will be created without a parent span
// and forwarded if user chose to opt in
// TODO: check what is the type of span for lambda and add it in options
opts := []opentracing.StartSpanOption{}
opts := []opentracing.StartSpanOption{
opentracing.Tag{Key: string(ext.SpanKind), Value: "exit"},
}
parent, ok := instana.SpanFromContext(req.Context())
if ok {
opts = append(opts, opentracing.ChildOf(parent.Context()))
Expand Down

0 comments on commit e1a544a

Please sign in to comment.