Skip to main content

OtelServiceParameters

@webda/otel


Class: OtelServiceParameters

Defined in: otel/src/otel.service.ts:48

OpenTelemetry service parameters

Extends​

  • ServiceParameters

Constructors​

Constructor​

new OtelServiceParameters(): OtelServiceParameters

Returns​

OtelServiceParameters

Inherited from​

ServiceParameters.constructor

Properties​

diagnostic?​

optional diagnostic?: "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE" | "NONE" | "ALL"

Defined in: otel/src/otel.service.ts:90

Default​

NONE

loggerExporter?​

optional loggerExporter?: object

Defined in: otel/src/otel.service.ts:75

Logger export If empty it is disabled

enable?​

optional enable?: boolean

Allow to disable the logger

Default​
true

type?​

optional type?: "otlp"

url?​

optional url?: string

Default​
http://localhost:4317

metricExporter?​

optional metricExporter?: object

Defined in: otel/src/otel.service.ts:63

enable?​

optional enable?: boolean

Allow to disable the metric exporter

Default​
true

type​

type: "console" | "otlp"


name?​

optional name?: string

Defined in: otel/src/otel.service.ts:94

Service name reported to OpenTelemetry, default to the package name


traceExporter?​

optional traceExporter?: object

Defined in: otel/src/otel.service.ts:49

enable?​

optional enable?: boolean

Allow to disable the trace exporter

Default​
true

sampling?​

optional sampling?: number

Between 0.0 and 1.0

Default​
0.01

type​

type: "console" | "otlp"


type​

type: string

Defined in: core/lib/services/serviceparameters.d.ts:8

Type of the service

Inherited from​

ServiceParameters.type

Methods​

load()​

load(params?): this

Defined in: otel/src/otel.service.ts:101

Apply default values

Parameters​

params?​

any = {}

the service parameters

Returns​

this

this

Overrides​

ServiceParameters.load


update()​

update(params, delta): this

Defined in: core/lib/services/serviceparameters.d.ts:25

Update parameters and call watchers if a parameter was changed

Parameters​

params​

any

the service parameters

delta​

any

the delta

Returns​

this

this for chaining

Inherited from​

ServiceParameters.update


with()​

with(callback): this

Defined in: core/lib/services/serviceparameters.d.ts:31

Watch for changes on the parameters and call watchers when a parameter is changed

Parameters​

callback​

(params) => void

the callback function

Returns​

this

this for chaining

Inherited from​

ServiceParameters.with