Skip to content

Commit 0fad1f8

Browse files
docs: spelling corrections (#2002)
1 parent 4dc812e commit 0fad1f8

File tree

43 files changed

+78
-78
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+78
-78
lines changed

GUIDELINES.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Instrumentations Implementation Guide
22

3-
This document captures general guidelines for implementing instrumentations in NodeJS and browser.
3+
This document captures general guidelines for implementing instrumentations in Node.js and browser.
44

55
## Types
66

@@ -14,11 +14,11 @@ These typescript `interface`s, `type`s, `enum`s and js `const`ants statements SH
1414

1515
#### Exporting
1616

17-
All types from `types.ts` file MUST be exported from instrumentation `index.ts` using export statement `export * from './types'`, which guarentee that they publicly available.
17+
All types from `types.ts` file MUST be exported from instrumentation `index.ts` using export statement `export * from './types'`, which guarantee that they publicly available.
1818

1919
#### Breaking Changes
2020

21-
Since these types are publicly exported, a breaking change in this file can cause transpilation issues or require code changes for existing users. Special care and attention should be put when modifiying this file to guarantee backword compatibility or proper documentation of breaking changes.
21+
Since these types are publicly exported, a breaking change in this file can cause transpilation issues or require code changes for existing users. Special care and attention should be put when modifying this file to guarantee backward compatibility or proper documentation of breaking changes.
2222

2323
### Internal Types
2424

@@ -30,15 +30,15 @@ It is sometimes convenient to place these declarations in a dedicated file which
3030

3131
The file SHOULD be named `internal-types.ts`.
3232

33-
Using this file is optional - when a type is used only in a single file, it is ok to declare it and use it in this file **without exporting it**. When a type is expected to be shared between multiple files, it is encourged to be declared in `internal-types.ts` to prevent circular dependencies.
33+
Using this file is optional - when a type is used only in a single file, it is ok to declare it and use it in this file **without exporting it**. When a type is expected to be shared between multiple files, it is encouraged to be declared in `internal-types.ts` to prevent circular dependencies.
3434

3535
#### Exporting
3636

37-
This file MUST NOT be exported publicly from instrumentation package, not directly (via `index.ts`) and not transitivly via export of other files.
37+
This file MUST NOT be exported publicly from instrumentation package, not directly (via `index.ts`) and not transitively via export of other files.
3838

3939
#### Changes
4040

41-
Since the declarations in this file are not exported in the public instrumentation api, it is allowed to apply any refactors to this file, and they will not be breaking changes to users.
41+
Since the declarations in this file are not exported in the public instrumentation API, it is allowed to apply any refactors to this file, and they will not be breaking changes to users.
4242

4343
## Dependencies
4444

@@ -48,7 +48,7 @@ Since instrumentations will install all their dependencies into the end user `no
4848

4949
### OpenTelemetry API
5050

51-
Instrumentation SHOULD NOT add a dependency on `@opentelemetry/api`, as using multiple instrumentations might install multiple api versions into the user node_modules directory. It SHOULD add an entry in `"peerDependencies"` in `package.json` with the **minimum** api version it requires, as caret range (for example: `^1.0.0`).
51+
Instrumentation SHOULD NOT add a dependency on `@opentelemetry/api`, as using multiple instrumentations might install multiple API versions into the user node_modules directory. It SHOULD add an entry in `"peerDependencies"` in `package.json` with the **minimum** API version it requires, as caret range (for example: `^1.0.0`).
5252

5353
Users and distributions need to install a version of `@opentelemetry/api` that is compatible with the instrumentation to use it.
5454

@@ -64,14 +64,14 @@ Instrumentations SHOULD NOT add a `"dependency"` or `"peerDependencies"` on the
6464

6565
This means that the instrumentation code SHOULD NOT `import` anywhere from the instrumented package. e.g. `@opentelemetry/instrumentation-foo` cannot `import 'foo'` as it will fail for applications that installed the instrumentation but not the `foo` package itself, which is a valid and supported use case for OpenTelemetry distributions and end users.
6666

67-
It is allowed, however, to import `types` from the instrumented package with the [`import type`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export) syntax, as long as this type is not used in the public api:
67+
It is allowed, however, to import `types` from the instrumented package with the [`import type`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export) syntax, as long as this type is not used in the public API:
6868

6969
```js
7070
// instrumentation.ts
7171
import type { Bar } from 'foo'; // OK
7272
```
7373

74-
Since the instrumented package is installed as a dev dependency, types are available during compiling. Since they are not part of the public api, typescript removes these imports from the build artifacts during transpilation.
74+
Since the instrumented package is installed as a dev dependency, types are available during compiling. Since they are not part of the public API, typescript removes these imports from the build artifacts during transpilation.
7575

7676
### Types Public API
7777

@@ -89,7 +89,7 @@ Note that types that are used in non-public files (like `internal-types.ts` or `
8989

9090
### Adding Types in Public API
9191

92-
Sometimes, instrumented package types are needed in an instrumentation's public api. These are mostly found in `types.ts` file on instrumentation config hooks that include data from the package and want to type it for consumers.
92+
Sometimes, instrumented package types are needed in an instrumentation's public API. These are mostly found in `types.ts` file on instrumentation config hooks that include data from the package and want to type it for consumers.
9393

9494
To support this use case, you can choose one of the following options:
9595

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
---
3838

39-
# OpenTelemetry Javascript Contrib
39+
# OpenTelemetry JavaScript Contrib
4040

4141
A repository for OpenTelemetry JavaScript contributions that are not part of the [core repository](https://github.com/open-telemetry/opentelemetry-js) and core distribution of the API and the SDK.
4242

detectors/node/opentelemetry-resource-detector-aws/test/detectors/AwsEcsDetector.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ describe('AwsEcsResourceDetector', () => {
199199
process.env.ECS_CONTAINER_METADATA_URI_V4 = ECS_CONTAINER_METADATA_URI_V4;
200200
});
201201

202-
describe('when succesfully retrieving the data', () => {
202+
describe('when successfully retrieving the data', () => {
203203
function generateLaunchTypeTests(
204204
resourceAttributes: EcsResourceAttributes,
205205
suffix = ''

detectors/node/opentelemetry-resource-detector-aws/test/detectors/AwsEksDetector.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ describe('awsEksDetector', () => {
246246
});
247247
});
248248

249-
describe('on unsuccesful request', () => {
249+
describe('on unsuccessful request', () => {
250250
it('should return an empty resource when timed out', async () => {
251251
fileStub = sinon
252252
.stub(AwsEksDetector, 'fileAccessAsync' as any)

detectors/node/opentelemetry-resource-detector-container/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const tracerProvider = new NodeTracerProvider({ resource });
2828

2929
## Available detectors
3030

31-
- `containerDetector`: Populates `container.id` for processes running on contianers supporting : docker( cgroup v1 or v2 ) or with containerd
31+
- `containerDetector`: Populates `container.id` for processes running on containers supporting : docker( cgroup v1 or v2 ) or with containerd
3232

3333
## Useful links
3434

detectors/node/opentelemetry-resource-detector-github/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ run()
3535

3636
## Useful links
3737

38-
- [GitHub Action Enviornment Variables](https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables)
38+
- [GitHub Action Environment Variables](https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables)
3939
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
4040
- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
4141
- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]

detectors/node/opentelemetry-resource-detector-github/src/detectors/GitHubDetector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class GitHubDetector implements Detector {
4949
* environment variables:
5050
* https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables
5151
*
52-
* If succesful it returns a promise containing a {@link Resource}
52+
* If successful it returns a promise containing a {@link Resource}
5353
* populated with GitHub metadata. Returns a promise containing an
5454
* empty {@link Resource} if the connection fails.
5555
*

examples/express/src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const authMiddleware: RequestHandler = (req, res, next) => {
3434
app.use(express.json());
3535
app.get('/health', (req, res) => res.status(200).send("HEALTHY")); // endpoint that is called by framework/cluster
3636
app.get('/run_test', async (req, res) => {
37-
// Calls another endpoint of the same API, somewhat mimicing an external API call
37+
// Calls another endpoint of the same API, somewhat mimicking an external API call
3838
const createdCat = await axios.post(`http://localhost:${PORT}/cats`, {
3939
name: 'Tom',
4040
friends: [

examples/react-load/preact/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The React Load plugin provides auto-instrumentation for react lifecycle methods.
44
This example uses the plugin and exports them to the console.
55

6-
The example will show traces belong to the mounting, updating, and umounting flows as defined by React 16.4+. In this example we can show how this plugin can also be used in a Preact app.
6+
The example will show traces belong to the mounting, updating, and unmounting flows as defined by React 16.4+. In this example we can show how this plugin can also be used in a Preact app.
77

88
## Installation
99

examples/react-load/react/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The React Load plugin provides auto-instrumentation for react lifecycle methods.
44
This example uses the plugin and exports them to the console.
55

6-
The example will show traces belong to the mounting, updating, and umounting flows as defined by React 16.4+.
6+
The example will show traces belong to the mounting, updating, and unmounting flows as defined by React 16.4+.
77

88
## Installation
99

0 commit comments

Comments
 (0)