-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Resources.Azure] Add support for Container App Jobs #2064
[Resources.Azure] Add support for Container App Jobs #2064
Conversation
|
Please update CHANGELOG.md and README.md. I will leave logic review for @rajkumar-rangaraj and @TimothyMothra. |
@Kielek done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks.
…om/hansmbakker/opentelemetry-dotnet-contrib into feature/container_app_job-detector
Hi @hansmbakker, thanks for the contribution. Were you able to test this in a sample app to confirm that this Environment Variable exists? @rajkumar-rangaraj, do we need to get this reviewed from anyone on the service team to confirm we can take a dependency on this environment variable? Do we need to share this with the other languages to make the same change? |
Co-authored-by: Timothy Mothra <[email protected]>
…om/hansmbakker/opentelemetry-dotnet-contrib into feature/container_app_job-detector
@TimothyMothra I created a sample app and added it in the last commit. I connected it to application insights.
Application map (note that it now correctly shows the job name instead of
|
@TimothyMothra if you're reaching out to the service team anyway, it would be good to request more useful environment variables - it would be nice to also log the image name and image tag for example. |
examples/Azure/Example.ContainerAppJob/IHostApplicationBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ve engaged the Azure Container Apps team to confirm whether we can reliably use the environment variables CONTAINER_APP_JOB_NAME
and CONTAINER_APP_JOB_EXECUTION_NAME
. Until we receive confirmation, I recommend putting this PR on hold.
I am okay to merge the PR, given this package is experimental anyway. If we chose to merge now, lets add an explicit warning to the ACAJobs methods/doc that this is highly experimental and subject to even more change (or similar wording to indicate the unstability part). @hansmbakker do you prefer to merge now (with a additional doc warning suggested above) OR wait for an official confirmation from ACA team on this? |
I'm in favor of waiting before we merge. Users aren't blocked and can write their own resource detector for the short term. @rajkumar-rangaraj do you have any estimate on how long till we get a response from the server team? As this week is Hackathon, I wouldn't expect a response this week. @cijothomas would you be comfortable waiting 2-3 weeks for a response? I'd like to avoid extra churn if possible :) |
@cijothomas I'm ok with waiting for a confirmation if it's a reasonable timeframe 👍🏼 I understand it's better to avoid unnecessary changes if we can prevent them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I received confirmation that we can rely on these environment variables for ACA jobs.
@hansmbakker, tests are failing. Could you please fix it? |
@Kielek the app name / job name env vars were not cleared in between tests which caused the test failure. This should be fixed now |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2064 +/- ##
==========================================
+ Coverage 73.91% 83.89% +9.97%
==========================================
Files 267 6 -261
Lines 9615 149 -9466
==========================================
- Hits 7107 125 -6982
+ Misses 2508 24 -2484
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Fixes #2036
Design discussion issue #
Changes
This adds support for the detection of Container App Jobs and fixes the issue that normal Container App are recognized but that containers running as a ACA Job are shown as
unknown_service:dotnet
.Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes