Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tags on asyncTimer during function execution #202

Open
Ashniu123 opened this issue Apr 19, 2021 · 1 comment
Open

Add tags on asyncTimer during function execution #202

Ashniu123 opened this issue Apr 19, 2021 · 1 comment

Comments

@Ashniu123
Copy link

Hi

I have a scenario where I want to add tags to the asyncTimer stat with data which is fetched during the function execution. Is there a way to do that with hot-shots?

I use datadog for metric collection. Their dd-trace library has the capability to do so with tracer.scope().active()?.addTags(...). Could hot-shots have something similar?

@bdeitte
Copy link
Collaborator

bdeitte commented May 2, 2021

It doesn't look like that is something you can do: https://github.com/brightcove/hot-shots/blob/master/lib/statsFunctions.js#L67

Your choices here would be to add something (PRs always welcome) or to take this code into your own code and alter, as it's syntactic sugar on top of the timing() function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants