Observability Helpers

View as Markdown

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

Import from nemo-relay-node/observability.

Observability plugin configuration helpers.

Interfaces

AtofConfig

1export interface AtofConfig {
2 enabled?: boolean;
3 output_directory?: string;
4 filename?: string;
5 mode?: 'append' | 'overwrite' | string;
6 endpoints?: AtofEndpointConfig[];
7}

AtofEndpointConfig

1export interface AtofEndpointConfig {
2 url: string;
3 transport?: 'http_post' | 'websocket' | 'ndjson' | string;
4 headers?: Record<string, string>;
5 timeout_millis?: number;
6}

S3StorageConfig

1export interface S3StorageConfig {
2 type: 's3';
3 bucket: string;
4 key_prefix?: string;
5 access_key_id?: string;
6 secret_access_key_var?: string;
7 session_token_var?: string;
8 region?: string;
9 endpoint_url?: string;
10 allow_http?: boolean;
11}

HttpStorageConfig

1export interface HttpStorageConfig {
2 type: 'http';
3 endpoint: string;
4 headers?: Record<string, string>;
5 header_env?: Record<string, string>;
6 timeout_millis?: number;
7}

AtifConfig

1export interface AtifConfig {
2 enabled?: boolean;
3 agent_name?: string;
4 agent_version?: string;
5 model_name?: string;
6 tool_definitions?: Record<string, Json>[];
7 extra?: Record<string, Json>;
8 output_directory?: string;
9 filename_template?: string;
10 storage?: S3StorageConfig | HttpStorageConfig | Array<S3StorageConfig | HttpStorageConfig>;
11}

OtlpConfig

1export interface OtlpConfig {
2 enabled?: boolean;
3 transport?: 'http_binary' | 'grpc' | string;
4 endpoint?: string;
5 headers?: Record<string, string>;
6 resource_attributes?: Record<string, string>;
7 service_name?: string;
8 service_namespace?: string;
9 service_version?: string;
10 instrumentation_scope?: string;
11 timeout_millis?: number;
12}

Config

1export interface Config {
2 version?: number;
3 atof?: AtofConfig;
4 atif?: AtifConfig;
5 opentelemetry?: OtlpConfig;
6 openinference?: OtlpConfig;
7 policy?: ConfigPolicy;
8}

ComponentSpec interface

1export interface ComponentSpec {
2 kind: 'observability';
3 enabled?: boolean;
4 config: Config;
5}

Functions

defaultConfig

Create a default observability component config.

1export declare function defaultConfig(): Config;

atofConfig

Create filesystem-backed Agent Trajectory Observability Format (ATOF) JSONL settings with defaults applied.

1export declare function atofConfig(config?: AtofConfig): AtofConfig;

atifConfig

Create per-agent Agent Trajectory Interchange Format (ATIF) trajectory settings with defaults applied.

1export declare function atifConfig(config?: AtifConfig): AtifConfig;

otlpConfig

Create OTLP exporter settings for OpenTelemetry or OpenInference.

1export declare function otlpConfig(config?: OtlpConfig): OtlpConfig;

ComponentSpec function

Wrap observability config as a top-level plugin component.

1export declare function ComponentSpec(
2 config: Config,
3 options?: {
4 enabled?: boolean;

Constants

OBSERVABILITY_PLUGIN_KIND

Top-level plugin kind used by the built-in observability component.

1export declare const OBSERVABILITY_PLUGIN_KIND: 'observability';

Re-exports

  • ConfigDiagnostic
  • ConfigPolicy
  • ConfigReport