Skip to content

Commit

Permalink
Merge pull request #18965 from lrafeei/python-release-10_2_0
Browse files Browse the repository at this point in the history
Python agent release v10.2.0
  • Loading branch information
jeff-colucci authored Oct 15, 2024
2 parents 5f081da + 3f22ced commit f383c6b
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5380,8 +5380,8 @@ Here are assorted other settings available via the agent configuration file.
</Collapser>

<Collapser
id="k8s_operator.enabled"
title="k8s_operator.enabled"
id="NEW_RELIC_K8S_OPERATOR_ENABLED"
title="NEW_RELIC_K8S_OPERATOR_ENABLED"
>
<table>
<tbody>
Expand Down Expand Up @@ -5411,7 +5411,7 @@ Here are assorted other settings available via the agent configuration file.
</th>

<td>
Config file, environment variable
Environment variable
</td>
</tr>

Expand All @@ -5429,7 +5429,61 @@ Here are assorted other settings available via the agent configuration file.

This is an informational setting used to report when the agent is injected into a Kubernetes cluster.
<Callout variant="caution">
This setting does **not** enable/disable this function of the agent.
This setting does **not** enable or disable this function of the agent.
</Callout>
</Collapser>

<Collapser
id="NEW_RELIC_AZURE_OPERATOR_ENABLED"
title="NEW_RELIC_AZURE_OPERATOR_ENABLED"
>
<table>
<tbody>
<tr>
<th>
Type
</th>

<td>
Boolean
</td>
</tr>

<tr>
<th>
Default
</th>

<td>
false
</td>
</tr>

