@google-cloud/trace-agent
Advanced tools
Comparing version 7.1.2 to 8.0.0
@@ -27,3 +27,3 @@ /// <reference types="node" /> | ||
*/ | ||
export declare type RootContext = RootSpan & (RealRootContext | PhantomRootContext); | ||
export type RootContext = RootSpan & (RealRootContext | PhantomRootContext); | ||
/** | ||
@@ -30,0 +30,0 @@ * An enumeration of the possible mechanisms for supporting context propagation |
@@ -49,3 +49,3 @@ "use strict"; | ||
TraceCLSMechanism["NONE"] = "none"; | ||
})(TraceCLSMechanism = exports.TraceCLSMechanism || (exports.TraceCLSMechanism = {})); | ||
})(TraceCLSMechanism || (exports.TraceCLSMechanism = TraceCLSMechanism = {})); | ||
/** | ||
@@ -52,0 +52,0 @@ * An implementation of continuation-local storage for the Trace Agent. |
/// <reference types="node" /> | ||
import { EventEmitter } from 'events'; | ||
export declare type Func<T = void> = (...args: any[]) => T; | ||
export type Func<T = void> = (...args: any[]) => T; | ||
/** | ||
@@ -5,0 +5,0 @@ * An interface that represents a background mechanism which is capable of |
@@ -8,3 +8,3 @@ /// <reference types="node" /> | ||
*/ | ||
export declare class NullCLS<Context> implements CLS<Context> { | ||
export declare class NullCLS<Context extends {}> implements CLS<Context> { | ||
private readonly defaultContext; | ||
@@ -11,0 +11,0 @@ private enabled; |
@@ -9,3 +9,3 @@ /// <reference types="node" /> | ||
*/ | ||
export declare class SingularCLS<Context> implements CLS<Context> { | ||
export declare class SingularCLS<Context extends {}> implements CLS<Context> { | ||
private readonly defaultContext; | ||
@@ -12,0 +12,0 @@ private enabled; |
@@ -1,3 +0,3 @@ | ||
export declare type CLSMechanism = 'async-hooks' | 'async-listener' | 'auto' | 'none' | 'singular'; | ||
export declare type ContextHeaderBehavior = 'default' | 'ignore' | 'require'; | ||
export type CLSMechanism = 'async-hooks' | 'async-listener' | 'auto' | 'none' | 'singular'; | ||
export type ContextHeaderBehavior = 'default' | 'ignore' | 'require'; | ||
export interface RequestDetails { | ||
@@ -4,0 +4,0 @@ /** |
@@ -72,3 +72,3 @@ "use strict"; | ||
SpanType["CHILD"] = "CHILD"; | ||
})(SpanType = exports.SpanType || (exports.SpanType = {})); | ||
})(SpanType || (exports.SpanType = SpanType = {})); | ||
//# sourceMappingURL=constants.js.map |
@@ -1,3 +0,3 @@ | ||
export declare type ConsoleLogLevel = 'error' | 'warn' | 'info' | 'debug'; | ||
export declare type LogLevel = 'silent' | ConsoleLogLevel; | ||
export type ConsoleLogLevel = 'error' | 'warn' | 'info' | 'debug'; | ||
export type LogLevel = 'silent' | ConsoleLogLevel; | ||
/** | ||
@@ -4,0 +4,0 @@ * The list of log levels. |
@@ -9,3 +9,3 @@ /// <reference types="node" /> | ||
export { TraceContext }; | ||
export declare type Func<T> = (...args: any[]) => T; | ||
export type Func<T> = (...args: any[]) => T; | ||
export interface TraceAgentExtension { | ||
@@ -197,4 +197,4 @@ _google_trace_patched: boolean; | ||
} | ||
export declare type GetHeaderFunction = (key: string) => string[] | string | null | undefined; | ||
export declare type SetHeaderFunction = (key: string, value: string) => void; | ||
export type GetHeaderFunction = (key: string) => string[] | string | null | undefined; | ||
export type SetHeaderFunction = (key: string, value: string) => void; | ||
export interface Propagation { | ||
@@ -215,3 +215,3 @@ extract: (getHeader: GetHeaderFunction) => TraceContext | null; | ||
} | ||
export declare type Patch<T> = Monkeypatch<T> | Intercept<T>; | ||
export declare type Plugin = Array<Patch<any>>; | ||
export type Patch<T> = Monkeypatch<T> | Intercept<T>; | ||
export type Plugin = Array<Patch<any>>; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const shimmer = require("shimmer"); | ||
const SUPPORTED_VERSIONS = '<=8.x'; | ||
const SUPPORTED_VERSIONS = '<=11.x'; | ||
function unpatchRestify(restify) { | ||
@@ -19,0 +19,0 @@ shimmer.unwrap(restify, 'createServer'); |
@@ -177,3 +177,3 @@ "use strict"; | ||
PluginLoaderState[PluginLoaderState["DEACTIVATED"] = 2] = "DEACTIVATED"; | ||
})(PluginLoaderState = exports.PluginLoaderState || (exports.PluginLoaderState = {})); | ||
})(PluginLoaderState || (exports.PluginLoaderState = PluginLoaderState = {})); | ||
/** | ||
@@ -180,0 +180,0 @@ * A class providing functionality to hook into module loading and apply |
@@ -24,3 +24,3 @@ "use strict"; | ||
SpanKind["RPC_CLIENT"] = "RPC_CLIENT"; | ||
})(SpanKind = exports.SpanKind || (exports.SpanKind = {})); | ||
})(SpanKind || (exports.SpanKind = SpanKind = {})); | ||
//# sourceMappingURL=trace.js.map |
@@ -38,3 +38,3 @@ "use strict"; | ||
TraceContextHeaderBehavior["IGNORE"] = "ignore"; | ||
})(TraceContextHeaderBehavior = exports.TraceContextHeaderBehavior || (exports.TraceContextHeaderBehavior = {})); | ||
})(TraceContextHeaderBehavior || (exports.TraceContextHeaderBehavior = TraceContextHeaderBehavior = {})); | ||
class Sampler { | ||
@@ -41,0 +41,0 @@ constructor(samplesPerSecond) { |
@@ -8,3 +8,3 @@ import { TraceCLSConfig } from './cls'; | ||
import { Component, Forceable, Singleton } from './util'; | ||
export declare type TopLevelConfig = Forceable<{ | ||
export type TopLevelConfig = Forceable<{ | ||
enabled: boolean; | ||
@@ -11,0 +11,0 @@ logLevel: number; |
@@ -28,3 +28,3 @@ /// <reference types="node" /> | ||
export declare const FORCE_NEW: unique symbol; | ||
export declare type Forceable<T> = T & { | ||
export type Forceable<T> = T & { | ||
[FORCE_NEW]?: boolean; | ||
@@ -31,0 +31,0 @@ }; |
# Changelog | ||
## [8.0.0](https://github.com/googleapis/cloud-trace-nodejs/compare/v7.1.2...v8.0.0) (2024-02-07) | ||
### ⚠ BREAKING CHANGES | ||
* upgrade to Node 14 ([#1517](https://github.com/googleapis/cloud-trace-nodejs/issues/1517)) | ||
### Features | ||
* Support restify v9-v11 ([#1489](https://github.com/googleapis/cloud-trace-nodejs/issues/1489)) ([746f30c](https://github.com/googleapis/cloud-trace-nodejs/commit/746f30c084f8e2c9eb9dbaebb017ed3cc30304ca)) | ||
### Bug Fixes | ||
* Assert oldMethod existence, and pin typescript version ([#1549](https://github.com/googleapis/cloud-trace-nodejs/issues/1549)) ([66a39fa](https://github.com/googleapis/cloud-trace-nodejs/commit/66a39fac603dbd0ab40afa5266236850124cd21b)) | ||
* **deps:** Update dependency require-in-the-middle to v6 ([#1483](https://github.com/googleapis/cloud-trace-nodejs/issues/1483)) ([ddd4bbb](https://github.com/googleapis/cloud-trace-nodejs/commit/ddd4bbb765aaa698ace8ec35ae79331f930a6709)) | ||
* **deps:** Update dependency require-in-the-middle to v7 ([#1494](https://github.com/googleapis/cloud-trace-nodejs/issues/1494)) ([58e7821](https://github.com/googleapis/cloud-trace-nodejs/commit/58e7821ce4abcba934431b9623bfef28c17da959)) | ||
* Skip flaky test ([#1495](https://github.com/googleapis/cloud-trace-nodejs/issues/1495)) ([bb03060](https://github.com/googleapis/cloud-trace-nodejs/commit/bb03060c6cf6e9d80982dda9dbb62aa3704daedf)), closes [#1334](https://github.com/googleapis/cloud-trace-nodejs/issues/1334) | ||
### Miscellaneous Chores | ||
* Upgrade to Node 14 ([#1517](https://github.com/googleapis/cloud-trace-nodejs/issues/1517)) ([8b6c967](https://github.com/googleapis/cloud-trace-nodejs/commit/8b6c967a73eb3ce16b1a4471249f4266db32e478)) | ||
## [7.1.2](https://github.com/googleapis/cloud-trace-nodejs/compare/v7.1.1...v7.1.2) (2022-09-08) | ||
@@ -4,0 +28,0 @@ |
{ | ||
"name": "@google-cloud/trace-agent", | ||
"version": "7.1.2", | ||
"version": "8.0.0", | ||
"description": "Node.js Support for StackDriver Trace", | ||
@@ -48,7 +48,7 @@ "main": "build/src/index.js", | ||
"engines": { | ||
"node": ">=12.0.0" | ||
"node": ">=14.0.0" | ||
}, | ||
"devDependencies": { | ||
"@compodoc/compodoc": "1.1.19", | ||
"@google-cloud/datastore": "^7.0.0", | ||
"@google-cloud/datastore": "^8.0.0", | ||
"@grpc/proto-loader": "^0.7.0", | ||
@@ -59,8 +59,8 @@ "@types/builtin-modules": "^2.0.0", | ||
"@types/extend": "^3.0.0", | ||
"@types/glob": "^8.0.0", | ||
"@types/is": "0.0.21", | ||
"@types/glob": "^8.1.0", | ||
"@types/is": "0.0.25", | ||
"@types/knex": "^0.15.1", | ||
"@types/methods": "^1.1.0", | ||
"@types/mocha": "^9.0.0", | ||
"@types/node": "^16.0.0", | ||
"@types/node": "^20.4.9", | ||
"@types/node-fetch": "^2.5.0", | ||
@@ -72,13 +72,13 @@ "@types/once": "^1.4.0", | ||
"@types/source-map-support": "0.5.1", | ||
"@types/tmp": "0.2.3", | ||
"@types/uuid": "^8.0.0", | ||
"axios": "^0.27.0", | ||
"c8": "^7.0.0", | ||
"@types/tmp": "0.2.6", | ||
"@types/uuid": "^9.0.0", | ||
"axios": "^1.0.0", | ||
"c8": "^8.0.1", | ||
"cpy": "^8.0.0", | ||
"express": "^4.15.2", | ||
"gaxios": "^4.0.0", | ||
"gaxios": "^6.0.0", | ||
"glob": "^8.0.0", | ||
"grpc": "1.24.11", | ||
"gts": "^3.1.0", | ||
"js-green-licenses": "^3.0.0", | ||
"gts": "^5.0.0", | ||
"js-green-licenses": "^4.0.0", | ||
"linkinator": "^2.0.0", | ||
@@ -89,10 +89,10 @@ "mocha": "^9.2.2", | ||
"retry-axios": "^2.0.0", | ||
"teeny-request": "^8.0.0", | ||
"teeny-request": "^9.0.0", | ||
"timekeeper": "^2.0.0", | ||
"tmp": "0.2.1", | ||
"ts-node": "^10.7.0", | ||
"typescript": "~4.7" | ||
"typescript": "5.1.6" | ||
}, | ||
"dependencies": { | ||
"@google-cloud/common": "^4.0.0", | ||
"@google-cloud/common": "^5.0.0", | ||
"@opencensus/propagation-stackdriver": "0.1.0", | ||
@@ -103,8 +103,8 @@ "builtin-modules": "^3.0.0", | ||
"extend": "^3.0.2", | ||
"gcp-metadata": "^5.0.0", | ||
"google-auth-library": "^8.0.2", | ||
"gcp-metadata": "^6.0.0", | ||
"google-auth-library": "^9.0.0", | ||
"hex2dec": "^1.0.1", | ||
"is": "^3.2.0", | ||
"methods": "^1.1.1", | ||
"require-in-the-middle": "^5.0.0", | ||
"require-in-the-middle": "^7.0.0", | ||
"semver": "^7.0.0", | ||
@@ -111,0 +111,0 @@ "shimmer": "^1.2.0", |
@@ -56,2 +56,12 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost." | ||
> **Warning** | ||
> | ||
> `cloud-trace-nodejs` is in maintenance mode. This means that we'll continue to fix bugs | ||
> add add security patches. We'll consider merging new feature contributions (depending | ||
> on the anticipated maintenance cost). But we won't develop new features ourselves. | ||
> | ||
> In particular, we will not add support for new major versions of libraries. | ||
> | ||
> We encourage users to migrate to [OpenTelemetry JS Instrumentation][otel] instead. | ||
This module provides automatic tracing for Node.js applications with Cloud Trace. [Cloud Trace](https://cloud.google.com/cloud-trace/) is a feature of [Google Cloud Platform](https://cloud.google.com/) that collects latency data (traces) from your applications and displays it in near real-time in the [Google Cloud Console][cloud-console]. | ||
@@ -116,3 +126,3 @@ | ||
* [koa](https://www.npmjs.com/package/koa) (version 1 - 2) | ||
* [restify](https://www.npmjs.com/package/restify) (versions 3 - 8) | ||
* [restify](https://www.npmjs.com/package/restify) (versions 3 - 11) | ||
@@ -218,2 +228,3 @@ The agent will also automatically trace RPCs from the following modules: | ||
[setting-up-stackdriver-trace]: https://cloud.google.com/trace/docs/setup/nodejs | ||
[otel]: https://opentelemetry.io/docs/instrumentation/js/libraries/ | ||
@@ -237,3 +248,3 @@ | ||
Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). | ||
Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). | ||
Libraries are compatible with all current _active_ and _maintenance_ versions of | ||
@@ -240,0 +251,0 @@ Node.js. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
369347
306
+ Added@google-cloud/common@5.0.2(transitive)
+ Added@google-cloud/projectify@4.0.0(transitive)
+ Added@google-cloud/promisify@4.0.0(transitive)
+ Added@types/caseless@0.12.5(transitive)
+ Added@types/node@22.9.0(transitive)
+ Added@types/request@2.48.12(transitive)
+ Added@types/tough-cookie@4.0.5(transitive)
+ Addedagent-base@7.1.1(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedform-data@2.5.2(transitive)
+ Addedgaxios@6.7.1(transitive)
+ Addedgcp-metadata@6.1.0(transitive)
+ Addedgoogle-auth-library@9.14.2(transitive)
+ Addedgtoken@7.1.0(transitive)
+ Addedhtml-entities@2.5.2(transitive)
+ Addedhttps-proxy-agent@7.0.5(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedrequire-in-the-middle@7.4.0(transitive)
+ Addedretry-request@7.0.2(transitive)
+ Addedteeny-request@9.0.0(transitive)
+ Addedundici-types@6.19.8(transitive)
- Removed@google-cloud/common@4.0.3(transitive)
- Removed@google-cloud/projectify@3.0.0(transitive)
- Removed@google-cloud/promisify@3.0.1(transitive)
- Removedent@2.2.1(transitive)
- Removedfast-text-encoding@1.0.6(transitive)
- Removedgaxios@5.1.3(transitive)
- Removedgcp-metadata@5.3.0(transitive)
- Removedgoogle-auth-library@8.9.0(transitive)
- Removedgoogle-p12-pem@4.0.1(transitive)
- Removedgtoken@6.1.2(transitive)
- Removedlru-cache@6.0.0(transitive)
- Removednode-forge@1.3.1(transitive)
- Removedpunycode@1.4.1(transitive)
- Removedrequire-in-the-middle@5.2.0(transitive)
- Removedretry-request@5.0.2(transitive)
- Removedteeny-request@8.0.3(transitive)
- Removedyallist@4.0.0(transitive)
Updated@google-cloud/common@^5.0.0
Updatedgcp-metadata@^6.0.0
Updatedgoogle-auth-library@^9.0.0
Updatedrequire-in-the-middle@^7.0.0