Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 464e843

Browse files
committed
Merge branch
2 parents 66e3938 + 84a9c33 commit 464e843

11 files changed

Lines changed: 32 additions & 19 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44

55
## Unreleased
66

7+
## 0.0.3 - 2019-06-08
8+
9+
- Support custom end time for span (#95), thanks @skjindal93
10+
- Upgraded types to match `@opencensus/core` package version `0.0.13`.
11+
- Package upgrades
712
- Add support for object(`SpanOptions`) as an argument for `startChildSpan` function, similar to `startRootSpan`.
813
- Please note that there is an API breaking change in methods `addMessageEvent()`. The field `id` is now number instead of string.
914

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"packages": [
44
"packages/*"
55
],
6-
"version": "0.0.2"
6+
"version": "0.0.3"
77
}

packages/opencensus-web-all/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencensus/web-all",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"description": "OpenCensus Web All combines all the main OpenCensus Web packages to provide distributions for easy use in web applications via <script> tags.",
55
"main": "build/src/index.js",
66
"types": "build/src/index.d.ts",
@@ -70,10 +70,10 @@
7070
"webpack-dev-server": "^3.2.1"
7171
},
7272
"dependencies": {
73-
"@opencensus/web-core": "^0.0.2",
74-
"@opencensus/web-exporter-ocagent": "^0.0.2",
75-
"@opencensus/web-instrumentation-perf": "^0.0.2",
76-
"@opencensus/web-propagation-tracecontext": "^0.0.2"
73+
"@opencensus/web-core": "^0.0.3",
74+
"@opencensus/web-exporter-ocagent": "^0.0.3",
75+
"@opencensus/web-instrumentation-perf": "^0.0.3",
76+
"@opencensus/web-propagation-tracecontext": "^0.0.3"
7777
},
7878
"sideEffects": [
7979
"./src/entrypoints/*.ts"

packages/opencensus-web-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencensus/web-core",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"description": "OpenCensus Web is a toolkit for collecting application performance and behavior data from client side web browser apps.",
55
"main": "build/src/index.js",
66
"types": "build/src/index.d.ts",
@@ -62,7 +62,7 @@
6262
"webpack-cli": "^3.1.0"
6363
},
6464
"dependencies": {
65-
"@opencensus/web-types": "^0.0.2"
65+
"@opencensus/web-types": "^0.0.3"
6666
},
6767
"sideEffects": false
6868
}

packages/opencensus-web-core/src/trace/model/span.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ export class Span implements webTypes.Span {
261261

262262
/** Ends the span by setting `endTime` to now. */
263263
end() {
264-
this.endPerfTime = performance.now();
264+
if (this.endPerfTime === 0) {
265+
this.endPerfTime = performance.now();
266+
}
265267
}
266268

267269
/** Forces the span to end. Same as `end` for opencensus-web. */

packages/opencensus-web-core/test/test-span.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ describe('Span', () => {
9595
expect(span.endPerfTime).toBe(33);
9696
});
9797

98+
it('does not set endPerfTime when end is called, if endPerfTime is already set', () => {
99+
span.endPerfTime = 22;
100+
span.end();
101+
expect(span.endPerfTime).toBe(22);
102+
});
103+
98104
it('sets endPerfTime when truncate is called', () => {
99105
spyOn(performance, 'now').and.returnValue(77);
100106
span.truncate();

packages/opencensus-web-exporter-ocagent/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencensus/web-exporter-ocagent",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"description": "OpenCensus Agent Exporter web allows user to send collected traces to the OpenCensus Agent via HTTP/JSON in a browser.",
55
"main": "build/src/index.js",
66
"types": "build/src/index.d.ts",
@@ -62,7 +62,7 @@
6262
"webpack-cli": "^3.1.0"
6363
},
6464
"dependencies": {
65-
"@opencensus/web-core": "^0.0.2"
65+
"@opencensus/web-core": "^0.0.3"
6666
},
6767
"sideEffects": false
6868
}

packages/opencensus-web-instrumentation-perf/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencensus/web-instrumentation-perf",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"description": "OpenCensus Web instrumentation to generate spans for browser performance API data.",
55
"main": "build/src/index.js",
66
"types": "build/src/index.d.ts",
@@ -63,7 +63,7 @@
6363
"webpack-cli": "^3.1.0"
6464
},
6565
"dependencies": {
66-
"@opencensus/web-core": "^0.0.2"
66+
"@opencensus/web-core": "^0.0.3"
6767
},
6868
"sideEffects": false
6969
}

packages/opencensus-web-instrumentation-zone/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencensus/web-instrumentation-zone",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"description": "OpenCensus Web instrumentation zone is used to generate user interaction spans for interactions after the initial page loads.",
55
"main": "build/src/index.js",
66
"types": "build/src/index.d.ts",
@@ -65,8 +65,8 @@
6565
"zone.js": "~0.9.1"
6666
},
6767
"dependencies": {
68-
"@opencensus/web-core": "^0.0.2",
69-
"@opencensus/web-exporter-ocagent": "^0.0.2"
68+
"@opencensus/web-core": "^0.0.3",
69+
"@opencensus/web-exporter-ocagent": "^0.0.3"
7070
},
7171
"peerDependencies": {
7272
"zone.js": "~0.9.1"

packages/opencensus-web-propagation-tracecontext/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencensus/web-propagation-tracecontext",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"description": "OpenCensus Trace Context format propagation for the web browser",
55
"main": "build/src/index.js",
66
"types": "build/src/index.d.ts",
@@ -61,7 +61,7 @@
6161
"webpack-cli": "^3.1.0"
6262
},
6363
"dependencies": {
64-
"@opencensus/web-core": "^0.0.2"
64+
"@opencensus/web-core": "^0.0.3"
6565
},
6666
"sideEffects": false
6767
}

0 commit comments

Comments
 (0)