Skip to content

Commit

Permalink
Merge pull request #18000 from brnhensley/patch-43
Browse files Browse the repository at this point in the history
chore: add syntax highlighting to codeblocks
  • Loading branch information
bradleycamacho committed Jul 12, 2024
2 parents 42d71a7 + 4aa5984 commit 515670a
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ These examples all assume that your Azure Web App uses a `D:` file system root.

The environment variables that appear in the <DNT>**Environment**</DNT> tab in Kudu's <DNT>**Process Explorer**</DNT> should be similar to these:

```env
```ini
CORECLR_ENABLE_PROFILING = 1
CORECLR_PROFILER = {36032161-FFC0-4B61-B559-F6C5D41BAE5A}
CORECLR_PROFILER_PATH = /home/site/wwwroot/newrelic/libNewRelicProfiler.so
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ To install the .NET agent for ASP.NET Core web applications deployed to AWS Elas
id="elastic-beanstalk-windows"
title="Windows"
>
```
packages:
msi:
# install the latest version of the New Relic .NET agent
# To install a specific version, update the path to the msi
dotnet: https://download.newrelic.com/dot_net_agent/latest_release/NewRelicDotNetAgent_x64.msi
```yml
packages:
msi:
# install the latest version of the New Relic .NET agent
# To install a specific version, update the path to the msi
dotnet: https://download.newrelic.com/dot_net_agent/latest_release/NewRelicDotNetAgent_x64.msi
option_settings:
aws:elasticbeanstalk:application:environment:
CORECLR_ENABLE_PROFILING: '1'
NEW_RELIC_LICENSE_KEY: 'YOUR_LICENSE_KEY'
NEW_RELIC_APP_NAME: 'YOUR_APP_NAME'
aws:elasticbeanstalk:application:environment:
CORECLR_ENABLE_PROFILING: "1"
NEW_RELIC_LICENSE_KEY: "YOUR_LICENSE_KEY"
NEW_RELIC_APP_NAME: "YOUR_APP_NAME"
```

The <InlinePopover type="licenseKey" /> and app name aren't required environment variables; they [can be set in other ways](/docs/agents/net-agent/installation/net-agent-install-resources#env-variables).
Expand All @@ -58,8 +58,8 @@ To install the .NET agent for ASP.NET Core web applications deployed to AWS Elas
id="elastic-beanstalk-linux"
title="Amazon Linux 2023"
>
```
commands:
```yml
commands:
install_dotnet_agent:
command: |
sudo curl -o /etc/yum.repos.d/newrelic-dotnet-agent.repo https://download.newrelic.com/dot_net_agent/yum/newrelic-dotnet-agent.repo
Expand All @@ -70,12 +70,12 @@ To install the .NET agent for ASP.NET Core web applications deployed to AWS Elas
# sudo yum install newrelic-dotnet-agent-10.24.0-1.x86_64
option_settings:
aws:elasticbeanstalk:application:environment:
CORECLR_ENABLE_PROFILING: '1'
CORECLR_PROFILER: '{36032161-FFC0-4B61-B559-F6C5D41BAE5A}'
CORECLR_NEWRELIC_HOME: '/usr/local/newrelic-dotnet-agent'
CORECLR_PROFILER_PATH: '/usr/local/newrelic-dotnet-agent/libNewRelicProfiler.so'
NEW_RELIC_LICENSE_KEY: 'YOUR_LICENSE_KEY'
NEW_RELIC_APP_NAME: 'YOUR_APP_NAME'
CORECLR_ENABLE_PROFILING: "1"
CORECLR_PROFILER: "{36032161-FFC0-4B61-B559-F6C5D41BAE5A}"
CORECLR_NEWRELIC_HOME: "/usr/local/newrelic-dotnet-agent"
CORECLR_PROFILER_PATH: "/usr/local/newrelic-dotnet-agent/libNewRelicProfiler.so"
NEW_RELIC_LICENSE_KEY: "YOUR_LICENSE_KEY"
NEW_RELIC_APP_NAME: "YOUR_APP_NAME"
```

The <InlinePopover type="licenseKey" /> and app name aren't required environment variables; they [can be set in other ways](/docs/agents/net-agent/installation/net-agent-install-resources#env-variables).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ This procedure assumes you installed the .NET agent with the MSI installer:
3. Follow the prompts to complete uninstallation.
4. Restart IIS.

