Skip to content

Commit

Permalink
fix(CodeStream): Updated to match our style and consistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
paperclypse committed Oct 25, 2021
1 parent e27db06 commit fe1e66e
Showing 1 changed file with 56 additions and 77 deletions.
Expand Up @@ -3,109 +3,88 @@ title: Performance monitoring with CodeStream
metaDescription: "How to discover and colloborate on errors in CodeStream."
---

The work is done and the code is merged. That’s it, right? Of course not!
Software development isn’t a “Set it and forget it” process. It’s important to
know how your code is performing in production, and whether or not it’s
generating errors. CodeStream’s integration with New Relic One allows you to do
this by bringing performance monitoring right into your IDE.
It’s important to know how your code is performing in production and whether or not it’s generating errors. To help you with this, New Relic CodeStream brings performance monitoring right into your IDE.

Once you’ve [connected CodeStream to your New Relic One
account](/docs/codestream/start-here/codestream-new-relic) you’ll have a couple
of options for discovering errors in your code. From your [Errors
Inbox](/docs/errors-inbox/errors-inbox/) on New Relic One, APM errors with stack
traces will have an Open in IDE button that will allow you to jump right into
your IDE to start investigating the error.
## Connect CodeStream to your New Relic One account [#connect]

![Errors Inbox](/images/ErrorsInbox.png)
Once you’ve [connected CodeStream to your New Relic One account](/docs/codestream/start-here/codestream-new-relic), and you've created one or more workloads with [errors inbox](/docs/errors-inbox/errors-inbox/) on New Relic One, use **Open in IDE** to see APM errors with stack traces directly in your IDE.

