Skip to content

Commit

Permalink
Merge branch 'main' into metrics/binary-histogram
Browse files Browse the repository at this point in the history
  • Loading branch information
legendecas authored Jan 30, 2023
2 parents eba8204 + 279458e commit 8f594cc
Show file tree
Hide file tree
Showing 106 changed files with 2,038 additions and 331 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,26 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/

### :house: (Internal)

## 1.9.1

### :bug: (Bug Fix)

* fix: avoid grpc types dependency [#3551](https://github.com/open-telemetry/opentelemetry-js/pull/3551) @flarna
* fix(otlp-proto-exporter-base): Match Accept header with Content-Type in the proto exporter
[#3562](https://github.com/open-telemetry/opentelemetry-js/pull/3562) @scheler
* fix: include tracestate in export [#3569](https://github.com/open-telemetry/opentelemetry-js/pull/3569) @flarna

### :house: (Internal)

* chore: fix cross project links and missing implicitly exported types [#3533](https://github.com/open-telemetry/opentelemetry-js/pull/3533) @legendecas
* feat(sdk-metrics): add exponential histogram mapping functions [#3504](https://github.com/open-telemetry/opentelemetry-js/pull/3504) @mwear

## 1.9.0

### :rocket: (Enhancement)

* feat(instrumentation-grpc): set net.peer.name and net.peer.port on client spans [#3430](https://github.com/open-telemetry/opentelemetry-js/pull/3430)
* feat(exporter-trace-otlp-proto): Add protobuf otlp trace exporter support for browser [#3208](https://github.com/open-telemetry/opentelemetry-js/pull/3208) @pkanal

### :bug: (Bug Fix)

Expand Down
18 changes: 9 additions & 9 deletions examples/https/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "https-example",
"private": true,
"version": "0.35.0",
"version": "0.35.1",
"description": "Example of HTTPs integration with OpenTelemetry",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -33,14 +33,14 @@
},
"dependencies": {
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/exporter-jaeger": "1.9.0",
"@opentelemetry/exporter-zipkin": "1.9.0",
"@opentelemetry/instrumentation": "0.35.0",
"@opentelemetry/instrumentation-http": "0.35.0",
"@opentelemetry/resources": "1.9.0",
"@opentelemetry/sdk-trace-base": "1.9.0",
"@opentelemetry/sdk-trace-node": "1.9.0",
"@opentelemetry/semantic-conventions": "1.9.0"
"@opentelemetry/exporter-jaeger": "1.9.1",
"@opentelemetry/exporter-zipkin": "1.9.1",
"@opentelemetry/instrumentation": "0.35.1",
"@opentelemetry/instrumentation-http": "0.35.1",
"@opentelemetry/resources": "1.9.1",
"@opentelemetry/sdk-trace-base": "1.9.1",
"@opentelemetry/sdk-trace-node": "1.9.1",
"@opentelemetry/semantic-conventions": "1.9.1"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/https",
"devDependencies": {
Expand Down
20 changes: 20 additions & 0 deletions examples/opentelemetry-web/examples/fetch-proto/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<title>Fetch Plugin Example</title>
<base href="/">

<meta name="viewport" content="width=device-width, initial-scale=1">
</head>

<body>
Example of using Web Tracer with Fetch plugin with console exporter and proto exporter
<script type="text/javascript" src="fetch-proto.js"></script>
<br/>
<button id="button1">Test</button>

</body>

</html>
80 changes: 80 additions & 0 deletions examples/opentelemetry-web/examples/fetch-proto/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
const { context, trace } = require("@opentelemetry/api");
const { ConsoleSpanExporter, SimpleSpanProcessor} = require("@opentelemetry/sdk-trace-base");
const { WebTracerProvider } = require("@opentelemetry/sdk-trace-web");
const { FetchInstrumentation } = require("@opentelemetry/instrumentation-fetch");
const { ZoneContextManager } = require("@opentelemetry/context-zone");
const { B3Propagator } = require("@opentelemetry/propagator-b3");
const { registerInstrumentations } = require("@opentelemetry/instrumentation");
const { OTLPTraceExporter: OTLPTraceExporterProto } = require("@opentelemetry/exporter-trace-otlp-proto");

const provider = new WebTracerProvider();

// Note: For production consider using the "BatchSpanProcessor" to reduce the number of requests
// to your exporter. Using the SimpleSpanProcessor here as it sends the spans immediately to the
// exporter without delay
provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
provider.addSpanProcessor(
new SimpleSpanProcessor(new OTLPTraceExporterProto())
);

provider.register({
contextManager: new ZoneContextManager(),
propagator: new B3Propagator(),
});

registerInstrumentations({
instrumentations: [
new FetchInstrumentation({
ignoreUrls: [/localhost:8090\/sockjs-node/],
propagateTraceHeaderCorsUrls: [
"https://cors-test.appspot.com/test",
"https://httpbin.org/get",
],
clearTimingResources: true,
}),
],
});

const webTracerWithZone = provider.getTracer("example-tracer-web");

const getData = (url) =>
fetch(url, {
method: "GET",
headers: {
Accept: "application/json",
"Content-Type": "application/json",
},
});

// example of keeping track of context between async operations
const prepareClickEvent = () => {
const url = "https://httpbin.org/get";

const element = document.getElementById("button1");

const onClick = () => {
const singleSpan = webTracerWithZone.startSpan("files-series-info");
context.with(trace.setSpan(context.active(), singleSpan), () => {
getData(url).then((_data) => {
trace
.getSpan(context.active())
.addEvent("fetching-single-span-completed");
singleSpan.end();
});
});
for (let i = 0, j = 5; i < j; i += 1) {
const span = webTracerWithZone.startSpan(`files-series-info-${i}`);
context.with(trace.setSpan(context.active(), span), () => {
getData(url).then((_data) => {
trace
.getSpan(context.active())
.addEvent(`fetching-span-${i}-completed`);
span.end();
});
});
}
};
element.addEventListener("click", onClick);
};

window.addEventListener("load", prepareClickEvent);
29 changes: 15 additions & 14 deletions examples/opentelemetry-web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "web-opentelemetry-example",
"private": true,
"version": "0.35.0",
"version": "0.35.1",
"description": "Example of using @opentelemetry/sdk-trace-web and @opentelemetry/sdk-metrics in browser",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -43,19 +43,20 @@
},
"dependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/context-zone": "1.9.0",
"@opentelemetry/core": "1.9.0",
"@opentelemetry/exporter-metrics-otlp-http": "0.35.0",
"@opentelemetry/exporter-trace-otlp-http": "0.35.0",
"@opentelemetry/exporter-zipkin": "1.9.0",
"@opentelemetry/instrumentation": "0.35.0",
"@opentelemetry/instrumentation-fetch": "0.35.0",
"@opentelemetry/instrumentation-xml-http-request": "0.35.0",
"@opentelemetry/propagator-b3": "1.9.0",
"@opentelemetry/sdk-metrics": "1.9.0",
"@opentelemetry/sdk-trace-base": "1.9.0",
"@opentelemetry/sdk-trace-web": "1.9.0",
"@opentelemetry/semantic-conventions": "1.9.0"
"@opentelemetry/context-zone": "1.9.1",
"@opentelemetry/core": "1.9.1",
"@opentelemetry/exporter-metrics-otlp-http": "0.35.1",
"@opentelemetry/exporter-trace-otlp-http": "0.35.1",
"@opentelemetry/exporter-trace-otlp-proto": "0.35.1",
"@opentelemetry/exporter-zipkin": "1.9.1",
"@opentelemetry/instrumentation": "0.35.1",
"@opentelemetry/instrumentation-fetch": "0.35.1",
"@opentelemetry/instrumentation-xml-http-request": "0.35.1",
"@opentelemetry/propagator-b3": "1.9.1",
"@opentelemetry/sdk-metrics": "1.9.1",
"@opentelemetry/sdk-trace-base": "1.9.1",
"@opentelemetry/sdk-trace-web": "1.9.1",
"@opentelemetry/semantic-conventions": "1.9.1"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/tracer-web"
}
3 changes: 2 additions & 1 deletion examples/opentelemetry-web/webpack.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const common = {
'xml-http-request': 'examples/xml-http-request/index.js',
fetchXhr: 'examples/fetchXhr/index.js',
fetchXhrB3: 'examples/fetchXhrB3/index.js',
'fetch-proto': 'examples/fetch-proto/index.js',
zipkin: 'examples/zipkin/index.js',
},
output: {
Expand Down Expand Up @@ -41,7 +42,7 @@ const common = {
resolve: {
modules: [
path.resolve(directory),
'node_modules',
'node_modules'
],
extensions: ['.ts', '.js', '.jsx', '.json'],
},
Expand Down
1 change: 1 addition & 0 deletions examples/opentelemetry-web/webpack.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const common = {
'xml-http-request': 'examples/xml-http-request/index.js',
fetchXhr: 'examples/fetchXhr/index.js',
fetchXhrB3: 'examples/fetchXhrB3/index.js',
"fetch-proto": "examples/fetch-proto/index.js",
zipkin: 'examples/zipkin/index.js',
},
output: {
Expand Down
24 changes: 12 additions & 12 deletions examples/otlp-exporter-node/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "example-otlp-exporter-node",
"private": true,
"version": "0.35.0",
"version": "0.35.1",
"description": "Example of using @opentelemetry/collector-exporter in Node.js",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -29,17 +29,17 @@
},
"dependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/core": "1.9.0",
"@opentelemetry/exporter-metrics-otlp-grpc": "0.35.0",
"@opentelemetry/exporter-metrics-otlp-http": "0.35.0",
"@opentelemetry/exporter-metrics-otlp-proto": "0.35.0",
"@opentelemetry/exporter-trace-otlp-grpc": "0.35.0",
"@opentelemetry/exporter-trace-otlp-http": "0.35.0",
"@opentelemetry/exporter-trace-otlp-proto": "0.35.0",
"@opentelemetry/resources": "1.9.0",
"@opentelemetry/sdk-metrics": "1.9.0",
"@opentelemetry/sdk-trace-base": "1.9.0",
"@opentelemetry/semantic-conventions": "1.9.0"
"@opentelemetry/core": "1.9.1",
"@opentelemetry/exporter-metrics-otlp-grpc": "0.35.1",
"@opentelemetry/exporter-metrics-otlp-http": "0.35.1",
"@opentelemetry/exporter-metrics-otlp-proto": "0.35.1",
"@opentelemetry/exporter-trace-otlp-grpc": "0.35.1",
"@opentelemetry/exporter-trace-otlp-http": "0.35.1",
"@opentelemetry/exporter-trace-otlp-proto": "0.35.1",
"@opentelemetry/resources": "1.9.1",
"@opentelemetry/sdk-metrics": "1.9.1",
"@opentelemetry/sdk-trace-base": "1.9.1",
"@opentelemetry/semantic-conventions": "1.9.1"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/otlp-exporter-node"
}
10 changes: 10 additions & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ All notable changes to experimental packages in this project will be documented

### :house: (Internal)

## 0.35.1

### :bug: (Bug Fix)

* fix: remove JSON syntax error and regenerate tsconfig files [#3566](https://github.com/open-telemetry/opentelemetry-js/pull/3566) @Flarna
* Fixes an error where the generated JS files were not included in the esnext package due to a failure of the tsconfig generation
* fix(sdk-node): register instrumentations early [#3502](https://github.com/open-telemetry/opentelemetry-js/pull/3502) @flarna
* fix: include tracestate in export [#3569](https://github.com/open-telemetry/opentelemetry-js/pull/3569) @flarna
* fix(http) Remove outgoing headers normalization [#3557](https://github.com/open-telemetry/opentelemetry-js/pull/3557) @marcinjahn

## 0.35.0

### :rocket: (Enhancement)
Expand Down
6 changes: 3 additions & 3 deletions experimental/backwards-compatability/node14/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backcompat-node14",
"version": "0.35.0",
"version": "0.35.1",
"private": true,
"description": "Backwards compatability app for node 14 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.35.0",
"@opentelemetry/sdk-trace-base": "1.9.0"
"@opentelemetry/sdk-node": "0.35.1",
"@opentelemetry/sdk-trace-base": "1.9.1"
},
"devDependencies": {
"@types/node": "14.18.25",
Expand Down
6 changes: 3 additions & 3 deletions experimental/backwards-compatability/node16/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backcompat-node16",
"version": "0.35.0",
"version": "0.35.1",
"private": true,
"description": "Backwards compatability app for node 16 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.35.0",
"@opentelemetry/sdk-trace-base": "1.9.0"
"@opentelemetry/sdk-node": "0.35.1",
"@opentelemetry/sdk-trace-base": "1.9.1"
},
"devDependencies": {
"@types/node": "16.11.52",
Expand Down
6 changes: 3 additions & 3 deletions experimental/examples/prometheus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prometheus-example",
"version": "0.35.0",
"version": "0.35.1",
"private": true,
"description": "Example of using @opentelemetry/sdk-metrics and @opentelemetry/exporter-prometheus",
"main": "index.js",
Expand All @@ -11,7 +11,7 @@
"license": "Apache-2.0",
"dependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/exporter-prometheus": "0.35.0",
"@opentelemetry/sdk-metrics": "1.9.0"
"@opentelemetry/exporter-prometheus": "0.35.1",
"@opentelemetry/sdk-metrics": "1.9.1"
}
}
2 changes: 1 addition & 1 deletion experimental/packages/api-logs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentelemetry/api-logs",
"version": "0.35.0",
"version": "0.35.1",
"description": "Public logs API for OpenTelemetry",
"main": "build/src/index.js",
"module": "build/esm/index.js",
Expand Down
16 changes: 8 additions & 8 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.35.0",
"version": "0.35.1",
"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 Down Expand Up @@ -50,15 +50,15 @@
"@babel/core": "7.16.0",
"@grpc/proto-loader": "^0.7.3",
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/otlp-exporter-base": "0.35.0",
"@opentelemetry/otlp-exporter-base": "0.35.1",
"@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"codecov": "3.8.3",
"cpx": "1.5.0",
"mocha": "10.0.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
"rimraf": "4.1.2",
"sinon": "15.0.0",
"ts-loader": "8.4.0",
"ts-mocha": "10.0.0",
Expand All @@ -69,11 +69,11 @@
},
"dependencies": {
"@grpc/grpc-js": "^1.7.1",
"@opentelemetry/core": "1.9.0",
"@opentelemetry/otlp-grpc-exporter-base": "0.35.0",
"@opentelemetry/otlp-transformer": "0.35.0",
"@opentelemetry/resources": "1.9.0",
"@opentelemetry/sdk-trace-base": "1.9.0"
"@opentelemetry/core": "1.9.1",
"@opentelemetry/otlp-grpc-exporter-base": "0.35.1",
"@opentelemetry/otlp-transformer": "0.35.1",
"@opentelemetry/resources": "1.9.1",
"@opentelemetry/sdk-trace-base": "1.9.1"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-grpc",
"sideEffects": false
Expand Down
Loading

0 comments on commit 8f594cc

Please sign in to comment.