Skip to content

Commit

Permalink
Add TaskInstance log_url to OpenLineage facet (#40797)
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfinus authored Jul 15, 2024
1 parent d029e77 commit 2f0bba0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions airflow/providers/openlineage/facets/AirflowRunFacet.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@
"queued_dttm": {
"type": "string",
"format": "date-time"
},
"log_url": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": true,
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/openlineage/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class DagRunInfo(InfoJsonEncodable):
class TaskInstanceInfo(InfoJsonEncodable):
"""Defines encoding TaskInstance object to JSON."""

includes = ["duration", "try_number", "pool", "queued_dttm"]
includes = ["duration", "try_number", "pool", "queued_dttm", "log_url"]
casts = {
"map_index": lambda ti: (
ti.map_index if hasattr(ti, "map_index") and getattr(ti, "map_index") != -1 else None
Expand Down

0 comments on commit 2f0bba0

Please sign in to comment.