> This page is for NeMo Relay, version v1.0.0.
> For other versions, use one of these documentation indexes:
> - Latest (v0.11.2) (default): https://docs.nvidia.com/nemo/relay/latest/llms.txt
> - dev: https://docs.nvidia.com/nemo/relay/dev/llms.txt
> - v1.0.0: https://docs.nvidia.com/nemo/relay/v1.0.0/llms.txt
> - v0.11.2: https://docs.nvidia.com/nemo/relay/v0.11.2/llms.txt
> - v0.10.4: https://docs.nvidia.com/nemo/relay/v0.10.4/llms.txt
> - v0.9.4: https://docs.nvidia.com/nemo/relay/v0.9.4/llms.txt
> - v0.8.4: https://docs.nvidia.com/nemo/relay/v0.8.4/llms.txt

> For clean Markdown of any page, append .md to the page URL. For a task-oriented documentation index, fetch https://docs.nvidia.com/nemo/relay/llms.txt. Use the documentation version matching the installed NeMo Relay package: latest follows the latest stable release, vX.Y.Z identifies a retained release snapshot, and dev documents development changes. Preserve the selected version when following links; do not mix examples or API contracts from different versions. Fetch the relevant section's /llms.txt before individual pages instead of loading a complete version index.

# Observability Helpers

> Observability plugin configuration helpers.

Generated from `crates/node/dist/observability.d.ts`.

Import from `nemo-relay-node/observability`.

Observability plugin configuration helpers.

## Interfaces

### `AtofConfig`

```ts
export interface AtofConfig {
    enabled?: boolean;
    sinks?: AtofSinkConfig[];
}
```

### `AtofFileSinkConfig`

```ts
export interface AtofFileSinkConfig {
    type: 'file';
    output_directory?: string;
    filename?: string;
    mode?: 'append' | 'overwrite' | (string & {});
}
```

### `AtofStreamSinkConfig`

```ts
export interface AtofStreamSinkConfig {
    type: 'stream';
    url: string;
    transport?: 'http_post' | 'websocket' | 'ndjson' | (string & {});
    headers?: Record<string, string>;
    header_env?: Record<string, string>;
    header_file?: Record<string, string>;
    timeout_millis?: number;
    field_name_policy?: 'preserve' | 'replace_dots' | (string & {});
    name?: string;
}
```

### `S3StorageConfig`

```ts
export interface S3StorageConfig {
    type: 's3';
    bucket: string;
    key_prefix?: string;
    access_key_id?: string;
    secret_access_key_var?: string;
    session_token_var?: string;
    region?: string;
    endpoint_url?: string;
    allow_http?: boolean;
}
```

### `HttpStorageConfig`

```ts
export interface HttpStorageConfig {
    type: 'http';
    endpoint: string;
    headers?: Record<string, string>;
    header_env?: Record<string, string>;
    header_file?: Record<string, string>;
    timeout_millis?: number;
}
```

### `AtifConfig`

```ts
export interface AtifConfig {
    enabled?: boolean;
    agent_name?: string;
    agent_version?: string;
    model_name?: string;
    tool_definitions?: Record<string, Json>[];
    extra?: Record<string, Json>;
    output_directory?: string;
    filename_template?: string;
    storage?: S3StorageConfig | HttpStorageConfig | Array<S3StorageConfig | HttpStorageConfig>;
    /** Keeps raw events in `extra.observed_events`, default `true`. */
    include_observed_events?: boolean;
    /** Keeps full provider requests in trajectory steps, default `true`. */
    include_llm_requests?: boolean;
}
```

### `OpenTelemetryTlsConfig`

```ts
export interface OpenTelemetryTlsConfig {
    /** PEM CA bundle replacing system CAs. */
    certificate?: string;
    /** PEM client certificate chain, used with `private_key`. */
    client_certificate?: string;
    /** PEM private key, used with `client_certificate`. */
    private_key?: string;
}
```

### `OpenTelemetryEndpointConfig`

```ts
export interface OpenTelemetryEndpointConfig {
    type: 'full' | 'gen_ai' | 'openinference';
    endpoint: string;
    tls?: OpenTelemetryTlsConfig;
    mark_projection?: 'inherit' | 'event' | 'tool';
    mark_exclude_names?: string[];
    attribute_mappings?: Array<{
        key: string;
        alias: string;
    }>;
    promote_metadata_prefixes?: string[];
    promote_resource_metadata_prefixes?: string[];
    transport?: 'http_binary' | 'grpc';
    headers?: Record<string, string>;
    header_env?: Record<string, string>;
    header_file?: Record<string, string>;
    resource_attributes?: Record<string, string>;
    service_name?: string;
    service_namespace?: string;
    service_version?: string;
    instrumentation_scope?: string;
    timeout_millis?: number;
    max_queue_size?: number;
    max_export_batch_size?: number;
    scheduled_delay_millis?: number;
    completed_span_context_ttl_millis?: number;
}
```

### `OpenTelemetrySignalEndpointConfig`

```ts
export interface OpenTelemetrySignalEndpointConfig {
    endpoint: string;
    tls?: OpenTelemetryTlsConfig;
    transport?: 'http_binary' | 'grpc';
    headers?: Record<string, string>;
    header_env?: Record<string, string>;
    header_file?: Record<string, string>;
    resource_attributes?: Record<string, string>;
    service_name?: string;
    service_namespace?: string;
    service_version?: string;
    instrumentation_scope?: string;
    timeout_millis?: number;
    /** Root-scope metadata prefixes copied to resource attributes. */
    promote_resource_metadata_prefixes?: string[];
}
```

### `OpenTelemetryLogSectionConfig`

