Skip to content

Commit

Permalink
Merge pull request #6957 from umaannamalai/python-codestream-integration
Browse files Browse the repository at this point in the history
Add CodeStream Integration Docs for Python Agent
  • Loading branch information
bradleycamacho committed Apr 6, 2022
2 parents 0ff7713 + 9daa1e6 commit 100b226
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 0 deletions.
Expand Up @@ -3667,6 +3667,53 @@ These garbage collection runtime metrics settings are available via the agent co
</Collapser>
</CollapserGroup>

## New Relic CodeStream settings [#codestream-integration]

The following settings are available for configuration of CodeStream code level metrics in the agent.

<CollapserGroup>
<Collapser
id="code_level_metrics.enabled"
title="code_level_metrics.enabled"
>
<table>
<tbody>
<tr>
<th>
Type
</th>

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

<tr>
<th>
Default
</th>

<td>
`true`
</td>
</tr>

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

<td>
Config file
</td>
</tr>
</tbody>
</table>

Set this to `false` to disable agent attribute collection for code level metrics.
</Collapser>
</CollapserGroup>

## Other configuration settings [#other-settings]

Here are assorted other settings available via the agent configuration file.
Expand Down
@@ -0,0 +1,108 @@
---
title: New Relic CodeStream integration
tags:
- Agents
- Python agent
- Supported features
metaDescription: The Python agent can be integrated with New Relic CodeStream to provide code level metrics.
redirects:
- /docs/agents/python-agent/supported-features/python-codestream-integration
- /docs/python/python-codestream-integration
---

Display context-sensitive APM data directly in your IDE by integrating [New Relic CodeStream](docs/codestream/start-here/what-is-codestream) with the Python agent. Visualize code-level production tleemetry in your editor as your write and review code with this integration.

## Getting started

First, [install](docs/codestream/start-here/install-codestream) the New Relic CodeStream extension into your supported IDE of choice and login.

<Callout variant="important">
The New Relic CodeStream integration is available in Python Agent version 7.10.0.175 and higher and is enabled by default. To change this configuration, check out our documentation.
</Callout>

## Agent attributes

The Python agent reports and attaches the following attributes to spans produced by your application:

<table>
<thead>
<tr>
<th>
**Name**
</th>

<th>
**Description**
</th>

<th>
**Example**
</th>
</tr>
</thead>

<tbody>
<tr>
<td>
`code.function`
</td>

<td>
The name of the instrumented function
</td>

<td>
validate_credentials
</td>
</tr>

<tr>
<td>
`code.filepath`
</td>

<td>
The absolute path to the source code file in which `code.function` is defined
</td>

<td>
/usr/local/apps/test-app/main.py
</td>
</tr>

<tr>
<td>
`code.lineno`
</td>

<td>
The line number where `code.function` is defined in code.filepath
</td>

<td>
639
</td>
</tr>

<tr>
<td>
`code.namespace`
</td>

<td>
The namespace (class/ module name) in which `code.function` is defined
</td>

<td>
example.service.MyService
</td>
</tr>
</tbody>
</table>

<Callout variant="important">
Not every function in your application code will be instrumented with the above attributes. In some cases, the agent will directly wrap base framework code (ie. Django, Flask, etc.) that is invoked within your application and will not display within your IDE.

</Callout>


2 changes: 2 additions & 0 deletions src/nav/apm.yml
Expand Up @@ -917,6 +917,8 @@ pages:
- title: Supported features
path: /docs/apm/agents/python-agent/supported-features
pages:
- title: New Relic CodeStream integration
path: /docs/apm/agents/python-agent/supported-features/python-codestream-integration
- title: Custom metrics
path: /docs/apm/agents/python-agent/supported-features/python-custom-metrics
- title: Runtime metrics
Expand Down

0 comments on commit 100b226

Please sign in to comment.