Skip to content

Commit

Permalink
Merge branch 'main' into warn_on_late_require_hook
Browse files Browse the repository at this point in the history
  • Loading branch information
nozik committed Apr 25, 2022
2 parents dc87a89 + 4584c36 commit 93e9302
Show file tree
Hide file tree
Showing 159 changed files with 3,111 additions and 594 deletions.
14 changes: 4 additions & 10 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
[submodule "experimental/packages/exporter-trace-otlp-proto/protos"]
path = experimental/packages/exporter-trace-otlp-proto/protos
[submodule "experimental/packages/otlp-grpc-exporter-base/protos"]
path = experimental/packages/otlp-grpc-exporter-base/protos
url = https://github.com/open-telemetry/opentelemetry-proto.git
[submodule "experimental/packages/exporter-trace-otlp-grpc/protos"]
path = experimental/packages/exporter-trace-otlp-grpc/protos
url = https://github.com/open-telemetry/opentelemetry-proto.git
[submodule "experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/protos"]
path = experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/protos
url = https://github.com/open-telemetry/opentelemetry-proto.git
[submodule "experimental/packages/opentelemetry-exporter-metrics-otlp-proto/protos"]
path = experimental/packages/opentelemetry-exporter-metrics-otlp-proto/protos
[submodule "experimental/packages/otlp-proto-exporter-base/protos"]
path = experimental/packages/otlp-proto-exporter-base/protos
url = https://github.com/open-telemetry/opentelemetry-proto.git
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,21 @@ All notable changes to this project will be documented in this file.

### :bug: (Bug Fix)

### :books: (Refine Doc)

### :house: (Internal)

## 1.2.0

### :boom: Breaking Change

### :rocket: (Enhancement)

### :bug: (Bug Fix)

