|
| 1 | +--- |
| 2 | +title:"Datadog integration" |
| 3 | +description:"Integrate Codefresh with Datadog for monitoring and analysis" |
| 4 | +group:integrations |
| 5 | +toc:true |
| 6 | +--- |
| 7 | + |
| 8 | +Codefresh allows you to integrate with Datadog to analyze monitoring and performance data within Codefresh. |
| 9 | +For |
| 10 | + |
| 11 | +To integrate, you need: |
| 12 | +A Datadog account, and know the region to which to connect |
| 13 | +An API token |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +To enable the analysis sign up for a free account with Codecov and add a new project. |
| 18 | +##Get API token from Datadog account |
| 19 | +If you already have a Datadog account, you can copy the API key from your account. Otherwise, generate a new API key. |
| 20 | + |
| 21 | +1. Log in to your Datadog account. |
| 22 | +1. Go to**Organization Settings**, and select**API Keys**. |
| 23 | + |
| 24 | + {% include image.html |
| 25 | +lightbox="true" |
| 26 | +file="/images/integrations/datadog/datadog-api-key.png" |
| 27 | +url="/images/integrations/datadog/datadog-api-key.png" |
| 28 | +max-width="70%" |
| 29 | +caption="Getting an API Key from Datadog" |
| 30 | +alt="Getting an API Key from Datadog" |
| 31 | +%} |
| 32 | + |
| 33 | +From this screen make sure you note down the Token as you will use it in Codefresh. |
| 34 | + |
| 35 | +Next, go into your Codefresh account settings and choose CodeCov from[integrations](https://g.codefresh.io/account-admin/account-conf/integration). Click the add integration button: |
| 36 | + |
| 37 | +{% include image.html |
| 38 | +lightbox="true" |
| 39 | +file="/images/integrations/codecov-integration/codecovintegration.png" |
| 40 | +url="/images/integrations/codecov-integration/codecovintegration.png" |
| 41 | +max-width="70%" |
| 42 | +caption="Enter Token" |
| 43 | +alt="Enter Token" |
| 44 | +%} |
| 45 | + |
| 46 | +Enter the following: |
| 47 | +***Integration name**: The user-defined name for this integration. The name should be unique for each integration that you add. |
| 48 | +***Token**: The token (see the previous section) for this integration. |
| 49 | +***Url**: The base URL for this integration. Do not add the trailing slash to the URL definition. For more information, see the[official Codecov documentation](https://docs.codecov.com/docs/configuration#codecov-url){:target="\_blank"}. |
| 50 | + |
| 51 | + |
| 52 | +Using Codecov in a Codefresh Pipeline: |
| 53 | + |
| 54 | +With the integration in place, you can use it by name in any Codefresh pipeline by using the[Codecov reporter step](https://codefresh.io/steps/step/codecov-reporter). |
| 55 | + |
| 56 | +`codefresh.yml` |
| 57 | +```yaml |
| 58 | +codecov-report: |
| 59 | +stage: "prepare" |
| 60 | +title: Codecov report |
| 61 | +type: codecov-reporter |
| 62 | +arguments: |
| 63 | +codecov_integration:my-codecov-integration |
| 64 | +``` |
| 65 | +
|
| 66 | +For more details see our [Codecov example](https://codefresh.io/docs/docs/yaml-examples/examples/codecov-testing/). |
| 67 | +
|