After uninstalling the agent, you may want to remove all agent-related files. Be sure to check other paths to remove any other New Relic files. For example, uninstalling the .NET agent does not delete your <DNT>**[newrelic.config](/docs/agents/net-agent/installation-configuration/net-agent-configuration#config-options-precedence)**</DNT> file.
After uninstalling the agent, you may want to remove all agent-related files. Be sure to check other paths to remove any other New Relic files. For example, uninstalling the .NET agent does not delete your [`newrelic.config`](/docs/agents/net-agent/installation-configuration/net-agent-configuration#config-options-precedence) file.

1. From <DNT>**Control Panel > Programs > Programs and Features**</DNT>, right-click and delete any files named `New Relic .NET Agent`.
2. Delete the entire folder at `C:\ProgramData\New Relic\.NET Agent`.
Expand All @@ -58,9 +58,9 @@ To uninstall the .NET agent on Linux, use your package management tool.
id="apt-uninstall"
title="Uninstall with apt (Debian, Ubuntu, and Linux Mint)"
>
Execute the following command as root (or using sudo):
Execute the following command as root (or using `sudo`):

```
```sh
apt-get remove newrelic-dotnet-agent
```
</Collapser>
Expand All @@ -69,9 +69,9 @@ To uninstall the .NET agent on Linux, use your package management tool.
id="dpkg-uninstall"
title="Uninstall with dpkg (Debian, Ubuntu, and Linux Mint)"
>
Execute the following command as root (or using sudo):
Execute the following command as root (or using `sudo`):

```
```sh
dpkg --remove newrelic-dotnet-agent
```
</Collapser>
Expand All @@ -80,9 +80,9 @@ To uninstall the .NET agent on Linux, use your package management tool.
id="yum-uninstall"
title="Uninstall with yum (CentOS, Red Hat Enterprise Linux, Oracle Linux)"
>
Execute the following command as root (or using sudo):
Execute the following command as root (or using `sudo`):

```
```sh
yum remove newrelic-dotnet-agent
```
</Collapser>
Expand All @@ -91,9 +91,9 @@ To uninstall the .NET agent on Linux, use your package management tool.
id="rpm-uninstall"
title="Uninstall with rpm (CentOS, Red Hat Enterprise Linux, Oracle Linux)"
>
Execute the following command as root (or using sudo):
Execute the following command as root (or using `sudo`):

```
```sh
sudo rpm -e newrelic-dotnet-agent
```
</Collapser>
Expand All @@ -105,7 +105,7 @@ To uninstall the .NET agent on Linux, use your package management tool.
1. Delete all New Relic files from your app folder.
2. Unset New Relic environment variables:

```
```ini
CORECLR_ENABLE_PROFILING=1
CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}
CORECLR_NEWRELIC_HOME=PATH_TO_INSTALL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Read about how to confirm the checksum for New Relic's .NET agent installers. If

On Linux, run:

```
```sh
sha256sum YOUR_FILENAME
```

Expand All @@ -34,7 +34,7 @@ On Windows, we recommended using either `CertUtil` or `Get-FileHash` to compute

To compute the hash, run:

```
```sh
CertUtil -hashfile YOUR_FILENAME SHA256
```

Expand All @@ -54,7 +54,7 @@ On Windows, we recommended using either `CertUtil` or `Get-FileHash` to compute

To compute the hash, run:

```
```powershell
Get-FileHash YOUR_FILENAME Algorithm SHA256 | Format-List
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@ Before enabling OpenTelemetry in Apache Airflow, you'll need to install the Airf
1. Follow the installation instructions from [Airflow's Documentation](https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html).
2. When installing with pip, add the `otel` extra to the command. For example:

```pip install "apache-airflow[otel]"```
```sh
pip install "apache-airflow[otel]"
```

### Option 2: Installing from Docker [#install-docker]

1. Set up the Airflow Docker image using instructions from [Airflow's documentation](https://airflow.apache.org/docs/docker-stack/index.html).
2. Extend the pre-built Docker image by using a Dockerfile to install the `otel` extra. You can replace the latest tag with your desired version of the image.

```
```dockerfile
FROM apache/airflow:latest
RUN pip install --no-cache-dir "apache-airflow[otel]==$AIRFLOW_VERSION"
```
Expand Down Expand Up @@ -78,7 +80,7 @@ Choose one of the following methods to set the required options for Airflow.

1. Set the required options in the `airflow.cfg` file.

```
```ini
[metrics]
otel_on = True
otel_host = localhost
Expand All @@ -88,7 +90,7 @@ Choose one of the following methods to set the required options for Airflow.

2. Or, set the required options as environment variables.

```
```sh
export AIRFLOW__METRICS__OTEL_ON=True
export AIRFLOW__METRICS__OTEL_HOST=localhost
export AIRFLOW__METRICS__OTEL_PORT=4318
Expand Down Expand Up @@ -116,15 +118,17 @@ With Airflow metrics, you can build dashboards around individual pipelines, over
This query retrieves a list of all reported metrics for Airflow:

```sql
SELECT uniques(metricName) FROM Metric WHERE entity.name = 'Airflow' AND metricName LIKE 'airflow.%' SINCE 30 MINUTES AGO LIMIT 100
SELECT uniques(metricName) FROM Metric WHERE entity.name = 'Airflow'
AND metricName LIKE 'airflow.%' SINCE 30 MINUTES AGO LIMIT 100
```

Make sure to change the limit (`100`) if your metric names exceed it.

This query shows a comparison of different completion times for successful runs of different DAGs:

```sql
SELECT latest(airflow.dagrun.duration.success) FROM Metric FACET dag_id WHERE entity.name = 'Airflow' SINCE 30 minutes AGO TIMESERIES
SELECT latest(airflow.dagrun.duration.success) FROM Metric
FACET dag_id WHERE entity.name = 'Airflow' SINCE 30 minutes AGO TIMESERIES
```

<img
Expand All @@ -136,7 +140,8 @@ SELECT latest(airflow.dagrun.duration.success) FROM Metric FACET dag_id WHERE en
This query shows counts of failed DAG runs, which can be used to build <InlinePopover type="alerts" /> for critical pipelines:

```sql
SELECT count(airflow.dagrun.duration.failed) FROM Metric FACET dag_id WHERE entity.name = 'Airflow' SINCE 30 minutes AGO TIMESERIES
SELECT count(airflow.dagrun.duration.failed) FROM Metric
FACET dag_id WHERE entity.name = 'Airflow' SINCE 30 minutes AGO TIMESERIES
```

<img
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,25 @@ To install the infrastructure agent on instances launched with AWS Elastic Beans
id="linux-2"
title="Amazon Linux 2"
>
```
```yml
files:
"/etc/newrelic-infra.yml" :
"/etc/newrelic-infra.yml":
mode: "000644"
owner: root
group: root
content: |
license_key: YOUR_LICENSE_KEY
commands:
# Create the agent’s yum repository
# Create the agent’s yum repository
"01-agent-repository":
command: sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/amazonlinux/2/x86_64/newrelic-infra.repo
#
# Update your yum cache
#
# Update your yum cache
"02-update-yum-cache":
command: yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra'
#
# Run the installation script
#
# Run the installation script
"03-run-installation-script":
command: sudo yum install newrelic-infra -y
```
Expand All @@ -66,25 +66,25 @@ To install the infrastructure agent on instances launched with AWS Elastic Beans
id="linux-2023"
title="Amazon Linux 2023"
>
```
```yml
files:
"/etc/newrelic-infra.yml" :
"/etc/newrelic-infra.yml":
mode: "000644"
owner: root
group: root
content: |
license_key: YOUR_LICENSE_KEY
commands:
# Create the agent’s yum repository
# Create the agent’s yum repository
"01-agent-repository":
command: sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/amazonlinux/2023/x86_64/newrelic-infra.repo
#
# Update your yum cache
#
# Update your yum cache
"02-update-yum-cache":
command: yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra'
#
# Run the installation script
#
# Run the installation script
"03-run-installation-script":
command: sudo yum install newrelic-infra -y
```
Expand All @@ -94,7 +94,7 @@ To install the infrastructure agent on instances launched with AWS Elastic Beans
id="deploy-infrastructure"
title="Windows"
>
```
```yml
packages:
msi:
infrastructure: https://download.newrelic.com/infrastructure_agent/windows/newrelic-infra.msi
Expand Down Expand Up @@ -136,23 +136,23 @@ To uninstall the agent, update the `newrelic.config` from `.ebextensions` with t
id="uninstall-agent-linux-ami"
title="Amazon Linux"
>
```
commands:
# Remove agent configuration file
"04-agent-remove-config":
command: sudo rm /etc/newrelic-infra.yml
#
# Uninstall infra agent
"05-agent-uninstall":
command: sudo yum remove newrelic-infra -y
```
```yml
commands:
# Remove agent configuration file
"04-agent-remove-config":
command: sudo rm /etc/newrelic-infra.yml
#
# Uninstall infra agent
"05-agent-uninstall":
command: sudo yum remove newrelic-infra -y
```
</Collapser>

<Collapser
id="uninstall-infrastructure"
title="Windows"
>
```
```yml
commands:
03_uninstall-newrelic-infra:
command: wmic product where name="New Relic Infrastructure Agent" call uninstall
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ View more installation options on [PuppetForge](https://forge.puppet.com/modules

```shell
sudo puppet module install ~/newrelic-newrelic_installer-0.1.0.tar.gz
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
Notice: Downloading from https://forgeapi.puppet.com ...
Notice: Installing -- do not interrupt ...
/etc/puppetlabs/code/environments/production/modules
└─┬ newrelic-newrelic_installer (v0.1.0)
├── lwf-remote_file (v1.1.3)
└── puppetlabs-powershell (v5.2.0)
[output] Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
[output] Notice: Downloading from https://forgeapi.puppet.com ...
[output] Notice: Installing -- do not interrupt ...
[output] /etc/puppetlabs/code/environments/production/modules
[output] └─┬ newrelic-newrelic_installer (v0.1.0)
[output] ├── lwf-remote_file (v1.1.3)
[output] └── puppetlabs-powershell (v5.2.0)
```

## Run `newrelic-newrelic_installer` module [#beginning]
Expand Down

0 comments on commit 515670a

Please sign in to comment.