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— thebenzene:service-tagged resources in a subscription ([azure]).KubernetesDiscovery— theServices 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91af17eb5db08f7f14adcbc6c6a57da958743aaedb6d8cc2871d179a89223184
|
|
| MD5 |
d674721c05962052bebaa8d51c86a5e1
|
|
| BLAKE2b-256 |
cde0635012bb377ecdd34468b486ffe2ed7d7088bd63a25e6019426055b2983a
|
Provenance
The following attestation bundles were made for benzene_mesh_fleet-0.1.0b1.tar.gz:
Publisher:
release.yml on daniellepelley/benzene-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
benzene_mesh_fleet-0.1.0b1.tar.gz -
Subject digest:
91af17eb5db08f7f14adcbc6c6a57da958743aaedb6d8cc2871d179a89223184 - Sigstore transparency entry: 2467247497
- Sigstore integration time:
-
Permalink:
daniellepelley/benzene-python@7f3c0d2abeeb3782a82a8e2621ee8b431bf02ca8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/daniellepelley
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7f3c0d2abeeb3782a82a8e2621ee8b431bf02ca8 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file benzene_mesh_fleet-0.1.0b1-py3-none-any.whl.
File metadata
- Download URL: benzene_mesh_fleet-0.1.0b1-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce9af2e6e0e7c447933ed117f2e327b40f40524652abf34bf9d6b630fdbafabd
|
|
| MD5 |
f6ab7d0c8d212c44775badb575caa509
|
|
| BLAKE2b-256 |
a368e1dd176a2efb6f9aea1f4a1e0f3c9deaa46a8b8e2079333ee71a72e7a640
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
benzene_mesh_fleet-0.1.0b1-py3-none-any.whl -
Subject digest:
ce9af2e6e0e7c447933ed117f2e327b40f40524652abf34bf9d6b630fdbafabd - Sigstore transparency entry: 2467222161
- Sigstore integration time:
-
Permalink:
daniellepelley/benzene-python@7f3c0d2abeeb3782a82a8e2621ee8b431bf02ca8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/daniellepelley
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7f3c0d2abeeb3782a82a8e2621ee8b431bf02ca8 -
Trigger Event:
workflow_dispatch
-
Statement type: