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

Commit

Permalink
Merge branch
Browse files Browse the repository at this point in the history
  • Loading branch information
crdgonzalezca committed Jun 12, 2019
2 parents 66e3938 + 84a9c33 commit 464e843
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 19 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

## Unreleased

## 0.0.3 - 2019-06-08

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

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"packages": [
"packages/*"
],
"version": "0.0.2"
"version": "0.0.3"
}
10 changes: 5 additions & 5 deletions packages/opencensus-web-all/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencensus/web-all",
"version": "0.0.2",
"version": "0.0.3",
"description": "OpenCensus Web All combines all the main OpenCensus Web packages to provide distributions for easy use in web applications via <script> tags.",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -70,10 +70,10 @@
"webpack-dev-server": "^3.2.1"
},
"dependencies": {
"@opencensus/web-core": "^0.0.2",
"@opencensus/web-exporter-ocagent": "^0.0.2",
"@opencensus/web-instrumentation-perf": "^0.0.2",
"@opencensus/web-propagation-tracecontext": "^0.0.2"
"@opencensus/web-core": "^0.0.3",
"@opencensus/web-exporter-ocagent": "^0.0.3",
"@opencensus/web-instrumentation-perf": "^0.0.3",
"@opencensus/web-propagation-tracecontext": "^0.0.3"
},
"sideEffects": [
"./src/entrypoints/*.ts"
Expand Down
4 changes: 2 additions & 2 deletions packages/opencensus-web-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencensus/web-core",
"version": "0.0.2",
"version": "0.0.3",
"description": "OpenCensus Web is a toolkit for collecting application performance and behavior data from client side web browser apps.",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -62,7 +62,7 @@
"webpack-cli": "^3.1.0"
},
"dependencies": {
"@opencensus/web-types": "^0.0.2"
"@opencensus/web-types": "^0.0.3"
},
"sideEffects": false
}
4 changes: 3 additions & 1 deletion packages/opencensus-web-core/src/trace/model/span.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ export class Span implements webTypes.Span {

/** Ends the span by setting `endTime` to now. */
end() {
this.endPerfTime = performance.now();
if (this.endPerfTime === 0) {
this.endPerfTime = performance.now();
}
}

/** Forces the span to end. Same as `end` for opencensus-web. */
Expand Down
6 changes: 6 additions & 0 deletions packages/opencensus-web-core/test/test-span.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ describe('Span', () => {
expect(span.endPerfTime).toBe(33);
});

it('does not set endPerfTime when end is called, if endPerfTime is already set', () => {
span.endPerfTime = 22;
span.end();
expect(span.endPerfTime).toBe(22);
});

it('sets endPerfTime when truncate is called', () => {
spyOn(performance, 'now').and.returnValue(77);
span.truncate();
Expand Down
4 changes: 2 additions & 2 deletions packages/opencensus-web-exporter-ocagent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencensus/web-exporter-ocagent",
"version": "0.0.2",
"version": "0.0.3",
"description": "OpenCensus Agent Exporter web allows user to send collected traces to the OpenCensus Agent via HTTP/JSON in a browser.",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -62,7 +62,7 @@
"webpack-cli": "^3.1.0"
},
"dependencies": {
"@opencensus/web-core": "^0.0.2"
"@opencensus/web-core": "^0.0.3"
},
"sideEffects": false
}
4 changes: 2 additions & 2 deletions packages/opencensus-web-instrumentation-perf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencensus/web-instrumentation-perf",
"version": "0.0.2",
"version": "0.0.3",
"description": "OpenCensus Web instrumentation to generate spans for browser performance API data.",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -63,7 +63,7 @@
"webpack-cli": "^3.1.0"
},
"dependencies": {
"@opencensus/web-core": "^0.0.2"
"@opencensus/web-core": "^0.0.3"
},
"sideEffects": false
}
6 changes: 3 additions & 3 deletions packages/opencensus-web-instrumentation-zone/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencensus/web-instrumentation-zone",
"version": "0.0.2",
"version": "0.0.3",
"description": "OpenCensus Web instrumentation zone is used to generate user interaction spans for interactions after the initial page loads.",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -65,8 +65,8 @@
"zone.js": "~0.9.1"
},
"dependencies": {
"@opencensus/web-core": "^0.0.2",
"@opencensus/web-exporter-ocagent": "^0.0.2"
"@opencensus/web-core": "^0.0.3",
"@opencensus/web-exporter-ocagent": "^0.0.3"
},
"peerDependencies": {
"zone.js": "~0.9.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/opencensus-web-propagation-tracecontext/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencensus/web-propagation-tracecontext",
"version": "0.0.2",
"version": "0.0.3",
"description": "OpenCensus Trace Context format propagation for the web browser",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -61,7 +61,7 @@
"webpack-cli": "^3.1.0"
},
"dependencies": {
"@opencensus/web-core": "^0.0.2"
"@opencensus/web-core": "^0.0.3"
},
"sideEffects": false
}
2 changes: 1 addition & 1 deletion packages/opencensus-web-types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencensus/web-types",
"version": "0.0.2",
"version": "0.0.3",
"description": "OpenCensus Web types is a slightly-patched copy of the `types.ts` files from `@opencensus/core` so that they can be easily imported in web-specific packages.",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down

0 comments on commit 464e843

Please sign in to comment.