Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Commit da8741b

Browse files
fix: Update README partials to mention how to use import (#1400)
* Update READM partials to mention how to use import GitHub issue #1398 indicates that a specific incantation is required when using "import" with the trace-agent. This PR updates the README to mention this. * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 9805bd1 commit da8741b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.readme-partials.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ body: |-
1818
require('@google-cloud/trace-agent').start();
1919
// ...
2020
```
21+
22+
If you want to use `import`, you will need to do the following to import all required types:
23+
24+
```
25+
import * as TraceAgent from '@google-cloud/trace-agent';
26+
```
2127
2228
Optionally, you can pass a [configuration object](https://github.com/googleapis/cloud-trace-nodejs/blob/master/src/config.ts) to the `start()` function as follows:
2329

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ require('@google-cloud/trace-agent').start();
7373
// ...
7474
```
7575

76+
If you want to use `import`, you will need to do the following to import all required types:
77+
78+
```
79+
import * as TraceAgent from '@google-cloud/trace-agent';
80+
```
81+
7682
Optionally, you can pass a [configuration object](https://github.com/googleapis/cloud-trace-nodejs/blob/master/src/config.ts) to the `start()` function as follows:
7783

7884
<!-- TODO(kjin): Generate documentation from the public interface of the Trace Agent, and link it here. -->

0 commit comments

Comments
 (0)