-
Notifications
You must be signed in to change notification settings - Fork 8
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 caller
label for "tracing lite"
#51
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Apart from one nit we can go ahead with it. As discussed earlier, this works in Node/Deno environments but will break in the browser - which we'll have to pick up right after merging this ✌️
packages/lib/src/wrappers.ts
Outdated
@@ -10,6 +10,14 @@ import { | |||
} from "./utils"; | |||
import { registerBuildInfo } from "./buildInfo"; | |||
|
|||
import { AsyncLocalStorage } from "async_hooks"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import can be moved underneath the @opentelemetry/api
import on line 1.
This PR adds a
caller
label to function metrics. It usesasyncLocalStorage
API available in Node (and polyfilled in Deno) to register and pass on the
function name detail to the next function in the async call chain.