You’ll also be able to discover errors right from your IDE with the
[Observability
section](/docs/codestream/codestream-ui-overview/observability-section) of the
CodeStream sidebar. You’ll see open errors assigned to you, as well as recent
errors from any of the repos you have open in your IDE.
![A screenshot of a stack trace error in errors inbox with the "Open in IDE button."](./images/ErrorsInbox.png "A stack trace error in errors inbox with the "Open in IDE button")

![Observability Section](/images/ObservabilitySection.png)
<figcaption>When you've connected New Relic CodeStream to your New Relic One account, in errors inbox click **Open in IDE** to see the code that caused the error.</figcaption>

Whether you open in IDE from the Errors Inbox, or click on an error from the
Observability section, you’ll now see all of the error’s details, including the
stack trace, and you can start collaborating with your teammates on resolution
of the error.
![Error on New Relic One](./images/ErrorOnNR1.png)

![Collaborate on Resolution](/images/Observability-VSC.gif)
Once connected, all of your collaboration work in CodeStream (such as the discussion, assignee, and error status) syncs with New Relic One, where you can continue to collaborate. A typical collaboration session could include developers commenting on code in their IDEs, a DevOps engineer assigning errors in errors inbox, and a development manager following along in Slack. By meeting people in the tools they're already using, New Relic CodeStream shortens the amount of time between error discovery and error resolution.

Click on any frame in the stack trace to jump straight to the corresponding file
and line number in your editor. As you navigate the stack trace, if you come
across some code that seems problematic, just select it and click on the comment
icon that appears next to it in the CodeStream pane.
## CodeStream observability [#observability]

![Code Comment](/images/ErrorCodeComment.png)
In addition to errors inbox, discover errors in your IDE in the [CodeStream observability section](/docs/codestream/codestream-ui-overview/observability-section). In addition to recent errors in your repos, see any specific errors assigned to you.

You’ll see that CodeStream automatically mentions the most recent person to
touch the code, making it easy for you to bring the right people into the
discussion.
![A screenshot of the observability section with recent and assigned stack trace errors.](./images/ObservabilitySection.png "The observability section with recent and assigned stack trace errors.")

![Auto Mention](/images/ErrorAutoMention.png)
<figcaption>Use CodeStream's observability section to keep up to date with recent and assigned stack trace errors.</figcaption>

Once you’ve identified the problem you can assign the error, either to an
existing teammate on CodeStream or to a person suggested based on the
repository’s git commit history.
## Error details [#error-details]

![Assign Error](/images/ErrorAssignee.png)
No matter how you've arrived at an error in your IDE, CodeStream presents all of the error’s details, including the stack trace, and you can collaborate with your teammates to resolve the error.

You can also update the error’s status.
![An animated image that shows someone commenting on a line of code associated with an error.](./images/Observability-VSC.gif "Someone commenting on a line of code associated with an error.")

![Error Status](/images/ErrorStatus.png)
<figcaption>Click any frame in the stack trace to jump straight to the corresponding file and line number in your IDE. As you navigate the stack trace, if you come across code that seems like the source of your problem, select it and click the comment icon to start collaborating.</figcaption>

When you open an error on CodeStream you may see a yellow warning message at the
top indicating that there is no build SHA associated with the error. The build
SHA allows CodeStream to let you know whether or not you’re looking at the same
version of the code that’s running in the environment that triggered the error.
You can associate build SHAs with entities on New Relic One, and by extension,
errors, by [setting an environment variable in your build
pipeline](/docs/codestream/start-here/codestream-new-relic/#buildsha). You can go
ahead and investigate the error even without the build SHA configured, but keep
in mind that you may not be looking at the right version of the code.
## Collaborate with CodeStream [#collaborate]

![Build SHA Not Configured](/images/BuildSHANotConfigured.png)
![A screenshot of a comment with the most recent code contributor automatically added.](./images/ErrorAutoMention.png "A comment with the most recent code contributor automatically added.")

If you do have build SHAs configured, but the version of the code you have
locally does contain that commit, CodeStream will let you know so that you can
better investigate the error.
<figcaption>CodeStream automatically mentions the most recent person to touch the code related to the error, making it easy for you to bring the right people into the discussion.</figcaption>

![Build SHA Not Found](/images/BuildSHANotFound.png)
![A screenshot of the CodeStream's error assignment.](./images/ErrorAssignee.png "CodeStream's error assignment.")

<figcaption>Once you’ve identified the problem you can assign the error, either to an existing teammate on CodeStream or to a person suggested based on the repository’s Git commit history.</figcaption>

![A screenshot of the error status dropdown.](./images/ErrorStatus.png "The error status dropdown.")

<figcaption>You can update the error’s status from unresolved to resolved or ignored.</figcaption>

## Use build SHAs with CodeStream [#sha]

![A screenshot of the build SHA not configured warning message.](./images/BuildSHANotConfigured.png "The build SHA not configured warning message.")

<figcaption>The build SHA not configured warning message reads: No build SHA associated with this error. Your version of the code may not match the environment that triggered the error.</figcaption>

You may see this warning if there's no build SHA associated with a specific error.

CodeStream uses the build SHA to match the specific stack trace error with the version of the code running in the environment that triggered the error.

To resolve this warning, [set the environment variables for your APM agent](/docs/codestream/start-here/codestream-new-relic/#buildsha).

Even without the build SHA configured, you can still investigate the error, but you may not be looking at the version of the code that caused it.

![A screenshot of the build SHA not found warning message.](./images/BuildSHANotFound.png "The build SHA not found warning message.")

<figcaption>The build SHA not found warning message reads: Your version of the code doesn't match production. Fetch the following commit to better investigate the error.</figcaption>

If you do have build SHAs configured, but the version of the code you're on locally doesn't contain that commit, CodeStream will let you know so that you can more effectively investigate and resolve the error.

CodeStream will also let you know if the error doesn’t have a stack trace
associated with it, which can happen with older errors where the stack trace has
associated with it. This happens with older errors when the stack trace has
aged out on New Relic One.

Collaborating on errors isn’t limited to developers in their IDEs. An error can
be shared out to Slack or Microsoft Teams so that people who don’t spend time in
an IDE can participate.
## Other collaboration tools [#other-tools]

![Share Error](/images/ShareError.png)
In an error discussion, use the `...` **More actions** dropdown to share the continue the collaboration on other tools, like Slack or Microsoft Teams.

All of this information, including the discussion, assignee and error status,
remains in sync with New Relic One so that people can also participate from
there. You could envision a collaboration session, with some developers
participating from their IDEs, maybe a devops engineer participating from New
Relic One, and maybe a development manager following along from Slack. All in
the name of shortening the amount of time between error discovery and error
resolution!
## Associate your repo [#repo]

![Error on New Relic One](/images/ErrorOnNR1.png)
![A screenshot of the missing repository info message.](./images/RepoAssociation.png "The missing repository info message.")

Note that when you open an error via the Open in IDE button on New Relic One, if
there is no repository associated with it CodeStream will prompt you to select
one.
<figcaption>If there's no repository associated with CodeStream when you click **Open in IDE** on an error, CodeStream prompts you to do so.</figcaption>

![Repository Association](/images/RepoAssociation.png)
All of the repos you currently have open in your IDE are listed in the **select a repo** dropdown.

All repositories you currently have open in your IDE are listed in the dropdown.
If you don’t see the appropriate repository listed, just open it and it will
automatically get added to the list. If you’re working with a fork be sure to
select the upstream remote from the list.
If you don’t see the repository you want listed, open it in your IDE and it will
automatically get added to the list. If you’re working with a fork, make sure you select the upstream remote.

To avoid having to do this manual association every time you open an error
associated with a different entity on New Relic One, you can also [make these
associations via environment variables in your build
pipeline](/docs/codestream/start-here/codestream-new-relic/#repo-url).
To avoid having to do this manual association every time you open an error, you can [make these
associations via your APM agent's environment variables](/docs/codestream/start-here/codestream-new-relic/#repo-url).

0 comments on commit fe1e66e

Please sign in to comment.