```ts
export interface OpenTelemetryLogSectionConfig {
    enabled?: boolean;
    endpoints?: OpenTelemetrySignalEndpointConfig[];
    minimum_severity?: 'trace' | 'debug' | 'info' | 'warn' | 'warning' | 'error';
    max_queue_size?: number;
    max_export_batch_size?: number;
    scheduled_delay_millis?: number;
    completed_span_context_ttl_millis?: number;
}
```

### `OpenTelemetryMetricSectionConfig`

```ts
export interface OpenTelemetryMetricSectionConfig {
    enabled?: boolean;
    endpoints?: OpenTelemetrySignalEndpointConfig[];
    export_interval_millis?: number;
    temporality?: 'cumulative' | 'delta' | 'low_memory';
    max_instruments?: number;
    cardinality_limit?: number;
}
```

### `OpenTelemetryFileSinkConfig`

```ts
export interface OpenTelemetryFileSinkConfig {
    type?: 'full' | 'gen_ai' | 'openinference';
    output_directory: string;
    filename?: string;
    /** `json_lines` for one OTLP/JSON record per line, `proto` for length-delimited records. */
    format?: 'json_lines' | 'proto';
    mode?: 'append' | 'overwrite';
    mark_projection?: 'inherit' | 'event' | 'tool';
    mark_exclude_names?: string[];
    attribute_mappings?: Array<{
        key: string;
        alias: string;
    }>;
    promote_metadata_prefixes?: string[];
    promote_resource_metadata_prefixes?: string[];
    resource_attributes?: Record<string, string>;
    service_name?: string;
    service_namespace?: string;
    service_version?: string;
    instrumentation_scope?: string;
    max_queue_size?: number;
    max_export_batch_size?: number;
    scheduled_delay_millis?: number;
    completed_span_context_ttl_millis?: number;
}
```

### `OpenTelemetrySectionConfig`

```ts
export interface OpenTelemetrySectionConfig {
    enabled?: boolean;
    endpoints?: OpenTelemetryEndpointConfig[];
    file_sinks?: OpenTelemetryFileSinkConfig[];
    logs?: OpenTelemetryLogSectionConfig;
    metrics?: OpenTelemetryMetricSectionConfig;
}
```

### `Config`

```ts
export interface Config {
    version?: number;
    atof?: AtofConfig;
    atif?: AtifConfig;
    opentelemetry?: OpenTelemetrySectionConfig;
    policy?: ConfigPolicy;
    /** Keeps full sanitized request data on LLM start events. */
    enable_full_payloads?: boolean;
    /** Non-loopback hosts allowed to receive unencrypted HTTP or WebSocket exports, headers included. */
    insecure_http_hosts?: string[];
}
```

### `ComponentSpec` interface

```ts
export interface ComponentSpec {
    kind: 'observability';
    enabled?: boolean;
    config: Config;
}
```

## Functions

### `defaultConfig`

Creates a default observability config.

```ts
export declare function defaultConfig(): Config;
```

### `atofConfig`

Creates Agent Trajectory Observability Format (ATOF) settings with defaults applied.

```ts
export declare function atofConfig(config?: AtofConfig): AtofConfig;
```

### `atifConfig`

Creates Agent Trajectory Interchange Format (ATIF) settings with defaults applied.

```ts
export declare function atifConfig(config?: AtifConfig): AtifConfig;
```

### `openTelemetryEndpoint`

Creates one OpenTelemetry trace endpoint with defaults applied.

```ts
export declare function openTelemetryEndpoint(config: OpenTelemetryEndpointConfig): OpenTelemetryEndpointConfig;
```

### `openTelemetryFileSink`

Creates one file sink for OTLP spans with defaults applied.

```ts
export declare function openTelemetryFileSink(config: OpenTelemetryFileSinkConfig): OpenTelemetryFileSinkConfig;
```

### `openTelemetrySignalEndpoint`

Creates one OpenTelemetry log or metric endpoint with defaults applied.

```ts
export declare function openTelemetrySignalEndpoint(config: OpenTelemetrySignalEndpointConfig): OpenTelemetrySignalEndpointConfig;
```

### `openTelemetryLogConfig`

Creates OTLP log settings with defaults applied.

```ts
export declare function openTelemetryLogConfig(config?: OpenTelemetryLogSectionConfig): OpenTelemetryLogSectionConfig;
```

### `openTelemetryMetricConfig`

Creates OTLP metric settings with defaults applied.

```ts
export declare function openTelemetryMetricConfig(config?: OpenTelemetryMetricSectionConfig): OpenTelemetryMetricSectionConfig;
```

### `openTelemetryConfig`

Creates OpenTelemetry settings with defaults applied.

```ts
export declare function openTelemetryConfig(config?: OpenTelemetrySectionConfig): OpenTelemetrySectionConfig;
```

### `ComponentSpec` function

Wraps observability config as a plugin component.

```ts
export declare function ComponentSpec(config: Config, { enabled }?: {
    enabled?: boolean;
}): ComponentSpec;
```

## Type Aliases

### `AtofSinkConfig`

```ts
export type AtofSinkConfig = AtofFileSinkConfig | AtofStreamSinkConfig;
```

### `AtofEndpointConfig`

@deprecated Use AtofStreamSinkConfig.

```ts
export type AtofEndpointConfig = AtofStreamSinkConfig;
```

## Constants

### `OBSERVABILITY_PLUGIN_KIND`

Plugin kind of the observability component.

```ts
export declare const OBSERVABILITY_PLUGIN_KIND = "observability";
```

## Re-exports

* `ConfigDiagnostic`
* `ConfigPolicy`
* `ConfigReport`