is there a canonical way to log metadata to the co...
# ask-community
z
is there a canonical way to log metadata to the console (specifically clickable URL links)? I've been using
context.instance.report_engine_event()
with an
EngineEventData
object, but it seems that
EngineEventData
isn't in the public API for 1.0+, and
context.log_event()
appears to only be used for logging AssetMaterializations/Observations and ExpectationResults
also, it'd be nice to get
StepExecutionContext
and
StepRunRef
in the public API for annotations when writing custom step launchers
c
Good point regarding
StepExecutionContext
+
StepRunRef
As far as logging arbitrary metadata - I don't think we have a way to do this yet. A workaround could be yielding a dummy output which contains a clickable link as metadata.
(Or, if you don't mind the metadata being linked to an output, just put the metadata on the relevant output)
z
maybe this is a silly question but can you yield an output in the middle of an op? in particular I'm using this metadata to provide clickable links to logs / status pages where remote execution is taking place, in often long-running ops, so it's nice to have the link early on in the op logs
c
z
thanks a bunch!