* fix: sanitize attributes inputs [#2881](https://github.com/open-telemetry/opentelemetry-js/pull/2881) @legendecas
* fix: support earlier API versions [#2892](https://github.com/open-telemetry/opentelemetry-js/pull/2892) @dyladan
* fix: support extract one digit '0' in jaeger traceFlag [#2905](https://github.com/open-telemetry/opentelemetry-js/issues/2905) @shmilyoo

### :books: (Refine Doc)

Expand All @@ -24,6 +37,8 @@ All notable changes to this project will be documented in this file.
* chore: require changelog entry to merge PR [#2847](https://github.com/open-telemetry/opentelemetry-js/pull/2847) @dyladan
* chore: remove peer API check [#2892](https://github.com/open-telemetry/opentelemetry-js/pull/2892) @dyladan
* chore: merge lerna subdirectories into a single monorepo [#2892](https://github.com/open-telemetry/opentelemetry-js/pull/2892) @dyladan
* `opentelemetry-propagator-jaeger`
* [#2906](https://github.com/open-telemetry/opentelemetry-js/pull/2906) fix: support extract one digit '0' in jaeger traceFlag ([@shmilyoo](https://github.com/shmilyoo))

## 1.1.1

Expand Down
16 changes: 16 additions & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ All notable changes to experimental packages in this project will be documented

### :boom: Breaking Change

### :rocket: (Enhancement)

### :bug: (Bug Fix)

### :books: (Refine Doc)

### :house: (Internal)

## 0.28.0

### :boom: Breaking Change

* feat(sdk-metrics-base): update metric exporter interfaces #2707 @srikanthccv
* feat(api-metrics): remove observable types #2687 @legendecas
* fix(otlp-http-exporter): remove content length header #2879 @svetlanabrennan
Expand All @@ -16,6 +28,10 @@ All notable changes to experimental packages in this project will be documented
* updated `opentelemetry-sdk-node` to the latest Metrics SDK.
* updated `otlp-transformer` to the latest Metrics SDK.
* updated all `instrumentation-*` packages to use local implementations of `parseUrl()` due to #2884
* refactor(otlp-exporters) move base classes and associated types into their own packages #2893 @pichlermarc
* `otlp-exporter-base` => `OTLPExporterBase`, `OTLPExporterBrowserBase`, `OTLPExporterNodeBase`
* `otlp-grpc-exporter-base` => `OTLPGRPCExporterNodeBase`
* `otlp-proto-exporter-base` => `OTLPProtoExporterNodeBase`

### :rocket: (Enhancement)

Expand Down
6 changes: 3 additions & 3 deletions experimental/backwards-compatability/node10/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backcompat-node10",
"version": "0.27.0",
"version": "0.28.0",
"private": true,
"description": "Backwards compatability app for node8 types and the OpenTelemetry Node.js SDK",
"main": "index.js",
Expand All @@ -9,8 +9,8 @@
"peer-api-check": "node ../../../scripts/peer-api-check.js"
},
"dependencies": {
"@opentelemetry/sdk-node": "0.27.0",
"@opentelemetry/sdk-trace-base": "1.1.1"
"@opentelemetry/sdk-node": "0.28.0",
"@opentelemetry/sdk-trace-base": "1.2.0"
},
"devDependencies": {
"@types/node": "10.17.60",
Expand Down
6 changes: 3 additions & 3 deletions experimental/backwards-compatability/node12/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backcompat-node12",
"version": "0.27.0",
"version": "0.28.0",
"private": true,
"description": "Backwards compatability app for node8 types and the OpenTelemetry Node.js SDK",
"main": "index.js",
Expand All @@ -9,8 +9,8 @@
"peer-api-check": "node ../../../scripts/peer-api-check.js"
},
"dependencies": {
"@opentelemetry/sdk-node": "0.27.0",
"@opentelemetry/sdk-trace-base": "1.1.1"
"@opentelemetry/sdk-node": "0.28.0",
"@opentelemetry/sdk-trace-base": "1.2.0"
},
"devDependencies": {
"@types/node": "12.20.37",
Expand Down
6 changes: 3 additions & 3 deletions experimental/backwards-compatability/node8/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backcompat-node8",
"version": "0.27.0",
"version": "0.28.0",
"private": true,
"description": "Backwards compatability app for node8 types and the OpenTelemetry Node.js SDK",
"main": "index.js",
Expand All @@ -9,8 +9,8 @@
"peer-api-check": "node ../../../scripts/peer-api-check.js"
},
"dependencies": {
"@opentelemetry/sdk-node": "0.27.0",
"@opentelemetry/sdk-trace-base": "1.1.1"
"@opentelemetry/sdk-node": "0.28.0",
"@opentelemetry/sdk-trace-base": "1.2.0"
},
"devDependencies": {
"@types/node": "8.10.66",
Expand Down
20 changes: 10 additions & 10 deletions experimental/packages/exporter-trace-otlp-grpc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentelemetry/exporter-trace-otlp-grpc",
"version": "0.27.0",
"version": "0.28.0",
"description": "OpenTelemetry Collector Exporter allows user to send collected traces to the OpenTelemetry Collector",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand All @@ -11,16 +11,14 @@
"clean": "tsc --build --clean",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"postcompile": "npm run submodule && npm run protos:copy",
"protos:copy": "cpx protos/opentelemetry/**/*.* build/protos/opentelemetry",
"submodule": "git submodule sync --recursive && git submodule update --init --recursive",
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"version": "node ../../../scripts/version-update.js",
"watch": "npm run protos:copy && tsc -w",
"watch": "tsc -w",
"precompile": "lerna run version --scope $(npm pkg get name) --include-dependencies",
"prewatch": "npm run precompile",
"peer-api-check": "node ../../../scripts/peer-api-check.js"
"peer-api-check": "node ../../../scripts/peer-api-check.js",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../"
},
"keywords": [
"opentelemetry",
Expand Down Expand Up @@ -51,6 +49,7 @@
"devDependencies": {
"@babel/core": "7.16.0",
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/otlp-exporter-base": "0.28.0",
"@types/mocha": "8.2.3",
"@types/node": "14.17.33",
"@types/sinon": "10.0.6",
Expand All @@ -68,11 +67,12 @@
"@opentelemetry/api": "^1.0.0"
},
"dependencies": {
"@opentelemetry/core": "1.1.1",
"@opentelemetry/core": "1.2.0",
"@grpc/grpc-js": "^1.5.9",
"@grpc/proto-loader": "^0.6.9",
"@opentelemetry/exporter-trace-otlp-http": "0.27.0",
"@opentelemetry/resources": "1.1.1",
"@opentelemetry/sdk-trace-base": "1.1.1"
"@opentelemetry/exporter-trace-otlp-http": "0.28.0",
"@opentelemetry/otlp-grpc-exporter-base": "0.28.0",
"@opentelemetry/resources": "1.2.0",
"@opentelemetry/sdk-trace-base": "1.2.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,30 @@
*/

import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';
import { OTLPExporterNodeBase } from './OTLPExporterNodeBase';
import {
otlpTypes,
toOTLPExportTraceServiceRequest,
} from '@opentelemetry/exporter-trace-otlp-http';
import { OTLPExporterConfigNode, ServiceClientType } from './types';
import { baggageUtils, getEnv } from '@opentelemetry/core';
import { validateAndNormalizeUrl } from './util';
import { Metadata } from '@grpc/grpc-js';
import {
OTLPGRPCExporterConfigNode,
OTLPGRPCExporterNodeBase,
ServiceClientType,
validateAndNormalizeUrl
} from '@opentelemetry/otlp-grpc-exporter-base';

const DEFAULT_COLLECTOR_URL = 'localhost:4317';

/**
* OTLP Trace Exporter for Node
*/
export class OTLPTraceExporter
extends OTLPExporterNodeBase<
ReadableSpan,
otlpTypes.opentelemetryProto.collector.trace.v1.ExportTraceServiceRequest
>
extends OTLPGRPCExporterNodeBase<ReadableSpan,
otlpTypes.opentelemetryProto.collector.trace.v1.ExportTraceServiceRequest>
implements SpanExporter {

constructor(config: OTLPExporterConfigNode = {}) {
constructor(config: OTLPGRPCExporterConfigNode = {}) {
super(config);
const headers = baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS);
this.metadata ||= new Metadata();
Expand All @@ -52,14 +53,14 @@ export class OTLPTraceExporter
return toOTLPExportTraceServiceRequest(spans, this);
}

getDefaultUrl(config: OTLPExporterConfigNode) {
getDefaultUrl(config: OTLPGRPCExporterConfigNode) {
return typeof config.url === 'string'
? validateAndNormalizeUrl(config.url)
: getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0
? validateAndNormalizeUrl(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)
: getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
? validateAndNormalizeUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT)
: DEFAULT_COLLECTOR_URL;
? validateAndNormalizeUrl(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)
: getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
? validateAndNormalizeUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT)
: DEFAULT_COLLECTOR_URL;
}

getServiceClientType() {
Expand Down
3 changes: 0 additions & 3 deletions experimental/packages/exporter-trace-otlp-grpc/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,4 @@
* limitations under the License.
*/

export * from './OTLPExporterNodeBase';
export * from './OTLPTraceExporter';
export { ServiceClientType, OTLPExporterConfigNode } from './types';
export { validateAndNormalizeUrl } from './util';
46 changes: 0 additions & 46 deletions experimental/packages/exporter-trace-otlp-grpc/submodule.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ import {
ensureResourceIsCorrect,
mockedReadableSpan,
} from './traceHelper';

import { CompressionAlgorithm } from '../src/types';
import { CompressionAlgorithm } from '@opentelemetry/otlp-exporter-base';
import { GrpcCompressionAlgorithm } from '@opentelemetry/otlp-grpc-exporter-base';

const traceServiceProtoPath =
'opentelemetry/proto/collector/trace/v1/trace_service.proto';
const includeDirs = [path.resolve(__dirname, '../protos')];
const includeDirs = [path.resolve(__dirname, '../../otlp-grpc-exporter-base/protos')];

const address = 'localhost:1501';

Expand Down Expand Up @@ -267,7 +267,7 @@ const testCollectorExporter = (params: TestParams) =>
credentials,
metadata: params.metadata,
});
assert.strictEqual(collectorExporter.compression, CompressionAlgorithm.GZIP);
assert.strictEqual(collectorExporter.compression, GrpcCompressionAlgorithm.GZIP);
delete envSource.OTEL_EXPORTER_OTLP_COMPRESSION;
});
});
Expand Down Expand Up @@ -337,3 +337,5 @@ describe('when configuring via environment', () => {
testCollectorExporter({ useTLS: true });
testCollectorExporter({ useTLS: false });
testCollectorExporter({ metadata });


6 changes: 6 additions & 0 deletions experimental/packages/exporter-trace-otlp-grpc/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
},
{
"path": "../exporter-trace-otlp-http"
},
{
"path": "../otlp-exporter-base"
},
{
"path": "../otlp-grpc-exporter-base"
}
]
}
14 changes: 8 additions & 6 deletions experimental/packages/exporter-trace-otlp-http/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentelemetry/exporter-trace-otlp-http",
"version": "0.27.0",
"version": "0.28.0",
"description": "OpenTelemetry Collector Trace Exporter allows user to send collected traces to the OpenTelemetry Collector",
"main": "build/src/index.js",
"module": "build/esm/index.js",
Expand All @@ -17,7 +17,7 @@
"prepublishOnly": "npm run compile",
"compile": "tsc --build tsconfig.all.json",
"clean": "tsc --build --clean tsconfig.all.json",
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../",
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"tdd": "npm run test -- --watch-extensions ts --watch",
Expand All @@ -28,7 +28,8 @@
"watch": "tsc --build --watch tsconfig.all.json",
"precompile": "lerna run version --scope $(npm pkg get name) --include-dependencies",
"prewatch": "npm run precompile",
"peer-api-check": "node ../../../scripts/peer-api-check.js"
"peer-api-check": "node ../../../scripts/peer-api-check.js",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../"
},
"keywords": [
"opentelemetry",
Expand Down Expand Up @@ -93,8 +94,9 @@
"@opentelemetry/api": "^1.0.0"
},
"dependencies": {
"@opentelemetry/core": "1.1.1",
"@opentelemetry/resources": "1.1.1",
"@opentelemetry/sdk-trace-base": "1.1.1"
"@opentelemetry/core": "1.2.0",
"@opentelemetry/resources": "1.2.0",
"@opentelemetry/sdk-trace-base": "1.2.0",
"@opentelemetry/otlp-exporter-base": "0.28.0"
}
}
2 changes: 0 additions & 2 deletions experimental/packages/exporter-trace-otlp-http/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

export * from './OTLPExporterBase';
export * from './platform';
export * as otlpTypes from './types';
export { toCollectorResource, toOTLPExportTraceServiceRequest } from './transform';
export { appendResourcePathToUrlIfNotPresent } from './util';
Loading

0 comments on commit 93e9302

Please sign in to comment.