howardyoo / airflow_otel_provider

Airflow Provider for OpenTelemetry
Apache License 2.0
3 stars 2 forks source link

feature: support of link button for the observability backend (for task instances) #8

Closed howardyoo closed 1 month ago

howardyoo commented 2 months ago

In the DAG run page, it may be great to have a button that, when someone clicks, could open up the web page of the observability backend that shows the trace itself.

Since there can be many varients of the backend, defining the link could be done via environment variable that can be set as a link template. For example, if there exists an airflow config such as:

AIRFLOWTRACESBUTTON_LINK=View Trace in Honeycomb|https://ui.honeycomb.io/{env.team}/environments/{env.env}/datasets/{env.dataset}/trace?trace_id={trace_id}&span={span_id}&trace_start_ts={trace_start}&trace_end_ts={trace_end}

will allow button to appear in the extra links that will have "View Trace in Honeycomb" (example:)

image

that will redirect to the Honeycomb's UI.

Supported 'variable' could be

variables are enclosed with { } to denote it. in order to scape the '{' '}' character, simply use '{{' and '}}'.

howardyoo commented 1 month ago

Fixed with release https://github.com/howardyoo/airflow_otel_provider/releases/tag/1.0.3