You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Andrew Jones (JIRA)" <ji...@apache.org> on 2017/10/09 13:11:00 UTC

[jira] [Commented] (AIRFLOW-1673) dagrun.dependency-check stat contains space in metric name

    [ https://issues.apache.org/jira/browse/AIRFLOW-1673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16196926#comment-16196926 ] 

Andrew Jones commented on AIRFLOW-1673:
---------------------------------------

Actually I don't think this should have the date/time in the stat name anyway, as that doesn't make much sense. The date and time of the event will already be captured.

Locally I've just removed the {{execution_date}} from the name, so it looks like this:

{code}
Stats.timing("dagrun.dependency-check.{}".format(self.dag_id), duration)
{code}

This works fine for us. Will submit a PR.

> dagrun.dependency-check stat contains space in metric name
> ----------------------------------------------------------
>
>                 Key: AIRFLOW-1673
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1673
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.8.2
>            Reporter: Andrew Jones
>            Priority: Minor
>
> In {{models.py}}, we save a stat with the [following code|https://github.com/apache/incubator-airflow/blob/afd927a256d8ff97e59b28a3caf81ac0bf0d07f3/airflow/models.py#L4563]:
> {code}
> Stats.timing("dagrun.dependency-check.{}.{}".
>                      format(self.dag_id, self.execution_date), duration)
> {code}
> {{self.execution_date}} is introducing a space in the metric name, so what gets sent to stats is something like this:
> {code}
> airflow.dagrun.dependency-check.dagid.2017-09-25 00:00:00:32.253000|ms
> {code}
> A space isn't valid here and should be removed.
> We could either remove the space from the datetime, save only the date, or remove the datetime from the stat name completely.
> Maybe just change {{self.execution_date}} to {{self.execution_date.isoformat()}}?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)