AWS XRay will consider segments with a namespace of "remote" calls to a remote service. This allows the service map show which services are calling the remote service. It also allows you to select the remote service and view traces that called it.
The type definition for the Subsegment class does not contain the property namespace, meaning TypeScript projects that use this type definition are unable to override the namespace property.
Proposed Resolution
Add the namespace property as an optional string to the Subsegment type definition.
Background
AWS XRay will consider segments with a
namespace
of"remote"
calls to a remote service. This allows the service map show which services are calling the remote service. It also allows you to select the remote service and view traces that called it.Setting the namespace to
"remote"
is also done within this codebase. https://github.com/aws/aws-xray-sdk-node/blob/043be345d24dc537463a58999dd8651fefa12349/packages/mysql/lib/mysql_p.js#L251The type definition for the
Subsegment
class does not contain the propertynamespace
, meaning TypeScript projects that use this type definition are unable to override thenamespace
property.Proposed Resolution
Add the
namespace
property as an optional string to theSubsegment
type definition.