Skip to content

Commit

Permalink
Merge branch 'main' into e2etracingdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
surbhigarg92 authored Jan 7, 2025
2 parents bc61a33 + 9f77f9f commit d24e043
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

[1]: https://www.npmjs.com/package/nodejs-spanner?activeTab=versions

## [7.17.1](https://github.com/googleapis/nodejs-spanner/compare/v7.17.0...v7.17.1) (2025-01-03)


### Bug Fixes

* Remove default global trace context propagator ([#2209](https://github.com/googleapis/nodejs-spanner/issues/2209)) ([7898e0c](https://github.com/googleapis/nodejs-spanner/commit/7898e0ce0477e2d4327822ac26a2674203b47a64)), closes [#2208](https://github.com/googleapis/nodejs-spanner/issues/2208)

## [7.17.0](https://github.com/googleapis/nodejs-spanner/compare/v7.16.0...v7.17.0) (2024-12-27)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@google-cloud/spanner",
"description": "Cloud Spanner Client Library for Node.js",
"version": "7.17.0",
"version": "7.17.1",
"license": "Apache-2.0",
"author": "Google Inc.",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@google-cloud/kms": "^4.0.0",
"@google-cloud/precise-date": "^4.0.0",
"@google-cloud/spanner": "^7.17.0",
"@google-cloud/spanner": "^7.17.1",
"protobufjs": "^7.0.0",
"yargs": "^17.0.0"
},
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ import * as v1 from './v1';
import {
ObservabilityOptions,
ensureInitialContextManagerSet,
ensureContextPropagation,
} from './instrument';

// eslint-disable-next-line @typescript-eslint/no-var-requires
Expand Down Expand Up @@ -378,7 +377,6 @@ class Spanner extends GrpcService {
this._observabilityOptions?.enableEndToEndTracing
);
ensureInitialContextManagerSet();
ensureContextPropagation();
}

/**
Expand Down
9 changes: 0 additions & 9 deletions src/instrument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
Span,
SpanStatusCode,
context,
propagation,
trace,
INVALID_SPAN_CONTEXT,
ROOT_CONTEXT,
Expand Down Expand Up @@ -100,8 +99,6 @@ const {
AsyncHooksContextManager,
} = require('@opentelemetry/context-async-hooks');

const {W3CTraceContextPropagator} = require('@opentelemetry/core');

/*
* This function ensures that async/await works correctly by
* checking if context.active() returns an invalid/unset context
Expand All @@ -121,14 +118,8 @@ function ensureInitialContextManagerSet() {
}
}

function ensureContextPropagation() {
propagation.setGlobalPropagator(new W3CTraceContextPropagator());
}

export {ensureInitialContextManagerSet};

export {ensureContextPropagation};

/**
* startTrace begins an active span in the current active context
* and passes it back to the set callback function. Each span will
Expand Down

0 comments on commit d24e043

Please sign in to comment.