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.1.tar.gz (65.4 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.1-py3-none-any.whl (54.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flightdeck_sensor-0.3.1.tar.gz
  • Upload date:
  • Size: 65.4 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.1.tar.gz
Algorithm Hash digest
SHA256 7701f0b945acf32b0427a917e198811e2d94b4bbe7976fe6abb47c485654d7ec
MD5 7cd4764bf6080fb976b67b3da9f6268c
BLAKE2b-256 1467fddc26822031c44599a828917b5b46dda7ba204c60bae2793e5f52d37e8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for flightdeck_sensor-0.3.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for flightdeck_sensor-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9fc07272e97e327eca883cc032b760d47273830b6a76708e2b54caee58df2db4
MD5 7ff6f6a8098a393242f0755559d3335d
BLAKE2b-256 e36dada0fb3b068a727d8034f1c1f9857a05ea1b6bce7c0bb0664e6768bf5cc6

See more details on using hashes here.

Provenance

The following attestation bundles were made for flightdeck_sensor-0.3.1-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