diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5fb78e3ba3b..a52223a3873 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -104,7 +104,7 @@ An entry into `CHANGELOG.md` or `experimental/CHANGELOG.md` is required for the - Changes to default settings - New components being added -It is reasonable to omit an entry to the changelog under these circuimstances: +It is reasonable to omit an entry to the changelog under these circumstances: - Updating test to remove flakiness or improve coverage - Updates to the CI/CD process diff --git a/api/README.md b/api/README.md index 56dd23d177d..4ca46c5c4ca 100644 --- a/api/README.md +++ b/api/README.md @@ -36,7 +36,7 @@ npm install @opentelemetry/api @opentelemetry/sdk-trace-base ### Trace Your Application -In order to get started with tracing, you will need to first register an SDK. The SDK you are using may provide a convenience method which calls the registration methods for you, but if you would like to call them directly they are documented here: [sdk registration methods][docs-sdk-registration]. +In order to get started with tracing, you will need to first register an SDK. The SDK you are using may provide a convenience method which calls the registration methods for you, but if you would like to call them directly they are documented here: [SDK registration methods][docs-sdk-registration]. Once you have registered an SDK, you can start and end spans. A simple example of basic SDK registration and tracing a simple operation is below. The example should export spans to the console once per second. For more information, see the [tracing documentation][docs-tracing]. diff --git a/api/test/common/metrics/Metric.test.ts b/api/test/common/metrics/Metric.test.ts index 95422d4cc2f..cfb12e476a9 100644 --- a/api/test/common/metrics/Metric.test.ts +++ b/api/test/common/metrics/Metric.test.ts @@ -42,7 +42,7 @@ describe('Metric', () => { const counter: Counter = { add(_value: number, _attribute: Attributes) {}, }; - // @ts-expect-error Expacting the type of Attributes + // @ts-expect-error Expecting the type of Attributes counter.add(1, { 'another-attribute': 'value' }); }); }); @@ -72,7 +72,7 @@ describe('Metric', () => { const counter: UpDownCounter = { add(_value: number, _attribute: Attributes) {}, }; - // @ts-expect-error Expacting the type of Attributes + // @ts-expect-error Expecting the type of Attributes counter.add(1, { 'another-attribute': 'value' }); }); }); @@ -102,7 +102,7 @@ describe('Metric', () => { const counter: Histogram = { record(_value: number, _attribute: Attributes) {}, }; - // @ts-expect-error Expacting the type of Attributes + // @ts-expect-error Expecting the type of Attributes counter.record(1, { 'another-attribute': 'value' }); }); }); diff --git a/doc/upgrade-guide.md b/doc/upgrade-guide.md index 7c8ea16f7cd..5d6ee28c92e 100644 --- a/doc/upgrade-guide.md +++ b/doc/upgrade-guide.md @@ -107,7 +107,7 @@ Collector exporter packages and types are renamed: - All plugins have been removed in favor of instrumentations. -- The `@opentelemetry/propagator-b3` package previously exported three propagators: `B3Propagator`,`B3SinglePropagator`, and `B3MultiPropagator`, but now only exports the `B3Propagator`. It extracts b3 context in single and multi-header encodings, and injects context using the single-header encoding by default, but can be configured to inject context using the multi-header endcoding during construction: `new B3Propagator({ injectEncoding: B3InjectEncoding.MULTI_HEADER })`. If you were previously using the `B3SinglePropagator` or `B3MultiPropagator` directly, you should update your code to use the `B3Propagator` with the appropriate configuration. See the [readme][otel-propagator-b3] for full details and usage. +- The `@opentelemetry/propagator-b3` package previously exported three propagators: `B3Propagator`,`B3SinglePropagator`, and `B3MultiPropagator`, but now only exports the `B3Propagator`. It extracts b3 context in single and multi-header encodings, and injects context using the single-header encoding by default, but can be configured to inject context using the multi-header encoding during construction: `new B3Propagator({ injectEncoding: B3InjectEncoding.MULTI_HEADER })`. If you were previously using the `B3SinglePropagator` or `B3MultiPropagator` directly, you should update your code to use the `B3Propagator` with the appropriate configuration. See the [README][otel-propagator-b3] for full details and usage. - Sampling configuration via environment variable has changed. If you were using `OTEL_SAMPLING_PROBABILITY` then you should replace it with `OTEL_TRACES_SAMPLER=parentbased_traceidratio` and `OTEL_TRACES_SAMPLER_ARG=` where `` is a number in the [0..1] range, e.g. "0.25". Default is 1.0 if unset. @@ -232,7 +232,7 @@ Some types exported from `"@opentelemetry/api"` have been changed to be more spe ## 0.15.0 to 0.16.0 -[PR-1863](https://github.com/open-telemetry/opentelemetry-js/pull/1863) removed public attributes `keepAlive` and `httpAgentOptions` from nodejs `CollectorTraceExporter` and `CollectorMetricExporter` +[PR-1863](https://github.com/open-telemetry/opentelemetry-js/pull/1863) removed public attributes `keepAlive` and `httpAgentOptions` from Node.js `CollectorTraceExporter` and `CollectorMetricExporter` ## 0.14.0 to 0.15.0 diff --git a/experimental/packages/opentelemetry-browser-detector/README.md b/experimental/packages/opentelemetry-browser-detector/README.md index a1e9002ea98..2ca25a7e76b 100644 --- a/experimental/packages/opentelemetry-browser-detector/README.md +++ b/experimental/packages/opentelemetry-browser-detector/README.md @@ -51,4 +51,4 @@ start().then(()=> console.log("Instrumentation started")); The browser identification attributes will be added to the resource spans when traces are created. These attributes include platform, brands, mobile, language if the browser supports -the userAgentData api, otherwise it will contain only the user_agent informations +the userAgentData api, otherwise it will contain only the user_agent information diff --git a/experimental/packages/opentelemetry-browser-detector/src/types.ts b/experimental/packages/opentelemetry-browser-detector/src/types.ts index c8567a4f95f..6cd6b020936 100644 --- a/experimental/packages/opentelemetry-browser-detector/src/types.ts +++ b/experimental/packages/opentelemetry-browser-detector/src/types.ts @@ -20,7 +20,7 @@ export type UserAgentData = { }; export const BROWSER_ATTRIBUTES = { - PLATFORM: 'browser.platform', //TODO replace with SemantecConventions attribute when available + PLATFORM: 'browser.platform', //TODO replace with SemanticConventions attribute when available BRANDS: 'browser.brands', MOBILE: 'browser.mobile', LANGUAGE: 'browser.language', diff --git a/experimental/packages/opentelemetry-instrumentation-fetch/test/fetch.test.ts b/experimental/packages/opentelemetry-instrumentation-fetch/test/fetch.test.ts index 832b2d89990..292f05ef91b 100644 --- a/experimental/packages/opentelemetry-instrumentation-fetch/test/fetch.test.ts +++ b/experimental/packages/opentelemetry-instrumentation-fetch/test/fetch.test.ts @@ -654,7 +654,7 @@ describe('fetch', () => { clearData(); }); - it('applies attributes when the request is succesful', async () => { + it('applies attributes when the request is successful', async () => { await prepare(url, span => { span.setAttribute(CUSTOM_ATTRIBUTE_KEY, 'custom value'); }); diff --git a/experimental/packages/opentelemetry-instrumentation-grpc/src/clientUtils.ts b/experimental/packages/opentelemetry-instrumentation-grpc/src/clientUtils.ts index f4c5470d16c..281e884d3f0 100644 --- a/experimental/packages/opentelemetry-instrumentation-grpc/src/clientUtils.ts +++ b/experimental/packages/opentelemetry-instrumentation-grpc/src/clientUtils.ts @@ -152,7 +152,7 @@ export function patchResponseStreamEvents(span: Span, call: EventEmitter) { } /** - * Execute grpc client call. Apply completitionspan properties and end the + * Execute grpc client call. Apply completion span properties and end the * span on callback or receiving an emitted event. */ export function makeGrpcClientRemoteCall( diff --git a/experimental/packages/opentelemetry-instrumentation-grpc/test/helper.ts b/experimental/packages/opentelemetry-instrumentation-grpc/test/helper.ts index 9d861fd6512..131dde04b4b 100644 --- a/experimental/packages/opentelemetry-instrumentation-grpc/test/helper.ts +++ b/experimental/packages/opentelemetry-instrumentation-grpc/test/helper.ts @@ -136,7 +136,7 @@ export async function startServer(proto: any, port: number) { server.addService(proto.GrpcTester.service, { // An error is emitted every time // request.num <= MAX_ERROR_STATUS = (status.UNAUTHENTICATED) - // in those cases, erro.code = request.num + // in those cases, error.code = request.num // This method returns the request // This method returns the request diff --git a/experimental/packages/opentelemetry-instrumentation-http/README.md b/experimental/packages/opentelemetry-instrumentation-http/README.md index 312eb73bd76..8fd50c3107c 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/README.md +++ b/experimental/packages/opentelemetry-instrumentation-http/README.md @@ -67,7 +67,7 @@ The following options are deprecated: | Options | Type | Description | | ------- | ---- | ----------- | | `ignoreIncomingPaths` | `IgnoreMatcher[]` | Http instrumentation will not trace all incoming requests that match paths | -| `ignoreOutgoingUrls` | `IgnoreMatcher[]` | Http instrumentation will not trace all outgoing requests that match urls | +| `ignoreOutgoingUrls` | `IgnoreMatcher[]` | Http instrumentation will not trace all outgoing requests that match URLs | ## Useful links diff --git a/experimental/packages/opentelemetry-instrumentation-http/src/utils.ts b/experimental/packages/opentelemetry-instrumentation-http/src/utils.ts index a70dd3de854..a782b8ab60a 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/src/utils.ts +++ b/experimental/packages/opentelemetry-instrumentation-http/src/utils.ts @@ -373,7 +373,7 @@ export const getOutgoingRequestMetricAttributes = ( spanAttributes[SemanticAttributes.HTTP_METHOD]; metricAttributes[SemanticAttributes.NET_PEER_NAME] = spanAttributes[SemanticAttributes.NET_PEER_NAME]; - //TODO: http.url attribute, it should susbtitute any parameters to avoid high cardinality. + //TODO: http.url attribute, it should substitute any parameters to avoid high cardinality. return metricAttributes; }; @@ -514,7 +514,7 @@ export const getIncomingRequestMetricAttributes = ( spanAttributes[SemanticAttributes.NET_HOST_NAME]; metricAttributes[SemanticAttributes.HTTP_FLAVOR] = spanAttributes[SemanticAttributes.HTTP_FLAVOR]; - //TODO: http.target attribute, it should susbtitute any parameters to avoid high cardinality. + //TODO: http.target attribute, it should substitute any parameters to avoid high cardinality. return metricAttributes; }; diff --git a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts index e5b2cebb97b..c3eeaf5ee92 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts +++ b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts @@ -555,7 +555,7 @@ describe('HttpInstrumentation', () => { }); for (const arg of ['string', {}, new Date()]) { - it(`should be tracable and not throw exception in ${protocol} instrumentation when passing the following argument ${JSON.stringify( + it(`should be traceable and not throw exception in ${protocol} instrumentation when passing the following argument ${JSON.stringify( arg )}`, async () => { try { @@ -1101,10 +1101,10 @@ describe('HttpInstrumentation', () => { it('should set rpc metadata for incoming http request', async () => { server = http.createServer((request, response) => { - const rpcMemadata = getRPCMetadata(context.active()); - assert(typeof rpcMemadata !== 'undefined'); - assert(rpcMemadata.type === RPCType.HTTP); - assert(rpcMemadata.span.setAttribute('key', 'value')); + const rpcMetadata = getRPCMetadata(context.active()); + assert(typeof rpcMetadata !== 'undefined'); + assert(rpcMetadata.type === RPCType.HTTP); + assert(rpcMetadata.span.setAttribute('key', 'value')); response.end('Test Server Response'); }); await new Promise(resolve => server.listen(serverPort, resolve)); diff --git a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts index 9da1c115b45..668cf9566d5 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts +++ b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts @@ -465,7 +465,7 @@ describe('HttpsInstrumentation', () => { }); for (const arg of ['string', {}, new Date()]) { - it(`should be tracable and not throw exception in ${protocol} instrumentation when passing the following argument ${JSON.stringify( + it(`should be traceable and not throw exception in ${protocol} instrumentation when passing the following argument ${JSON.stringify( arg )}`, async () => { try { diff --git a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/utils.test.ts b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/utils.test.ts index 35b3c1ab5bc..4001335355a 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/utils.test.ts +++ b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/utils.test.ts @@ -311,7 +311,7 @@ describe('Utility', () => { ); }); - it('should succesfully process without middleware stack', () => { + it('should successfully process without middleware stack', () => { const request = { socket: {}, } as IncomingMessage; diff --git a/experimental/packages/opentelemetry-instrumentation/README.md b/experimental/packages/opentelemetry-instrumentation/README.md index 6c27e3d36d0..39ddaeab9f1 100644 --- a/experimental/packages/opentelemetry-instrumentation/README.md +++ b/experimental/packages/opentelemetry-instrumentation/README.md @@ -216,13 +216,13 @@ registerInstrumentations({ The `registerInstrumentations()` API allows to specify which `TracerProvider` and/or `MeterProvider` to use by the given options object. If nothing is specified the global registered provider is used. Usually this is what most users want therefore it's recommended to keep this default. -There might be usecase where someone has the need for more providers within an application. Please note that special care must be takes in such setups +There might be use case where someone has the need for more providers within an application. Please note that special care must be takes in such setups to avoid leaking information from one provider to the other because there are a lot places where e.g. the global `ContextManager` or `Propagator` is used. -## Instrumentation for ES Modules In NodeJS (experimental) +## Instrumentation for ES Modules In Node.js (experimental) -As the module loading mechanism for ESM is different than CJS, you need to select a custom loader so instrumentation can load hook on the esm module it want to patch. To do so, you must provide the `--experimental-loader=@opentelemetry/instrumentation/hook.mjs` flag to the `node` binary. Alternatively you can set the `NODE_OPTIONS` environment variable to `NODE_OPTIONS="--experimental-loader=@opentelemetry/instrumentation/hook.mjs"`. -As the ESM module loader from NodeJS is experimental, so is our support for it. Feel free to provide feedback or report issues about it. +As the module loading mechanism for ESM is different than CJS, you need to select a custom loader so instrumentation can load hook on the ESM module it want to patch. To do so, you must provide the `--experimental-loader=@opentelemetry/instrumentation/hook.mjs` flag to the `node` binary. Alternatively you can set the `NODE_OPTIONS` environment variable to `NODE_OPTIONS="--experimental-loader=@opentelemetry/instrumentation/hook.mjs"`. +As the ESM module loader from Node.js is experimental, so is our support for it. Feel free to provide feedback or report issues about it. **Note**: ESM Instrumentation is not yet supported for Node 20. diff --git a/experimental/packages/opentelemetry-sdk-node/README.md b/experimental/packages/opentelemetry-sdk-node/README.md index 0afe166c719..51ef136be95 100644 --- a/experimental/packages/opentelemetry-sdk-node/README.md +++ b/experimental/packages/opentelemetry-sdk-node/README.md @@ -132,7 +132,7 @@ An array of span processors to register to the tracer provider. ### traceExporter -Configure a trace exporter. If an exporter is configured, it will be used with a [BatchSpanProcessor](../../../packages/opentelemetry-sdk-trace-base/src/platform/node/export/BatchSpanProcessor.ts). If an exporter OR span processor is not configured programatically, this package will auto setup the default `otlp` exporter with `http/protobuf` protocol with a `BatchSpanProcessor`. +Configure a trace exporter. If an exporter is configured, it will be used with a [BatchSpanProcessor](../../../packages/opentelemetry-sdk-trace-base/src/platform/node/export/BatchSpanProcessor.ts). If an exporter OR span processor is not configured programmatically, this package will auto setup the default `otlp` exporter with `http/protobuf` protocol with a `BatchSpanProcessor`. ### spanLimits diff --git a/experimental/packages/opentelemetry-sdk-node/test/TracerProviderWithEnvExporter.test.ts b/experimental/packages/opentelemetry-sdk-node/test/TracerProviderWithEnvExporter.test.ts index 7ceb5e3dce7..21a1fa93d79 100644 --- a/experimental/packages/opentelemetry-sdk-node/test/TracerProviderWithEnvExporter.test.ts +++ b/experimental/packages/opentelemetry-sdk-node/test/TracerProviderWithEnvExporter.test.ts @@ -132,7 +132,7 @@ describe('set up trace exporter with env exporters', () => { assert(listOfProcessors === undefined); delete env.OTEL_TRACES_EXPORTER; }); - it('log warning that sdk will not be initalized when exporter is set to none', async () => { + it('log warning that sdk will not be initialized when exporter is set to none', async () => { env.OTEL_TRACES_EXPORTER = 'none'; new TracerProviderWithEnvExporters(); diff --git a/experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts b/experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts index 8251a999847..2019fdce290 100644 --- a/experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts +++ b/experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts @@ -951,7 +951,7 @@ describe('setup exporter from env', () => { assert(activeProcessor instanceof NoopSpanProcessor); delete env.OTEL_TRACES_EXPORTER; }); - it('log warning that sdk will not be initalized when exporter is set to none', async () => { + it('log warning that sdk will not be initialized when exporter is set to none', async () => { env.OTEL_TRACES_EXPORTER = 'none'; const sdk = new NodeSDK(); sdk.start(); diff --git a/experimental/packages/otlp-exporter-base/test/common/util.test.ts b/experimental/packages/otlp-exporter-base/test/common/util.test.ts index b00d1f36a5c..e1e539273ef 100644 --- a/experimental/packages/otlp-exporter-base/test/common/util.test.ts +++ b/experimental/packages/otlp-exporter-base/test/common/util.test.ts @@ -72,7 +72,7 @@ describe('utils', () => { const finalUrl = appendResourcePathToUrl(url, resourcePath); assert.strictEqual(finalUrl, url + '/' + resourcePath); }); - it('should append resourse path even when url already contains path ', () => { + it('should append resource path even when url already contains path ', () => { const url = 'http://foo.bar/v1/traces'; const resourcePath = 'v1/traces'; @@ -82,7 +82,7 @@ describe('utils', () => { }); // only invoked with signal specific endpoint - describe('appendRootPathToUrlIfNeeded - specifc signal http endpoint', () => { + describe('appendRootPathToUrlIfNeeded - specific signal http endpoint', () => { it('should append root path when missing', () => { const url = 'http://foo.bar'; @@ -110,7 +110,7 @@ describe('utils', () => { } }); - it('should not change string when url is not parseable', () => { + it('should not change string when url is not parsable', () => { const url = 'this is not a URL'; const finalUrl = appendRootPathToUrlIfNeeded(url); diff --git a/experimental/packages/shim-opencensus/src/ShimTracer.ts b/experimental/packages/shim-opencensus/src/ShimTracer.ts index c276b99e53e..0f479e93d12 100644 --- a/experimental/packages/shim-opencensus/src/ShimTracer.ts +++ b/experimental/packages/shim-opencensus/src/ShimTracer.ts @@ -77,7 +77,7 @@ export class ShimTracer implements oc.Tracer { onStartSpan(): void {} onEndSpan(): void {} setCurrentRootSpan() { - // This can't be correctly overriden since OTel context does not provide a way to set + // This can't be correctly overridden since OTel context does not provide a way to set // context without a callback. Leave noop for now. } diff --git a/packages/opentelemetry-context-async-hooks/src/AsyncHooksContextManager.ts b/packages/opentelemetry-context-async-hooks/src/AsyncHooksContextManager.ts index 5a2a3abae5f..c7b5a214118 100644 --- a/packages/opentelemetry-context-async-hooks/src/AsyncHooksContextManager.ts +++ b/packages/opentelemetry-context-async-hooks/src/AsyncHooksContextManager.ts @@ -73,7 +73,7 @@ export class AsyncHooksContextManager extends AbstractAsyncHooksContextManager { private _init(uid: number, type: string) { // ignore TIMERWRAP as they combine timers with same timeout which can lead to // false context propagation. TIMERWRAP has been removed in node 11 - // every timer has it's own `Timeout` resource anyway which is used to propagete + // every timer has it's own `Timeout` resource anyway which is used to propagate // context. if (type === 'TIMERWRAP') return; diff --git a/packages/opentelemetry-core/src/internal/exporter.ts b/packages/opentelemetry-core/src/internal/exporter.ts index 28061f5ee7f..2121d7cb784 100644 --- a/packages/opentelemetry-core/src/internal/exporter.ts +++ b/packages/opentelemetry-core/src/internal/exporter.ts @@ -24,7 +24,7 @@ export interface Exporter { /** * @internal - * Shared functionality used by Exporters while exporting data, including suppresion of Traces. + * Shared functionality used by Exporters while exporting data, including suppression of Traces. */ export function _export( exporter: Exporter, diff --git a/packages/opentelemetry-core/test/common/time.test.ts b/packages/opentelemetry-core/test/common/time.test.ts index bf691c70717..1c8df7016ed 100644 --- a/packages/opentelemetry-core/test/common/time.test.ts +++ b/packages/opentelemetry-core/test/common/time.test.ts @@ -191,7 +191,7 @@ describe('time', () => { }); }); - describe('#hrTimeToMicroeconds', () => { + describe('#hrTimeToMicroseconds', () => { it('should return microseconds', () => { const output = hrTimeToMicroseconds([1, 200000000]); assert.deepStrictEqual(output, 1200000); diff --git a/packages/opentelemetry-exporter-jaeger/src/types.ts b/packages/opentelemetry-exporter-jaeger/src/types.ts index d7d62f4daae..c67b524657e 100644 --- a/packages/opentelemetry-exporter-jaeger/src/types.ts +++ b/packages/opentelemetry-exporter-jaeger/src/types.ts @@ -25,7 +25,7 @@ export interface ExporterConfig { /** Time to wait for an onShutdown flush to finish before closing the sender */ flushTimeout?: number; // default: 2000 //The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces - //If setten will override host and port + //If set, will override host and port endpoint?: string; //Username to send as part of "Basic" authentication to the collector endpoint username?: string; diff --git a/packages/opentelemetry-exporter-jaeger/test/transform.test.ts b/packages/opentelemetry-exporter-jaeger/test/transform.test.ts index 35a11c7ffd8..6aade85f5a2 100644 --- a/packages/opentelemetry-exporter-jaeger/test/transform.test.ts +++ b/packages/opentelemetry-exporter-jaeger/test/transform.test.ts @@ -381,7 +381,7 @@ describe('transform', () => { assert.strictEqual( thriftSpan.tags.find(tag => tag.key === 'error'), undefined, - 'If span status USET, no error tag' + 'If span status UNSET, no error tag' ); readableSpan.status.code = SpanStatusCode.ERROR; diff --git a/packages/opentelemetry-exporter-zipkin/README.md b/packages/opentelemetry-exporter-zipkin/README.md index 8dcb1e229af..dc9d57ad75c 100644 --- a/packages/opentelemetry-exporter-zipkin/README.md +++ b/packages/opentelemetry-exporter-zipkin/README.md @@ -51,7 +51,7 @@ You can use built-in `SimpleSpanProcessor` or `BatchSpanProcessor` or write your ### Options -- **getExportRequestHeaders** - optional interceptor that allows adding new headers everytime time the exporter is going to send spans. +- **getExportRequestHeaders** - optional interceptor that allows adding new headers every time time the exporter is going to send spans. This is optional and can be used if headers are changing over time. This is a sync callback. ## Viewing your traces diff --git a/packages/opentelemetry-exporter-zipkin/src/platform/node/util.ts b/packages/opentelemetry-exporter-zipkin/src/platform/node/util.ts index 5032b0c978e..8835177ccda 100644 --- a/packages/opentelemetry-exporter-zipkin/src/platform/node/util.ts +++ b/packages/opentelemetry-exporter-zipkin/src/platform/node/util.ts @@ -71,7 +71,7 @@ export function prepareSend( // Consider 2xx and 3xx as success. if (statusCode < 400) { return done({ code: ExportResultCode.SUCCESS }); - // Consider 4xx as failed non-retriable. + // Consider 4xx as failed non-retryable. } else { return done({ code: ExportResultCode.FAILED, diff --git a/packages/opentelemetry-exporter-zipkin/src/zipkin.ts b/packages/opentelemetry-exporter-zipkin/src/zipkin.ts index ca52806d39c..4787dc38df3 100644 --- a/packages/opentelemetry-exporter-zipkin/src/zipkin.ts +++ b/packages/opentelemetry-exporter-zipkin/src/zipkin.ts @@ -118,7 +118,7 @@ export class ZipkinExporter implements SpanExporter { /** * if user defines getExportRequestHeaders in config then this will be called - * everytime before send, otherwise it will be replaced with noop in + * every time before send, otherwise it will be replaced with noop in * constructor * @default noop */ diff --git a/packages/opentelemetry-resources/src/detectors/EnvDetectorSync.ts b/packages/opentelemetry-resources/src/detectors/EnvDetectorSync.ts index 1230657e193..8572323a09d 100644 --- a/packages/opentelemetry-resources/src/detectors/EnvDetectorSync.ts +++ b/packages/opentelemetry-resources/src/detectors/EnvDetectorSync.ts @@ -83,10 +83,10 @@ class EnvDetectorSync implements DetectorSync { * OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes describing * the source in more detail, e.g. “key1=val1,key2=val2”. Domain names and * paths are accepted as attribute keys. Values may be quoted or unquoted in - * general. If a value contains whitespaces, =, or " characters, it must + * general. If a value contains whitespace, =, or " characters, it must * always be quoted. * - * @param rawEnvAttributes The resource attributes as a comma-seperated list + * @param rawEnvAttributes The resource attributes as a comma-separated list * of key/value pairs. * @returns The sanitized resource attributes. */ diff --git a/packages/opentelemetry-sdk-trace-base/src/Span.ts b/packages/opentelemetry-sdk-trace-base/src/Span.ts index 2a00be5d8a1..06b7056a179 100644 --- a/packages/opentelemetry-sdk-trace-base/src/Span.ts +++ b/packages/opentelemetry-sdk-trace-base/src/Span.ts @@ -357,7 +357,7 @@ export class Span implements APISpan, ReadableSpan { /** * If the given attribute value is of type string and has more characters than given {@code attributeValueLengthLimit} then - * return string with trucated to {@code attributeValueLengthLimit} characters + * return string with truncated to {@code attributeValueLengthLimit} characters * * If the given attribute value is array of strings then * return new array of strings with each element truncated to {@code attributeValueLengthLimit} characters diff --git a/packages/opentelemetry-sdk-trace-base/test/common/BasicTracerProvider.test.ts b/packages/opentelemetry-sdk-trace-base/test/common/BasicTracerProvider.test.ts index 7a0483ffa9a..edb32cc2b0d 100644 --- a/packages/opentelemetry-sdk-trace-base/test/common/BasicTracerProvider.test.ts +++ b/packages/opentelemetry-sdk-trace-base/test/common/BasicTracerProvider.test.ts @@ -247,7 +247,7 @@ describe('BasicTracerProvider', () => { delete envSource.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT; delete envSource.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT; }); - it('should have span attribute value length limit as deafult of Infinity', () => { + it('should have span attribute value length limit as default of Infinity', () => { envSource.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT = '125'; envSource.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT = 'Infinity'; const tracer = new BasicTracerProvider().getTracer('default'); diff --git a/packages/opentelemetry-sdk-trace-base/test/common/export/InMemorySpanExporter.test.ts b/packages/opentelemetry-sdk-trace-base/test/common/export/InMemorySpanExporter.test.ts index 585610514ee..5bf4ddb8ff8 100644 --- a/packages/opentelemetry-sdk-trace-base/test/common/export/InMemorySpanExporter.test.ts +++ b/packages/opentelemetry-sdk-trace-base/test/common/export/InMemorySpanExporter.test.ts @@ -94,18 +94,18 @@ describe('InMemorySpanExporter', () => { }); it('should return the success result', () => { - const exorter = new InMemorySpanExporter(); - exorter.export([], (result: ExportResult) => { + const exporter = new InMemorySpanExporter(); + exporter.export([], (result: ExportResult) => { assert.strictEqual(result.code, ExportResultCode.SUCCESS); }); }); it('should return the FailedNotRetryable result after shutdown', () => { - const exorter = new InMemorySpanExporter(); - exorter.shutdown(); + const exporter = new InMemorySpanExporter(); + exporter.shutdown(); // after shutdown export should fail - exorter.export([], (result: ExportResult) => { + exporter.export([], (result: ExportResult) => { assert.strictEqual(result.code, ExportResultCode.FAILED); }); }); diff --git a/packages/opentelemetry-sdk-trace-web/README.md b/packages/opentelemetry-sdk-trace-web/README.md index 8eccf7fc135..44ed1ffbe0a 100644 --- a/packages/opentelemetry-sdk-trace-web/README.md +++ b/packages/opentelemetry-sdk-trace-web/README.md @@ -17,7 +17,7 @@ See the example how to use it. OpenTelemetry comes with a growing number of instrumentations for well know modules (see [supported modules](https://github.com/open-telemetry/opentelemetry-js#plugins)) and an API to create custom instrumentations (see [the instrumentation developer guide](https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/instrumentation-guide.md)). Web Tracer currently supports one plugin for document load. -Unlike Node Tracer (`NodeTracerProvider`), the plugins needs to be initialised and passed in configuration. +Unlike Node Tracer (`NodeTracerProvider`), the plugins needs to be initialized and passed in configuration. The reason is to give user full control over which plugin will be bundled into web page. You can choose to use the `ZoneContextManager` if you want to trace asynchronous operations. Please note that the `ZoneContextManager` does not work with JS code targeting `ES2017+`. In order to use the `ZoneContextManager`, please transpile back to `ES2015`. diff --git a/packages/sdk-metrics/src/aggregator/ExponentialHistogram.ts b/packages/sdk-metrics/src/aggregator/ExponentialHistogram.ts index d13042c3305..a0c438ee173 100644 --- a/packages/sdk-metrics/src/aggregator/ExponentialHistogram.ts +++ b/packages/sdk-metrics/src/aggregator/ExponentialHistogram.ts @@ -160,7 +160,7 @@ export class ExponentialHistogramAccumulation implements Accumulation { } /** - * @returns {Number} The scale used by thie accumulation + * @returns {Number} The scale used by this accumulation */ get scale(): number { if (this._count === this._zeroCount) { @@ -171,7 +171,7 @@ export class ExponentialHistogramAccumulation implements Accumulation { } /** - * positive holds the postive values + * positive holds the positive values * @returns {Buckets} */ get positive(): Buckets { @@ -187,7 +187,7 @@ export class ExponentialHistogramAccumulation implements Accumulation { } /** - * uppdateByIncr supports updating a histogram with a non-negative + * updateByIncr supports updating a histogram with a non-negative * increment. * @param value * @param increment @@ -253,7 +253,7 @@ export class ExponentialHistogramAccumulation implements Accumulation { } /** - * diff substracts other from self + * diff subtracts other from self * @param {ExponentialHistogramAccumulation} other */ diff(other: ExponentialHistogramAccumulation) { @@ -512,7 +512,7 @@ export class ExponentialHistogramAccumulation implements Accumulation { } /** - * Aggregator for ExponentialHistogramAccumlations + * Aggregator for ExponentialHistogramAccumulations */ export class ExponentialHistogramAggregator implements Aggregator diff --git a/packages/sdk-metrics/src/exemplar/ExemplarReservoir.ts b/packages/sdk-metrics/src/exemplar/ExemplarReservoir.ts index 1fcad673393..ef1e8d14e6b 100644 --- a/packages/sdk-metrics/src/exemplar/ExemplarReservoir.ts +++ b/packages/sdk-metrics/src/exemplar/ExemplarReservoir.ts @@ -40,7 +40,7 @@ export interface ExemplarReservoir { * * @param pointAttributes The attributes associated with metric point. * - * @returns a list of {@link Exemplar}s. Retuned exemplars contain the attributes that were filtered out by the + * @returns a list of {@link Exemplar}s. Returned exemplars contain the attributes that were filtered out by the * aggregator, but recorded alongside the original measurement. */ collect(pointAttributes: MetricAttributes): Exemplar[]; diff --git a/scripts/semconv/templates/SemanticAttributes.ts.j2 b/scripts/semconv/templates/SemanticAttributes.ts.j2 index 0bbb4ebf7ce..6f50e287e31 100644 --- a/scripts/semconv/templates/SemanticAttributes.ts.j2 +++ b/scripts/semconv/templates/SemanticAttributes.ts.j2 @@ -38,7 +38,7 @@ import { createConstMap } from '../internal/utils'; //---------------------------------------------------------------------------------------------------------- // Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifable export names for some package types +// Required to avoid the namespace exports using the unminifiable export names for some package types {%- for attribute in attributes if attribute.is_local and not attribute.ref %} const TMP_{{attribute.fqn | to_const_name}} = {{ print_value ("string", attribute.fqn) }}; {%- endfor %} @@ -117,7 +117,7 @@ export const {{class}}:{{class}} = /*#__PURE__*/createConstMap<{{class}}>([ * ---------------------------------------------------------------------------------------------------------- */ // Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifable export names for some package types +// Required to avoid the namespace exports using the unminifiable export names for some package types {%- for member in attribute.attr_type.members if attribute.is_local and not attribute.ref %} const TMP_{{class_name|upper}}_{{ member.member_id | to_const_name }} = {{ print_value(type, member.value) }}; {%- endfor %}