func (p *ProjectsService) QueryProjectsByStatus(ctx context.Context, req *service.QueryProjectsByStatusRequest) (*service.QueryProjectsByStatusResponse, error) {
// Create a tracer from the inner global tracer
tracer := otel.Tracer("projects-service")
ctx, span := tracer.Start(ctx, "Query Projects By Status")
defer span.End()
// Add attributes to the span
span.SetAttributes(
attribute.Key("project.status`").Int(req.Status)
)
// Note that if you want to create a tracer derived from
// the above tracer, you will need to pass it down to where its needed
projects := getProjectsForStatus(ctx, req.Status)
return &service.QueryProjectsByStatusResponse{ProjectsByStatus: projects}, nil
}