---
id: TST-PFM-MTD-106
title: metadata api observability
kind: api-lifecycle
product_area: platform
module: metadata
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js
implements: []
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: >-
  Prepared integration database and the suite fixture records; fixture teardown restores or removes its own
  rows.
evidence:
  - 'services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js'
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#answers 200 with the
    field it created
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#answers the
    correlation id in the x-correlation-id header
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#exposes that header to
    a browser
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#logs one completion
    line with the operation, status, tenant, caller and correlation id
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#says how long the
    request took
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#carries the same
    correlation id on the handler’s own lines (its transaction)
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#carries one trace id
    on every line of the request
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#records the request as
    an api.request.count metric with its operation and status
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#records its duration
    as an api.request.duration metric
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#writes the bearer
    token into no line and no metric
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#is correlated by its
    request id, answered in the header
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#binds that id to the
    handler’s own lines too
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#answers 500, as the
    dispatcher always has
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#logs the error itself
    with its message, stack, caller, tenant and correlation id
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#logs the stack of the
    error the handler threw
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#completes at error
    level with status 500
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#counts the failure as
    an api.error.count metric
  - 'services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#answers 403'
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#completes at warn
    level, naming the refusal
  - >-
    services-platform:modules/metadata/tests/e2e/metadata-api-observability.e2e.spec.js#logs no error for a
    refusal
fixture_imports:
  - chai
  - pino
  - ../../../../aws/api/platform-api-handler
  - '@rhythmsoftware/macroservice-execution/tenant-time-zones'
  - '@rhythmsoftware/macroservice-logging/logger'
  - '@rhythmsoftware/macroservice-logging/emf-emitter'
  - '@rhythmsoftware/macroservice-testing/signed-context'
  - '@rhythmsoftware/macroservice-testing/stage'
  - ../../../tenants/services/persistence/tenants
  - ../../aws/api/metadata.routes
  - ../integration/support
test_doubles:
  - Captured log and metric destinations
  - Injected failing clone of one route handler
  - Run-generated context signing key
limitations: []
unmatched_specification: FND-PFM-MTD-083
binding_assertions: []
---

# Metadata api observability

## Verification Boundary

This API suite checks record descriptions and field configuration within the local test harness. The registered file and pinned revision define its boundary.

## What This Suite Proves

The suite contains executable checks for this module, but no matching detailed scenario is established in this back-fill. The executable coverage finding records that mapping gap. Assertions are evidence of implemented checks; no execution result is claimed.

## What It Does Not Prove

The register does not establish a current passing run or full specification conformance. Behavior outside the suite’s fixtures and assertions remains unverified.

## Real Dependencies and Test Doubles

The fixture uses PostgreSQL and the imported persistence or API code. The suite captures log and metric destinations and injects one failing handler while retaining the observed dispatcher, signing checks and redaction.

## Must Not Be Doubled

The operation under examination and its asserted stored outcomes must remain real within the declared harness. A fixture cannot replace the write, refusal or transactional effect that the bound scenario checks.
