tracer

Node.js Express application request Open Telemetry tracing.

Source:
See:

Requires

  • module:@google-cloud/opentelemetry-cloud-trace-exporter
  • module:@google-cloud/opentelemetry-cloud-trace-propagator
  • module:@opentelemetry/api
  • module:@opentelemetry/instrumentation
  • module:@opentelemetry/instrumentation-express
  • module:@opentelemetry/instrumentation-http
  • module:@opentelemetry/resources
  • module:@opentelemetry/sdk-trace-node
  • module:@opentelemetry/sdk-trace-base
  • module:@opentelemetry/semantic-conventions

Methods

(inner) filterSampler(filterFn, parent) → {any}

Filter data returned to opentelemetry.

Parameters:
Name Type Description
filterFn function

Function to use to filter sample.

parent object

Parent sampler object.

Returns:
Type Description
any
  • Trace data filtered by the supplied function.
Source:

(inner) ignoreHealthCheck(spanName, spanKind, attributes) → {boolean}

Function used by opentelemetry to not trace health check endpoints.

Parameters:
Name Type Description
spanName string

Opentelemetry span name.

spanKind string

Opentelemetry span kind.

attributes object

Object attributes used to identify health check endpoints.

Returns:
Type Description
boolean
  • true when health check should be ignored, false otherwise.
Source: