pub struct OpenLineageConfig {
pub producer: String,
pub job_namespace: String,
pub engine_name: String,
pub engine_version: String,
pub adapter_version: String,
pub request_timeout: Duration,
}Expand description
Identifies the emitting integration on every emitted event/facet, and tunes the emit transport.
Fields§
§producer: Stringproducer URI stamped on events and facets (the emitting code). Engine
integrations should override this with their own identity.
job_namespace: StringDefault job namespace when the context provides none
(from OPENLINEAGE_NAMESPACE, falling back to "default").
engine_name: StringEngine name for the processing_engine run facet. Empty unless an engine
integration sets it.
engine_version: StringEngine version for the processing_engine run facet. Empty unless an
engine integration sets it.
adapter_version: StringThis crate’s version, for openlineageAdapterVersion.
request_timeout: DurationPer-request timeout applied by HTTP transports. One slow/hung upstream
request can otherwise stall the shared background drain; bounding it lets
the drain keep making progress. See OPENLINEAGE_TIMEOUT_MS.
Implementations§
Source§impl OpenLineageConfig
impl OpenLineageConfig
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Build a config from the standard OpenLineage environment conventions.
Reads OPENLINEAGE_NAMESPACE for the default job namespace (falling back
to DEFAULT_NAMESPACE) and OPENLINEAGE_TIMEOUT_MS for the request
timeout (falling back to DEFAULT_REQUEST_TIMEOUT); the producer/adapter
identity is fixed for this crate and the engine identity is left empty (an
engine integration such as datafusion-openlineage stamps it). This is
the documented entry point for env-driven configuration — pair it with
OpenLineageClient::from_env, which
reads OPENLINEAGE_URL / OPENLINEAGE_ENDPOINT / OPENLINEAGE_API_KEY
for the transport, so an integration can wire itself up entirely from the
environment the rest of the OpenLineage ecosystem already uses.
Default is equivalent and reads the same environment; from_env
exists to make the env dependency explicit and discoverable at call sites.
Sourcepub fn with_env(namespace: Option<String>, timeout_ms: Option<String>) -> Self
pub fn with_env(namespace: Option<String>, timeout_ms: Option<String>) -> Self
Self::from_env with the OPENLINEAGE_NAMESPACE / OPENLINEAGE_TIMEOUT_MS
values injected, so the fallback logic is unit-testable without mutating
process-global env. An absent or empty namespace falls back to
DEFAULT_NAMESPACE; an absent/empty/unparsable timeout falls back to
DEFAULT_REQUEST_TIMEOUT.
Trait Implementations§
Source§impl Clone for OpenLineageConfig
impl Clone for OpenLineageConfig
Source§fn clone(&self) -> OpenLineageConfig
fn clone(&self) -> OpenLineageConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more