Skip to main content

Meridian Observability Plugin

CI License Python

meridian-plugin-observability is the single Apache-2.0 Python distribution in this repository. It contributes meridian_storage.plugins.observability to the PEP 420 meridian_storage namespace.

The plugin gives a started Meridian 1.0.0 runtime one governed surface for:

  • process-wide or isolated OpenTelemetry tracers, meters, and structured loggers;
  • resource, context, redaction, cardinality, recursion, and shutdown policy;
  • OTLP export to the Collector provisioned by MeridianConstructs; and
  • bounded log, trace, and metric queries through the released evidence Catalog.

It does not define a telemetry or observability Catalog, instantiate ClickHouse, accept backend credentials, start a Collector, or expose an Adapter/Engine API.

Install

python -m pip install meridian-plugin-observability==1.0.0

The release is pinned to meridian-storage-core, meridian-storage-semantics, meridian-storage-evidence, and meridian-storage-query 1.0.0 and OpenTelemetry Python 1.44.0.

Deployment must render OTEL_EXPORTER_OTLP_ENDPOINT, MERIDIAN_DEPLOYMENT_ENVIRONMENT, and any TLS/exporter environment required by the Collector. Applications do not pass backend credentials or create a Collector.

Instrumentation

from meridian_storage.plugins.observability import Observability

observability = Observability(
    meridian,
    service_name="investigation-api",
    service_version="1.4.0",
    deployment_environment="prod",
)
observability.install_global_otel_provider()

tracer = observability.tracer(__name__)
meter = observability.meter(__name__)
logger = observability.logger(__name__)

requests = meter.create_counter(
    "search.requests",
    unit="{request}",
    allowed_attributes=("result",),
)

with tracer.start_as_current_span("case.search"):
    requests.add(1, {"result": "accepted"})
    logger.info("case search accepted")

The composition root supplies only service identity and approved resource attributes. Collector endpoint, OTLP protocol, signal enablement, TLS, queue, batching, and sampling come from deployment-rendered Meridian configuration or standard OTel deployment environment variables.

Stored telemetry queries

from datetime import UTC, datetime, timedelta

end = datetime.now(UTC)
start = end - timedelta(minutes=15)

trace = observability.queries().trace(trace_id, start=start, end=end).execute()
errors = (
    observability.queries()
    .logs(start=start, end=end, min_severity="ERROR")
    .page(limit=100)
    .execute()
)

Each helper exposes a released Query 1.0.0 logical plan and executes a normal evidence.query Expression. Scope, capability, time bounds, page limits, cursor validation, audit, and Adapter selection remain inside Meridian. The three logical Resources can be supplied as EvidenceResources or rendered through MERIDIAN_OBSERVABILITY_LOGS_RESOURCE, MERIDIAN_OBSERVABILITY_SPANS_RESOURCE, and MERIDIAN_OBSERVABILITY_METRICS_RESOURCE.

See architecture, configuration, compatibility, and conformance.

Development

python -m venv .venv
.venv/bin/python -m pip install -e '.[test]'
.venv/bin/ruff format --check .
.venv/bin/ruff check .
.venv/bin/mypy src
.venv/bin/python scripts/verify_contracts.py
.venv/bin/pytest
.venv/bin/python -m build --no-isolation
.venv/bin/python scripts/verify_artifacts.py dist

License

Licensed under the Apache License, Version 2.0. See LICENSE and NOTICE.

Download files

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

Source Distribution

meridian_plugin_observability-1.0.0.tar.gz (45.1 kB view details)

Uploaded Source

Built Distribution

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

meridian_plugin_observability-1.0.0-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

Details for the file meridian_plugin_observability-1.0.0.tar.gz.

File metadata

File hashes

Hashes for meridian_plugin_observability-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e553eee6911de5ff7a53cb54f4d41d9e90aaf100c76db9497b791c71398a38e9
MD5 d414f6b6212b3555961194eaf7eec7bf
BLAKE2b-256 3fd61b5c1955c3e7375818e4356dc7723845a896073c71391dd62bde8dcce360

See more details on using hashes here.

Provenance

The following attestation bundles were made for meridian_plugin_observability-1.0.0.tar.gz:

Publisher: release.yml on zephytiju/meridian-plugin-observability

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

File details

Details for the file meridian_plugin_observability-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for meridian_plugin_observability-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 186eab6ef540aa03ccfac789c9e19af893d37abe8d4b647945d55d6240c48460
MD5 72e65a832b871e29f7c8997766d3e41d
BLAKE2b-256 bce24a09e7925ead6251bdfbe2ee8cf9b996ae2161e16e1ae953c9367862d325

See more details on using hashes here.

Provenance

The following attestation bundles were made for meridian_plugin_observability-1.0.0-py3-none-any.whl:

Publisher: release.yml on zephytiju/meridian-plugin-observability

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

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page