You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "seblum (via GitHub)" <gi...@apache.org> on 2024/02/06 09:50:00 UTC

[I] Custom stat_name_handler documentation is sparse [airflow]

seblum opened a new issue, #37194:
URL: https://github.com/apache/airflow/issues/37194

   ### What do you see as an issue?
   
   The documentation about setting a custom statsd `stat_name_handler` is sparse and also fairly clustered over different pages. It is also missing some information.
   
   I'm trying to set a custom statsd [stat_name_handler](https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#stat-name-handler) for Airflow 2.6.3 (part of GCP Composer 2) to prevent the DAGs from failing with airflow.exceptions.InvalidStatsNameException - e.g. due to the stat_name exceeding a length of 250 characters.
   
   I haven't found much documentation about this topic: I know from the [Metrics configuration](https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/logging-monitoring/metrics.html#rename-metrics) of an example function. According to the [release notes](https://airflow.apache.org/docs/apache-airflow/stable/release_notes.html) I know I should set the function to be referenced with a dotted path, which is also what I see in the [Airflow source](https://github.com/apache/airflow/blob/8fb4c71857324fa2366179819830d53f32ef5a3f/tests/core/test_stats.py#L507).
   
   What is missing is where the custom function should be stored at. Or also how I should link it. 
   I tried several things by now, e.g. follow the [Airflow module management guide](https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/modules_management.html) and creating the folder structure under the dag folder - which should be added to the PYTHONPATH by Airflow - but so far the custom module is not recognized. 
   The documentation does not give any hints whether this is actually the right approach for the `stat_name_handler`
   
   ### Solving the problem
   
   Ideally, the [Metrics configuration](https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/logging-monitoring/metrics.html#rename-metrics) would give an example on where to store the custom function and how it can be referenced.
   
   Further, the [stat_name_handler configuration](https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#stat-name-handler) should likely specify that the function should be referenced with a dotted path.
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Custom stat_name_handler documentation is sparse [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #37194: Custom stat_name_handler documentation is sparse
URL: https://github.com/apache/airflow/issues/37194


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Custom stat_name_handler documentation is sparse [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #37194:
URL: https://github.com/apache/airflow/issues/37194#issuecomment-2642093200

   This issue has been automatically marked as stale because it has been open for 365 days without any activity. There has been several Airflow releases since last activity on this issue. Kindly asking to recheck the report against latest Airflow version and let us know if the issue is reproducible. The issue will be closed in next 30 days if no further activity occurs from the issue author.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Custom stat_name_handler documentation is sparse [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #37194:
URL: https://github.com/apache/airflow/issues/37194#issuecomment-2709610483

   This issue has been closed because it has not received response from the issue author.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Custom stat_name_handler documentation is sparse [airflow]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #37194:
URL: https://github.com/apache/airflow/issues/37194#issuecomment-1929144907

   Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org