Indicate/Sanitize Invalid Entity Names
- Dominant language
- JavaScript
- Stars
- 280
- Forks
- 157
- PR merge metrics
- No merged PRs in 30d
Description
When customers input an invalid name to a segment or subsegment, the SDK does not validate for correctness and will stream it out to the Daemon. The Daemon, in turn, will unsuccessfully send the resulting entity and log the error.
This is an unfavorable customer experience because although their application had executed with no errors, they will not see the problematic entity in their trace. Furthermore, they would only know that the entity has an incorrect name if they have access to the Daemon logs.
What we should do is either sanitize the entity name and log that the action has occurred, or indicate that the entity name is incorrect.
In [Python](https://github.com/aws/aws-xray-sdk-python/blob/master/aws_xray_sdk/core/models/entity.py#L34), we sanitize the data and log it to inform customers. We should follow a similar pattern so that customers can be more informed when they see either missing entities or different entity names as a result of this error.
Contributor guide
Research direction
Compare the Python implementation in aws_xray_sdk/core/models/entity.py with the Node.js segment and subsegment entity-name handling. Determine whether the Node.js SDK should sanitize invalid names or report them, then identify the relevant tests or add coverage for the chosen behavior; done means customers are informed and invalid entities are no longer silently lost.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100