Skip to main content

lightshuttle_otel/
lib.rs

1//! OpenTelemetry collector bundling and environment injection for
2//! LightShuttle.
3//!
4//! This crate provides two building blocks:
5//!
6//! - [`CollectorConfig`] — a strongly-typed value describing the
7//!   bundled `otel/opentelemetry-collector` container. It can be
8//!   materialised into a [`lightshuttle_runtime::ContainerSpec`] via
9//!   [`CollectorConfig::to_container_spec`].
10//! - [`inject_otel_env`] — an idempotent helper that adds the standard
11//!   `OTEL_EXPORTER_OTLP_ENDPOINT`, `OTEL_SERVICE_NAME` and
12//!   `OTEL_RESOURCE_ATTRIBUTES` keys to a resource environment without
13//!   overriding any value already set by the user.
14
15pub use crate::augment::{augment_manifest, is_enabled};
16pub use crate::config::{CollectorConfig, SYNTHETIC_RESOURCE_NAME};
17pub use crate::env::inject_otel_env;
18pub use crate::tracer::{TracerGuard, init_orchestrator_tracer};
19
20mod augment;
21mod config;
22mod env;
23mod tracer;