Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

benzene-mesh-fleet

Cloud service discovery and fleet trace-mappers for the Benzene Python port — the two adapters a benzene-mesh mesh grows once it spans a real fleet. Depends on benzene-core and benzene-mesh.

pip install benzene-mesh-fleet            # StaticDiscovery + all three trace-mappers, no SDK
pip install "benzene-mesh-fleet[aws]"     # + boto3 for AWS Cloud Map discovery
pip install "benzene-mesh-fleet[kubernetes]"

Every cloud SDK is an optional extra imported lazily and every client is injectable, so the package imports and runs — and its tests pass — with no cloud SDK installed.

Discover the mesh

A Discovery answers which services are in the mesh, and where, returning a flat list of ServiceEndpoints (name, address, metadata). The benzene.mesh MeshPoller already reads a service once it has the address; discovery supplies the addresses instead of a hand-written list.

from benzene.mesh_fleet import KubernetesDiscovery, ServiceEndpoint, StaticDiscovery

# The SDK-free default / test double.
discovery = StaticDiscovery([ServiceEndpoint("orders", "https://orders.svc")])
endpoints = await discovery.discover()

# Or read a live registry (boto3 / azure / kubernetes imported lazily, client injectable):
discovery = KubernetesDiscovery(namespace="mesh", label_selector="benzene.io/mesh=true")
endpoints = await discovery.discover()  # [] for an empty namespace, never an error
  • StaticDiscovery — a fixed, in-memory endpoint list (the default and test impl).
  • AwsCloudMapDiscovery — lists a Cloud Map namespace's services + instances ([aws], boto3).
  • AzureDiscovery — the benzene:service-tagged resources in a subscription ([azure]).
  • KubernetesDiscovery — the Services in a namespace, addressed by in-cluster DNS ([kubernetes]).

An empty registry is an empty list, never a raise; a discovered service with no resolvable address is skipped rather than emitted blank.

Map traces to any backend

A mesh TraceEvent already is a cross-language span, so this port ships tracing ahead of the field: a TraceMapper projects a trace (the spans sharing a trace_id) into the JSON a backend ingests, no re-instrumentation — you pick the mapper, not the instrumentation.

from benzene.mesh_fleet import JaegerTraceMapper, TempoTraceMapper, XRayTraceMapper

jaeger_doc = JaegerTraceMapper().map(spans)  # {"traceID", "spans", "processes"}, µs
tempo_doc = TempoTraceMapper().map(spans)  # OTLP-JSON {"resourceSpans"}, Unix ns
xray_doc = XRayTraceMapper().map(spans)  # X-Ray segment + subsegments, epoch seconds

The backends differ mostly in time units, which is where fidelity matters: Jaeger microseconds, Tempo (OTLP-JSON) Unix nanoseconds, X-Ray floating-point epoch seconds — and X-Ray's tree of subsegments is reconstructed from each span's parent_span_id.

Mirrors .NET's Benzene.Mesh.Discovery.* and Benzene.Mesh.Fleet.*, and contributes the benzene.mesh_fleet subpackage to the shared benzene namespace. The discovery endpoints and the trace documents are ordinary data, so the whole package is exercised in memory with no SDK, no network, and no backend.

Download files

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

Source Distribution

benzene_mesh_fleet-0.1.0b1.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

benzene_mesh_fleet-0.1.0b1-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file benzene_mesh_fleet-0.1.0b1.tar.gz.

File metadata

  • Download URL: benzene_mesh_fleet-0.1.0b1.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for benzene_mesh_fleet-0.1.0b1.tar.gz
Algorithm Hash digest
SHA256 91af17eb5db08f7f14adcbc6c6a57da958743aaedb6d8cc2871d179a89223184
MD5 d674721c05962052bebaa8d51c86a5e1
BLAKE2b-256 cde0635012bb377ecdd34468b486ffe2ed7d7088bd63a25e6019426055b2983a

See more details on using hashes here.

Provenance

The following attestation bundles were made for benzene_mesh_fleet-0.1.0b1.tar.gz:

Publisher: release.yml on daniellepelley/benzene-python

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

File details

Details for the file benzene_mesh_fleet-0.1.0b1-py3-none-any.whl.

File metadata

File hashes

Hashes for benzene_mesh_fleet-0.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 ce9af2e6e0e7c447933ed117f2e327b40f40524652abf34bf9d6b630fdbafabd
MD5 f6ab7d0c8d212c44775badb575caa509
BLAKE2b-256 a368e1dd176a2efb6f9aea1f4a1e0f3c9deaa46a8b8e2079333ee71a72e7a640

See more details on using hashes here.

Provenance

The following attestation bundles were made for benzene_mesh_fleet-0.1.0b1-py3-none-any.whl:

Publisher: release.yml on daniellepelley/benzene-python

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

Release history Release notifications | RSS feed

This release

0.1.0b1 This release

2 files

Supported by

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