Open zhengfeiwang opened 3 weeks ago
opened an issue in mlflow repo: https://github.com/mlflow/mlflow/issues/12341
mlflow has fixed this in https://github.com/mlflow/mlflow/pull/12457, where mlflow will only operate their OTel components, instead of global, the issue shall be mitigated; will close this after the patch released and verified.
Describe the bug In mlflow>=2.13.1, mlflow supports to force reset the global tracer provider in some operations (related PR: https://github.com/mlflow/mlflow/pull/12137), this might break/disable tracing feature in prompt flow.
How To Reproduce the bug Setup mlflow after prompt flow will result in the issue. Below snippet can demonstrate on that:
When
reset_tracer_setup
is executed, all registered exporter will be reset, so there will be no stdout when traces are closed. We are not sure how/when mlflow will call this function, but seems it will break/disable tracing feature in prompt flow as it reset the exporter.Expected behavior Operations in mlflow shall not modify global tracer provider, and this should break Open Telemetry standard. Looks prompt flow have no action can be taken for this, and this issue might work as a FYI. for now.
Additional context Elder versions will run into
AttributeError
complaining about "NoOpTracerProvider
has noadd_span_processor
", there is a PR working on that to skip setup and log a warning: #3407