Currently there are configurable handlers for context guard extraction:
|
let error_handler: proc_macro2::TokenStream = match config.on_context_extraction_failure { |
Rather than manually curate a set of handlers, we should enable the caller to define a callback:
fn handler(e: PyErr) -> PyResult<()>
If handler returns an error, the function is exited; otherwise it carries on.
Currently there are configurable handlers for context guard extraction:
pyo3-opentelemetry/crates/opentelemetry-macros/src/lib.rs
Line 211 in c8bcaa7
Rather than manually curate a set of handlers, we should enable the caller to define a callback:
If
handlerreturns an error, the function is exited; otherwise it carries on.