通过Azure Devops部署时,提供应用程序洞察力的代理路径到Azure功能

发布于 2025-02-08 21:17:41 字数 836 浏览 3 评论 0原文

我们使用Docker映像部署Azure函数。应用程序见解代理人在此处指定提供: Java- Azure应用程序洞察动态跟踪不使用Docker Images

当通过MVN Azure -runctions部署时,这可以正常工作:部署:部署。但是使用Azure Dev-ops部署时行不通。这些步骤是:

  1. 我们创建Docker映像并将其发布到ACR中
  2. ,然后我们将Docker映像提供到以下任务:

这是ADO任务,

- task: AzureFunctionAppContainer@1
  displayName: 'Azure Function App on Container Deploy: $(orchestratorfunctionappName)'
  inputs:
    azureSubscription: '${{ parameters.environments.serviceConnectionId }}'
    appName: appName
    imageName: 'appImage'

没有明确的文档可以提供java_opts PATH。

We deploy Azure Function using the docker image. The application insights agent is manually provided as specified here: Java - Azure Application Insights Dynamic Tracing not working with docker images

This works fine when deployed via mvn azure-functions:deploy. But doesn't work when deployed using azure dev-ops. These are the steps:

  1. We create the docker image and publish it to ACR
  2. We then provide the docker image to the below task:

Here is the ADO task

- task: AzureFunctionAppContainer@1
  displayName: 'Azure Function App on Container Deploy: $(orchestratorfunctionappName)'
  inputs:
    azureSubscription: '${{ parameters.environments.serviceConnectionId }}'
    appName: appName
    imageName: 'appImage'

There is no clear documentation to provide the JAVA_OPTS path

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

当梦初醒 2025-02-15 21:17:41

下面对我有用:

- task: AzureFunctionAppContainer@1
  displayName: 'Azure Function App on Container Deploy: $(orchestratorfunctionappName)'
  inputs:
    azureSubscription: '${{ parameters.environments.serviceConnectionId }}'
    appName: appName
    imageName: 'appImage'
    appSettings: '-JAVA_OPTS "-javaagent:/home/site/wwwroot/applicationinsights-agent.jar"'

代理需要在图像上的该路径上存在。 ( Ref

Below worked for me:

- task: AzureFunctionAppContainer@1
  displayName: 'Azure Function App on Container Deploy: $(orchestratorfunctionappName)'
  inputs:
    azureSubscription: '${{ parameters.environments.serviceConnectionId }}'
    appName: appName
    imageName: 'appImage'
    appSettings: '-JAVA_OPTS "-javaagent:/home/site/wwwroot/applicationinsights-agent.jar"'

The agent needs to exist at that path on the image. (ref)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文