Skip to content

Commit

Permalink
Merge branch 'main' into fix/install-semver-dep-globally-in-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
trentm committed Nov 23, 2023
2 parents 512d0fe + b3a539d commit 210c388
Show file tree
Hide file tree
Showing 76 changed files with 820 additions and 2,129 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16'

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}

Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18'

Expand All @@ -83,7 +83,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16

Expand All @@ -104,7 +104,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4.0.0
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16

Expand All @@ -131,7 +131,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/w3c-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16'

Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
lockfile-version=2
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/

### :house: (Internal)

* chore: type reference on zone.js [#4257](https://github.com/open-telemetry/opentelemetry-js/pull/4257) @legendecas
* chore: no need for 'packages' in lerna.json [#4264](https://github.com/open-telemetry/opentelemetry-js/pull/4264) @trentm

### :bug: (Bug Fix)

* fix(sdk-trace-web): only access location if it is defined [#4063](https://github.com/open-telemetry/opentelemetry-js/pull/4063)
* fix(sdk-trace-base): processor onStart called with a span having empty attributes

## 1.18.1

### :bug: (Bug Fix)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ We have a weekly SIG meeting! See the [community page](https://github.com/open-t
- [Neville Wylie](https://github.com/MSNev), Microsoft
- [Purvi Kanal](https://github.com/pkanal), Honeycomb
- [Svetlana Brennan](https://github.com/svetlanabrennan), New Relic
- [Trent Mick](https://github.com/trentm), Elastic

*Find more about the approver role in [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver).*

Expand Down
4 changes: 2 additions & 2 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@
"access": "public"
},
"devDependencies": {
"@types/mocha": "10.0.3",
"@types/mocha": "10.0.4",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"@types/webpack": "4.41.35",
"@types/webpack": "4.41.36",
"@types/webpack-env": "1.16.3",
"babel-plugin-istanbul": "6.1.1",
"codecov": "3.8.3",
Expand Down
4 changes: 4 additions & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ All notable changes to experimental packages in this project will be documented

### :bug: (Bug Fix)

* fix(sdk-logs): avoid map attribute set when count limit exceeded
* fix(instrumentation-fetch): only access navigator if it is defined [#4063](https://github.com/open-telemetry/opentelemetry-js/pull/4063)
* allows for experimental usage of this instrumentation with non-browser runtimes

### :books: (Refine Doc)

### :house: (Internal)
Expand Down
22 changes: 16 additions & 6 deletions experimental/examples/prometheus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,28 @@ This is a simple example that demonstrates basic metrics collection and exports
npm install
```

Setup [Prometheus](https://prometheus.io/docs/prometheus/latest/getting_started/)

## Run the Application

- Run the server

```sh
# from this directory
npm run start
```

If you are using the default configurations, the metrics should be available at <http://localhost:9464/metrics>

## Run Prometheus

### With docker

```sh
# from this directory
docker compose up
```

### With binary

Setup [Prometheus](https://prometheus.io/docs/prometheus/latest/getting_started/)

- Replace the `prometheus.yml` provided by the Prometheus installation with the following:

```yaml
Expand All @@ -34,7 +45,6 @@ scrape_configs:
# scheme defaults to 'http'.
static_configs:
- targets: ['localhost:9464']

```

- Start Prometheus
Expand All @@ -44,7 +54,7 @@ scrape_configs:
prometheus --config.file=prometheus.yml
```

### Prometheus UI
## Prometheus UI

If you are using the default configurations, the prometheus client will be available at <http://localhost:9090>

Expand Down
12 changes: 12 additions & 0 deletions experimental/examples/prometheus/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3.7'

services:
prometheus:
image: prom/prometheus:v2.47.2
extra_hosts:
- host.docker.internal:host-gateway
volumes:
- "./prometheus.docker.yml:/etc/prometheus/prometheus.yml"
ports:
- 9090:9090
restart: always
9 changes: 9 additions & 0 deletions experimental/examples/prometheus/prometheus.docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
global:
scrape_interval: 15s # Default is every 1 minute.

scrape_configs:
- job_name: 'opentelemetry'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['host.docker.internal:9464']
2 changes: 1 addition & 1 deletion experimental/packages/api-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@opentelemetry/api": "^1.0.0"
},
"devDependencies": {
"@types/mocha": "10.0.3",
"@types/mocha": "10.0.4",
"@types/node": "18.6.5",
"@types/webpack-env": "1.16.3",
"babel-plugin-istanbul": "6.1.1",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/api-logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@opentelemetry/api": "^1.0.0"
},
"devDependencies": {
"@types/mocha": "10.0.3",
"@types/mocha": "10.0.4",
"@types/node": "18.6.5",
"@types/webpack-env": "1.16.3",
"babel-plugin-istanbul": "6.1.1",
Expand Down
4 changes: 2 additions & 2 deletions experimental/packages/exporter-logs-otlp-grpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.20",
"@babel/core": "7.23.3",
"@grpc/proto-loader": "^0.7.10",
"@opentelemetry/api": "1.7.0",
"@opentelemetry/api-logs": "0.45.1",
"@opentelemetry/otlp-exporter-base": "0.45.1",
"@opentelemetry/resources": "1.18.1",
"@types/mocha": "10.0.3",
"@types/mocha": "10.0.4",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"codecov": "3.8.3",
Expand Down
4 changes: 2 additions & 2 deletions experimental/packages/exporter-logs-otlp-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
],
"sideEffects": false,
"devDependencies": {
"@babel/core": "7.22.20",
"@babel/core": "7.23.3",
"@opentelemetry/api": "1.7.0",
"@opentelemetry/resources": "1.18.1",
"@types/mocha": "10.0.3",
"@types/mocha": "10.0.4",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"@types/webpack-env": "1.16.3",
Expand Down
4 changes: 2 additions & 2 deletions experimental/packages/exporter-logs-otlp-proto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.20",
"@babel/core": "7.23.3",
"@opentelemetry/api": "1.7.0",
"@types/mocha": "10.0.3",
"@types/mocha": "10.0.4",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"babel-plugin-istanbul": "6.1.1",
Expand Down
4 changes: 2 additions & 2 deletions experimental/packages/exporter-trace-otlp-grpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.20",
"@babel/core": "7.23.3",
"@grpc/proto-loader": "^0.7.10",
"@opentelemetry/api": "1.7.0",
"@opentelemetry/otlp-exporter-base": "0.45.1",
"@types/mocha": "10.0.3",
"@types/mocha": "10.0.4",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"codecov": "3.8.3",
Expand Down
4 changes: 2 additions & 2 deletions experimental/packages/exporter-trace-otlp-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.20",
"@babel/core": "7.23.3",
"@opentelemetry/api": "1.7.0",
"@types/mocha": "10.0.3",
"@types/mocha": "10.0.4",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"@types/webpack-env": "1.16.3",
Expand Down
4 changes: 2 additions & 2 deletions experimental/packages/exporter-trace-otlp-proto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.20",
"@babel/core": "7.23.3",
"@opentelemetry/api": "1.7.0",
"@types/mocha": "10.0.3",
"@types/mocha": "10.0.4",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"babel-plugin-istanbul": "6.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.20",
"@babel/core": "7.23.3",
"@opentelemetry/api": "1.7.0",
"@types/mocha": "10.0.3",
"@types/mocha": "10.0.4",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"babel-plugin-istanbul": "6.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.20",
"@babel/core": "7.23.3",
"@grpc/proto-loader": "^0.7.10",
"@opentelemetry/api": "1.7.0",
"@types/mocha": "10.0.3",
"@types/mocha": "10.0.4",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"codecov": "3.8.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.20",
"@babel/core": "7.23.3",
"@opentelemetry/api": "1.7.0",
"@types/mocha": "10.0.3",
"@types/mocha": "10.0.4",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"@types/webpack-env": "1.16.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.20",
"@babel/core": "7.23.3",
"@opentelemetry/api": "1.7.0",
"@types/mocha": "10.0.3",
"@types/mocha": "10.0.4",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"codecov": "3.8.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"devDependencies": {
"@opentelemetry/api": "1.7.0",
"@opentelemetry/semantic-conventions": "1.18.1",
"@types/mocha": "10.0.3",
"@types/mocha": "10.0.4",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"codecov": "3.8.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.20",
"@babel/core": "7.23.3",
"@opentelemetry/api": "1.7.0",
"@opentelemetry/context-zone": "1.18.1",
"@opentelemetry/propagator-b3": "1.18.1",
"@opentelemetry/sdk-trace-base": "1.18.1",
"@types/mocha": "10.0.3",
"@types/mocha": "10.0.4",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"@types/webpack-env": "1.16.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,12 @@ export class FetchInstrumentation extends InstrumentationBase<
SemanticAttributes.HTTP_SCHEME,
parsedUrl.protocol.replace(':', '')
);
span.setAttribute(SemanticAttributes.HTTP_USER_AGENT, navigator.userAgent);
if (typeof navigator !== 'undefined') {
span.setAttribute(
SemanticAttributes.HTTP_USER_AGENT,
navigator.userAgent
);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
"@protobuf-ts/grpc-transport": "2.9.1",
"@protobuf-ts/runtime": "2.9.1",
"@protobuf-ts/runtime-rpc": "2.9.1",
"@types/mocha": "10.0.3",
"@types/mocha": "10.0.4",
"@types/node": "18.6.5",
"@types/semver": "7.5.4",
"@types/semver": "7.5.5",
"@types/sinon": "10.0.20",
"codecov": "3.8.3",
"cross-var": "1.1.0",
Expand Down

0 comments on commit 210c388

Please sign in to comment.