Skip to content

Diagnostics ​

Report bounded, structured information about the current plugin’s work. Diagnostics help explain a failure without exposing private account data or creating an unbounded logging channel.

Contract: nexa.diagnostics/100. API index.

Typical sequence ​

Use stable message keys and relevant operation/correlation IDs. ReadOwnReports is scoped to the caller; it is not a global launcher log reader.

Behavior and limits ​

The Host assigns source and ownership. Do not log bearer tokens, grants, encrypted package keys or full user file contents. A diagnostic report does not turn a failed operation into success.

The recorded Host maps 4 of 4 operations in this group. A mapping is subject to permission, phase, scope, platform and business preconditions. Host snapshot identifies the source revision; negotiate against the actual installed Host.

Operations ​

Log · Report · CreateSpan · ReadOwnReports

Log ​

DiagnosticReport → Empty

PropertyContract
Local SDK method ID5
KindMutation
Permissionnexa.diagnostics.write
Legal phasesPreInitialize, Initialize, PostInitialize, Checkup, Finalize, Active, Abort, Stop
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
CodestringDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.
MessageLocalizedTextStructured LocalizedText value; follow its linked field contract.
SeverityDiagnosticSeverityUse an exact enum member listed in the reference. The Host can support a subset for a particular operation.
CorrelationIdGuidDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.
OperationIdGuid?Domain value named by this field; additional accepted values and bounds are determined by the operation and Host policy. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.

Successful result

There is no result payload beyond the encoded Empty model. Check Success; an empty failure value is not successful completion.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Diagnostics_Log(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Diagnostics_Log_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

Report ​

DiagnosticReport → Empty

PropertyContract
Local SDK method ID6
KindMutation
Permissionnexa.diagnostics.write
Legal phasesPreInitialize, Initialize, PostInitialize, Checkup, Finalize, Active, Abort, Stop
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
CodestringDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.
MessageLocalizedTextStructured LocalizedText value; follow its linked field contract.
SeverityDiagnosticSeverityUse an exact enum member listed in the reference. The Host can support a subset for a particular operation.
CorrelationIdGuidDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.
OperationIdGuid?Domain value named by this field; additional accepted values and bounds are determined by the operation and Host policy. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.

Successful result

There is no result payload beyond the encoded Empty model. Check Success; an empty failure value is not successful completion.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Diagnostics_Report(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Diagnostics_Report_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

CreateSpan ​

DiagnosticSpan → SpanRef

PropertyContract
Local SDK method ID7
KindMutation
Permissionnexa.diagnostics.write
Legal phasesPreInitialize, Initialize, PostInitialize, Checkup, Finalize, Active, Abort, Stop
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
NamestringDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.
CorrelationIdGuidDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.
ParentGuid?Domain value named by this field; additional accepted values and bounds are determined by the operation and Host policy. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.
AttributesNamedValue[]Structured NamedValue value; follow its linked field contract. A bounded collection; do not assume an unbounded result or unspecified ordering.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Diagnostics_CreateSpan(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Diagnostics_CreateSpan_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ReadOwnReports ​

PageRequest → Page<DiagnosticReport> (wrapper, item)

PropertyContract
Local SDK method ID8
KindQuery
Permissionnexa.diagnostics.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
Cursorstring?Opaque continuation or observation cursor. Reuse only in the issuing query/scope; absence and invalidity are different. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.
LimitlongRequested bound on returned items. The Host may impose a smaller domain-specific limit.

Successful result

Read Items and continue with NextCursor while preserving the original query. An absent cursor ends the sequence; an invalid cursor is an error.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Diagnostics_ReadOwnReports(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Diagnostics_ReadOwnReports_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.


Source: NexaCL-Plugin-SDK · Apache-2.0.

Site documentation: CC BY-SA 4.0. Imported SDK documents: Apache-2.0 as marked.