Classes
LoggingBunyan
This module provides support for streaming your Bunyan logs to [Stackdriver Logging](https://cloud.google.com/logging).
Interfaces
express.MiddlewareOptions
express.MiddlewareReturnType
Variables
express.APP_LOG_SUFFIX
APP_LOG_SUFFIX = "applog"
LOGGING_SAMPLED_KEY
LOGGING_SAMPLED_KEY = "logging.googleapis.com/trace_sampled"
Key to use in the Bunyan payload to allow users to indicate a traceSampled flag for the request, and to store as an intermediate value on the log entry before it gets written to the Cloud logging API.
LOGGING_SPAN_KEY
LOGGING_SPAN_KEY = "logging.googleapis.com/spanId"
Key to use in the Bunyan payload to allow users to indicate a spanId for the request, and to store as an intermediate value on the log entry before it gets written to the Cloud logging API.
LOGGING_TRACE_KEY
LOGGING_TRACE_KEY = "logging.googleapis.com/trace"
Key to use in the Bunyan payload to allow users to indicate a trace for the request, and to store as an intermediate value on the log entry before it gets written to the Cloud Logging logging API.
NODEJS_BUNYAN_DEFAULT_LIBRARY_VERSION
NODEJS_BUNYAN_DEFAULT_LIBRARY_VERSION = "unknown"
Default library version to be used if version retrieval fails
Functions
express.middleware(options)
export declare function middleware(options?: MiddlewareOptions): Promise
Express middleware
Name | Description |
options | MiddlewareOptions |
Type | Description |
Promise<MiddlewareReturnType> |
getCurrentTraceFromAgent()
export declare function getCurrentTraceFromAgent(): string | null;
Gets the current fully qualified trace ID when available from the @google-cloud/trace-agent library in the LogEntry.trace field format of: "projects/[PROJECT-ID]/traces/[TRACE-ID]".
Type | Description |
string | null |
Type Aliases
express.Logger
export declare type Logger = ReturnType