AppSurface Search
API Reference

Hosting

Type

TemplateTelemetry

Source

Registers an SDK listener for the canonical AppSurface activity source and an optional OTLP exporter.

Method

Configure

void Configure(IServiceCollection services, Uri? endpoint)

Configures sampling, canonical source listening, and the optional OTLP export destination.

Parameters

  • services
    Host service collection.
  • endpoint
    Validated OTLP endpoint, or null to listen without a network exporter.
Type

ActivationEndpoints

Source

Maps the fixed liveness, compatibility, readiness, and authorized payload-free activation routes.

Method

Map

void Map(WebApplication app, ActivationSettings settings)

Maps the sample-owned routes to their application-owned closed projections.

Parameters

  • app
    Built but not yet listening application.
  • settings
    Validated low-cardinality activation and body-read limits.
Method

ProbeAsync

Task<IResult> ProbeAsync(HttpContext context, bool readiness)

Returns an independent liveness marker without resolving or calling a Durable service.

Parameters

  • context
    HTTP request context.
  • readiness
    Selects the stricter Healthy-only verdict when true.

Returns

A bounded assessment projection and its route-specific status.

Method

ActivateAsync

Task<IResult> ActivateAsync(HttpContext context, ActivationSettings settings)

Enforces authentication-first, empty-body activation and projects all ten published service outcomes.

Parameters

  • context
    Authorized HTTP request context.
  • settings
    Validated pump, service, and body-read budgets.

Returns

The exact safe activation DTO or a bounded host-owned error.

Method

ValidateAssessment

void ValidateAssessment(DurableRuntimeHealthSnapshot health)

Validates the provider snapshot before returning its bounded fields to a caller.

Parameters

  • health
    Provider-owned health snapshot.
Method

GetStatusCode

int GetStatusCode(DurableExternalActivationResult result)

Maps the closed ten-outcome activation contract to stable HTTP statuses.

Parameters

  • result
    Validated service outcome.

Returns

The published sample's status code.

Method

IsCompatibilityCode

bool IsCompatibilityCode(string? problemCode)

Recognizes only the canonical bounded schema and active-epoch compatibility codes.

Parameters

  • problemCode
    Observed problem code.

Returns

True only for one of the allowed schema compatibility codes.

Method

LogSafeFailure

void LogSafeFailure(HttpContext context, string failureCode)

Logs a stable host-owned failure category without request, payload, credential, or exception data.

Parameters

  • context
    Request context used to resolve a logger.
  • failureCode
    Fixed low-cardinality category.
Method

IsNonfatal

bool IsNonfatal(Exception exception)

Excludes fatal process errors from fixed safe HTTP projections.

Parameters

  • exception
    Observed exception.

Returns

False only for process-fatal exceptions.

Type

LiveResponse

Source

Represents the fixed process liveness marker.

Parameters

  • Status
    Always Live while the route is served.
Type

ProbeResponse

Source

Represents one safe health assessment or fixed probe failure.

Parameters

  • Outcome
    Assessment, ProbeFailed, or ProbeCanceled.
  • ObservedHealthState
    Defined provider health state, or null without an assessment.
  • CanEnableActivation
    Provider compatibility verdict, or null without an assessment.
  • IsReady
    Canonical readiness verdict, or null without an assessment.
  • ProblemCode
    Approved bounded diagnostic code, or null.
Type

ActivationResponse

Source

Represents the exact safe activation response projection.

Parameters

  • Outcome
    One of the ten canonical activation outcome names.
  • ObservedHealthState
    Defined state observed by the activation service, or null.
  • ProblemCode
    Validated bounded code, or null.
  • PumpResult
    Lossless bounded aggregate projection for Completed, or null.
Method

From

ActivationResponse From(DurableExternalActivationResult result)

Projects only the fields accepted by the activation contract.

Parameters

  • result
    Closed public activation result.

Returns

Safe wire DTO retaining all aggregate counts and elapsed ticks.

Type

PumpResultResponse

Source

Contains the complete safe pump aggregate returned by one completed activation invocation.

Parameters

  • Discovered
    Candidate count.
  • Claimed
    Claim count.
  • Processed
    Successfully processed count.
  • Deferred
    Policy-deferred count.
  • Failed
    Failed or suspended count.
  • HasMore
    Whether eligible work may remain.
  • NextDueAtUtc
    Invariant seven-digit UTC timestamp or null.
  • ElapsedTicks
    Elapsed duration in 100-nanosecond ticks.
Type

ErrorResponse

Source

Represents a fixed host-owned failure label without provider or exception detail.

Parameters

  • Error
    WakeBodyMustBeEmpty, WakeBodyReadTimeout, or HostFailure.
Type

DevelopmentBearerOptions

Source

Stores the required, bounded local bearer token captured before the Development listener starts.

Property

Token

string Token { get; set; } Source

Gets or sets the nonempty Development token.

Type

DevelopmentBearerHandler

Source

Authenticates only the configured Development bearer token using a fixed-size constant-time comparison.

Method

IsValidBearerHeader

bool IsValidBearerHeader(StringValues values, string configuredToken)

Validates one bounded bearer header without depending on HTTP parser whitespace normalization.

Parameters

  • values
    Authorization header values.
  • configuredToken
    Captured Development-only token.

Returns

True only for exactly one syntactically valid, constant-time matching bearer credential.