Skip to content

Centralize API v1 observability in Google Cloud #3847

Description

@anth-volk

Summary

Integrate the Flask API v1 service with policyengine-observability 2.0 so requests produce centralized structured logs, traces, and bounded metrics in the policyengine-observability Google Cloud project.

Scope

  • Configure an explicitly owned observability runtime during application construction.
  • Instrument the Flask request lifecycle without route decorators.
  • Propagate W3C trace context and X-PolicyEngine-Request-Id through the API v1 simulation dispatch path.
  • Configure production and staging service identity, deployment environment, collector destination, and workload credentials.
  • Prove API responses remain unchanged when observability setup or export fails.
  • Preserve existing API contracts and calculation behavior.

Acceptance criteria

  • API v1 request completion records use the version 2 schema.
  • Simulation dispatch carries allowlisted correlation metadata only.
  • Observability failures do not change successful responses or application exceptions.
  • Production and staging deploy configuration names only the approved Cloud Run services and central destination.
  • Relevant formatting, lint, unit, and contract checks pass.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions