Skip to navigation

Function nemo_relay_otel_subscriber_create

View as MarkdownOpen in Claude

Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

#[unsafe(no_mangle)]pub unsafe extern "C" fn nemo_relay_otel_subscriber_create(
    otel_type: *const c_char,
    transport: *const c_char,
    endpoint: *const c_char,
    headers_json: *const c_char,
    header_env_json: *const c_char,
    resource_attributes_json: *const c_char,
    service_name: *const c_char,
    service_namespace: *const c_char,
    service_version: *const c_char,
    instrumentation_scope: *const c_char,
    timeout_millis: u64,
    mark_projection: *const c_char,
    mark_exclude_names_json: *const c_char,
    attribute_mappings_json: *const c_char,
    promote_metadata_prefixes_json: *const c_char,
    promote_resource_metadata_prefixes_json: *const c_char,
    completed_span_context_ttl_millis: u64,
    tls_json: *const c_char,
    output_directory: *const c_char,
    filename: *const c_char,
    format: *const c_char,
    mode: *const c_char,
    out: *mut *mut FfiOpenTelemetrySubscriber,
) -> NemoRelayStatus

Creates an OTLP subscriber with optional TLS file settings.

tls_json accepts a JSON object or a null pointer. The object has three optional file paths: certificate, client_certificate, and private_key. Set the client certificate and private key together. otel_type is full, gen_ai, or openinference. For network export, endpoint is required. Set transport to grpc or http_binary. Header and resource maps are JSON objects with string values. header_env_json maps header names to environment variable names. mark_projection is inherit, event, or tool. Exclusions and promotion prefixes are JSON string arrays, and mappings are [{"key":"...","alias":"..."}]. Null optional strings and JSON pointers select defaults. A zero timeout uses 3,000 milliseconds. completed_span_context_ttl_millis must be positive.

Set output_directory to select file export instead of network export. Set filename to null to use the default name. format is json_lines (default) or proto. mode is overwrite (default) or append. File export uses the same resource, service, projection, and lineage settings. Network settings (transport, endpoint, headers, timeout, and TLS) are ignored in file mode. In network mode, filename, format, and mode are ignored.

Safety

Any non-null C strings must be valid and out must be non-null.