Closed
Description
Description of the feature request
Problem statement
While an initial implementation of the Tracer
core package has been done there are a handful of features that are missing when compared with the Python version. Some of these features were implemented recently while others, due to the language difference, need to be implemented differently and for this reason where left out in the initial implementation.
Summary of the feature
- Cold start annotation present for every invocation (#851). At the moment
Tracer
annotates onlyColdStart = true
during the first invocation. - Service name is added as an annotation (#861). At the moment
Tracer
uses the service name only as default namespace when adding metadata to traces. - Automatic traces for HTTP requests (Python version captures all libraries). At the moment
Tracer
(supports this) only via explicit opt-in using the escape hatch mechanism. -
Reusing tracer across your code (Python version implements Singleton pattern). At the moment everynew Tracer()
returns a completely new instance, JS/TS could implement it like so.
⬆️ We are opting to not introduce this feature in order to not force this pattern on every customer. See this comment.
Code examples
N/A
Benefits for you and the wider AWS community
Same behaviour as other Powertools libraries & better DX
Describe alternatives you've considered
N/A
Additional context