<tr>
<th>
[Set in](#options)
</th>

<td>
Environment variable
</td>
</tr>

<tr>
<th>
[Environ variable](#environment-variables)
</th>

<td>
`NEW_RELIC_AZURE_OPERATOR_ENABLED`
</td>
</tr>
</tbody>
</table>

This is an informational setting used to report when the agent is injected into a Microsoft Azure Container App.
<Callout variant="caution">
This setting does **not** enable or disable this function of the agent.
</Callout>
</Collapser>
</CollapserGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ This can be done through the Azure Portal or the Azure CLI.
3. Jump to "Environment variables" tab and enter the following:
* `NEW_RELIC_APP_NAME`: [desired app name]
* `PYTHONPATH`: `/mnt/instrumentation`
* `NEW_RELIC_K8S_OPERATOR_ENABLED`: `True`
* `NEW_RELIC_AZURE_OPERATOR_ENABLED`: `True`
* `NEW_RELIC_LICENSE_KEY` > Reference a secret > select the secret name from Step 1 (or manually enter the license key)
4. Go to "Volume Mounts" tab and select the volume mount created in Step 2. The mount path should be `/mnt/instrumentation`.
5. Save your changes.
Expand Down Expand Up @@ -137,7 +137,7 @@ This can be done through the Azure Portal or the Azure CLI.

### Add environment variables [#add-env-vars-cli]

`az containerapp update --name $CONTAINER_APP_NAME --resource-group $RESOURCE_GROUP --set-env-vars "NEW_RELIC_APP_NAME=$NEW_RELIC_APP_NAME" "NEW_RELIC_K8S_OPERATOR_ENABLED=True" "NEW_RELIC_LICENSE_KEY=secretref:license-key" "PYTHONPATH="/mnt/instrumentation`
`az containerapp update --name $CONTAINER_APP_NAME --resource-group $RESOURCE_GROUP --set-env-vars "NEW_RELIC_APP_NAME=$NEW_RELIC_APP_NAME" "NEW_RELIC_AZURE_OPERATOR_ENABLED=True" "NEW_RELIC_LICENSE_KEY=secretref:license-key" "PYTHONPATH="/mnt/instrumentation`

</Step>
<Step>
Expand Down Expand Up @@ -252,7 +252,7 @@ This can be done through the Azure Portal or the Azure CLI:
* `NEW_RELIC_APP_NAME`: Your Linux Azure website name
* `NEW_RELIC_LICENSE_KEY`: Your New Relic <InlinePopover type="licenseKey" />
* `PYTHONPATH`: `/home:/home/workspace/newrelic`
* `NEW_RELIC_K8S_OPERATOR_ENABLED`: `True`
* `NEW_RELIC_AZURE_OPERATOR_ENABLED`: `True`
3. Save your settings.

If a specific agent version is desired, add the `AGENT_VERSION` environment variable with the version number, prepended by `v` (e.g. `v10.0.0`).
Expand Down Expand Up @@ -283,7 +283,7 @@ This can be done through the Azure Portal or the Azure CLI:
</Step>
<Step>
### Add necessary environment variables
`az webapp config appsettings set --name ${WEB_APP_NAME} --resource-group ${RESOURCE_GROUP} --settings NEW_RELIC_LICENSE_KEY=$NEW_RELIC_LICENSE_KEY NEW_RELIC_K8S_OPERATOR_ENABLED=true NEW_RELIC_APP_NAME="Azure Service App" PYTHONPATH="/home:/home/workspace/newrelic"`
`az webapp config appsettings set --name ${WEB_APP_NAME} --resource-group ${RESOURCE_GROUP} --settings NEW_RELIC_LICENSE_KEY=$NEW_RELIC_LICENSE_KEY NEW_RELIC_AZURE_OPERATOR_ENABLED=true NEW_RELIC_APP_NAME="Azure Service App" PYTHONPATH="/home:/home/workspace/newrelic"`

If a specific agent version is desired, add the `AGENT_VERSION` environment variable with the version number, prepended by `v` (e.g. `v10.0.0`) as shown in the example below:

Expand All @@ -301,7 +301,7 @@ This can be done through the Azure Portal or the Azure CLI:

</CollapserGroup>

## Troubleshooting [#troubleshooting]
### Troubleshooting [#troubleshooting]

In some cases, telemetry may not be available, or that the `prebuild.sh` script may cause the existing application to fail re-deployment. To remedy this, enable these environment variables:

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
subject: 'Python agent'
releaseDate: '2024-10-15'
version: 10.2.0
downloadLink: 'https://pypi.python.org/pypi/newrelic'
features: ['Add Azure Operator Flag']
bugs: []
security: []
---

## Notes

This release of the Python agent adds a flag for the Azure init container operator.

Install the agent using `easy_install/pip/distribute` via the [Python Package Index](https://pypi.python.org/pypi/newrelic) or download it directly from the [New Relic download site](https://download.newrelic.com/python_agent/release).

## New features

* Add Azure Init Container Operator Flag

* New Relic can be integrated into applications hosted on Microsoft Azure, either [directly](/docs/apm/agents/python-agent/hosting-services/python-azure-containerapps-appservice), through an [init container](/docs/apm/agents/python-agent/hosting-services/python-azure-touchless-integration#integrate-agent-container-app) for [Azure Container Apps](https://learn.microsoft.com/en-us/azure/container-apps/overview), or a [pre-build startup script](/docs/apm/agents/python-agent/hosting-services/python-azure-touchless-integration#integrate-agent-app-service) for [Microsoft Azure App Service](https://learn.microsoft.com/en-us/azure/app-service/overview). You can flag that this is the installation method used by setting the `NEW_RELIC_AZURE_OPERATOR_ENABLED` environment variable.

## Support statement

We recommend updating to the latest agent version as soon as it's available. If you can't upgrade to the latest version, update your agents to a version no more than 90 days old. Read [more](/docs/new-relic-solutions/new-relic-one/install-configure/update-new-relic-agent/) about keeping agents up to date.

See the New Relic Python agent [EOL policy](/docs/apm/agents/python-agent/getting-started/python-agent-eol-policy/) for information about agent releases and support dates.

0 comments on commit f383c6b

Please sign in to comment.