microsoft / microsoft/typespec

Consider a typed tracing

Open
#2,067 0 comments 0 reactions 0 assignees View on GitHub
design:needed
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

In a similar way that we have diagnostics on `$lib` having the ability to expose ahead of time what are all the tracing options for the compiler/a library would be nice to generate/keep doc up to date.
```ts
createTypeSpecLIbrary({
name: "@typespec/http",
tracing: [
"http.validate",
"http.decorators.use",
// ...
]
})
```

or more verbose with a description
```ts
createTypeSpecLibrary({
name: "@typespec/http",
tracing: {
"http.validate": "Running http validation",
"http.decorators.use": "Using an http decorator"
// ...
}
})
```

and then we can use `getTracer(program)` which returns a typed helper that can `.trace`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.