GitHub user howardyoo added a comment to the discussion: add additional Otel 
traces

That is nice.
So, I did try testing the OTEL_RESOURCE_ATTRIBUTES, and in the breeze
testing mode, it seemed to work fine for me. Airflow deployments can vary
from user to user, but this may help you to verify whether the env variable
is working or not.
1. clone the airflow to your local env.
2. follow the instruction of how to setup breeze in your local env. :
https://github.com/apache/airflow/tree/main/dev/breeze
3. Add the env variable OTEL_RESOURCE_ATTRIBUTES for your integration test.
see the screenshot.
[image: image.png]
What this does is that when you're running breeze, this would insert these
env variable to the docker container that's running the airflow in dev
mode. The integration test is quite helpful when testing otel related
functions.
4. run breeze with '--integration otel' which conveniently sets up otel
collector, grafana, and jaeger for getting the traces
breeze start-airflow --integration otel
You'll see the following containers started up in your docker desktop
[image: image.png]
Now, let's check out the traces.
Go to jaeger. It should be running on port 36686.
There should be a few traces flowing in. Click one of the traces (circle
dot)
[image: image.png]
Now, check for the resource attributes that we put in.
You can see that the
'environment = breeze' and 'purpose = integration-test'
are shown here, meaning
OTEL_RESOURCE_ATTRIBUTES are being properly used.

So, according to a quick test,
it looks like the env. variable is working properly, and being used when
airflow is running, emitting the resource attributes properly.

Now, not every Airflow deployment environment is same, and there may be
cases where env variables may not exist when you're running airflow
processes. Make sure when Airflow is running, or any executors are running,
there exists the necessary env variable for it to read them. Check
thoroughly.

Hope this helps,
Howard

On Fri, Apr 11, 2025 at 4:00 AM praphi-git ***@***.***> wrote:

> someone else reported it yesterday. - #49053
> <https://github.com/apache/airflow/issues/49053>
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/airflow/discussions/48658#discussioncomment-12801486>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AHZNLLSRBMXTAHPAJMEC77L2Y6ACHAVCNFSM6AAAAAB2IXLZPWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEOBQGE2DQNQ>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>


GitHub link: 
https://github.com/apache/airflow/discussions/48658#discussioncomment-12815195

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to