Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions observability-test/observability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ describe('startTrace', () => {
);
});

it('sanity check: TRACER_NAME, TRACER_VERSION', () => {
assert.equal(!TRACER_NAME, false, 'TRACER_NAME must be set');
assert.equal(!TRACER_VERSION, false, 'TRACER_VERSION must be set');
});

it('with semantic attributes', () => {
const opts = {tableName: 'table', dbName: 'db'};
startTrace('aSpan', opts, span => {
Expand Down
2 changes: 1 addition & 1 deletion src/instrument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ interface observabilityOptions {
export type {observabilityOptions as ObservabilityOptions};

const TRACER_NAME = 'cloud.google.com/nodejs/spanner';
const TRACER_VERSION = '7.14.0'; // Manually hard coded, TODO: remove
const TRACER_VERSION = require('../../package.json').version;

export {TRACER_NAME, TRACER_VERSION}; // Only exported for testing.

Expand Down