Skip to main content

In-process agent observability sensor for Flightdeck

Project description

flightdeck-sensor

In-process agent observability sensor for Flightdeck.

Optional session_id hint (D094)

By default init() auto-generates a fresh UUID every time the process starts. Orchestrators that re-run the same logical workflow (Temporal, Airflow, cron) can instead pass a stable identifier; if the backend already has a row for that session, the new execution is attached to it and appears as a continuation of the prior run in the fleet view.

Supply the hint via either the session_id= kwarg or the FLIGHTDECK_SESSION_ID environment variable. The env var takes precedence.

The value MUST parse as a canonical UUID (any version) -- the sessions table column is UUID-typed. If you pass a non-UUID the sensor logs a warning and falls back to auto-generating one. Orchestrators that use string identifiers (Temporal workflow_id, Airflow dag_run_id) should hash the identifier into a deterministic UUID with uuid.uuid5.

Temporal workflow example

import uuid
import flightdeck_sensor as fd
from temporalio import workflow

# Pick any fixed namespace UUID for your deployment. The same
# workflow_id + namespace always produces the same session UUID,
# so re-runs of the same workflow all map to the same sessions row.
FLIGHTDECK_NS = uuid.UUID("00000000-0000-0000-0000-000000000001")

@workflow.defn
class MyWorkflow:
    @workflow.run
    async def run(self, input):
        ctx = workflow.info()
        fd.init(
            server="http://flightdeck.internal/ingest",
            token="ftd_...",
            session_id=str(uuid.uuid5(FLIGHTDECK_NS, ctx.workflow_id)),
        )
        # If this workflow_id has run before, the backend attaches
        # this execution to the existing session automatically; the
        # sensor logs INFO on the first response that confirms it.
        ...

The sensor logs a single WARNING at init() time whenever a custom session_id is in play so the behaviour is visible in operational logs, and an INFO line on the first response where the backend confirms attachment. See DECISIONS.md D094 and ARCHITECTURE.md ("Session attachment flow") for the full protocol.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flightdeck_sensor-0.3.0.tar.gz (65.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flightdeck_sensor-0.3.0-py3-none-any.whl (54.9 kB view details)

Uploaded Python 3

File details

Details for the file flightdeck_sensor-0.3.0.tar.gz.

File metadata

  • Download URL: flightdeck_sensor-0.3.0.tar.gz
  • Upload date:
  • Size: 65.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flightdeck_sensor-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2dc933aca930773262d9cd808248f03a5afc1456dffe0c53d29ef7419278dad1
MD5 3b8bc01c079b8897b1252e71e18aad86
BLAKE2b-256 b1048077aca5667a1d216c6356a718950f8db4e5ad2c5c03a8e8aa821ba1db0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for flightdeck_sensor-0.3.0.tar.gz:

Publisher: release.yml on flightdeckhq/flightdeck

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flightdeck_sensor-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flightdeck_sensor-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6263e968ce66a9c4ced3eb90c43ad8f76aad8e2985d2e69d23771655148f3a8
MD5 0daf6e13167bb2dc0a2ec9178a2cf575
BLAKE2b-256 65d074a050bc4a62e3c92bf7fb7e71e1f118be29a37dd5e2673fe9f3e2390b23

See more details on using hashes here.

Provenance

The following attestation bundles were made for flightdeck_sensor-0.3.0-py3-none-any.whl:

Publisher: release.yml on flightdeckhq/flightdeck

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page