Skip to content

Commit

Permalink
Tweaks to CS and NR article
Browse files Browse the repository at this point in the history
  • Loading branch information
planteater committed Oct 25, 2021
1 parent da9b753 commit c019b1d
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 64 deletions.
Expand Up @@ -11,26 +11,11 @@ customizable tree-based view that is always available.
Subsequent articles will go into more detail on each section, but here's a quick
overview.

* [Pull Requests](/docs/codestream/codestream-ui-overview/pull-requests-section)
- If your team uses GitHub or GitHub Enterprise to host your code, you'll see
all of your open pull requests listed and you can just click on one to edit it
or perform a review.
* [Feedback
Requests](/docs/codestream/codestream-ui-overview/feedback-requests-section) -
Any open feedback requests either assigned to you or requested by you are
listed.
* [Codemarks](/docs/codestream/codestream-ui-overview/codemarks-section) -
Whether they originated in a pull request, a feedback request, or through
ad-hoc code comments/issues, "codemarks" are the discussions that annotate
your codebase and all of the codemarks in the current repository are listed
for reference.
* [Observability](/docs/codestream/codestream-ui-overview/observability-section)
- Track error assigned to you on New Relic One, and discover recent errors in
the repositories you have open in your IDE.
* [Issues](/docs/codestream/codestream-ui-overview/issues-section) - See all of
your open issues, across multiple services, in one place, and click on one to
update its status, create a feature branch to do your work, and even update
your status on Slack.
* [Pull Requests](/docs/codestream/codestream-ui-overview/pull-requests-section) - If your team uses GitHub or GitHub Enterprise to host your code, you'll see all of your open pull requests listed and you can just click on one to edit it or perform a review.
* [Feedback Requests](/docs/codestream/codestream-ui-overview/feedback-requests-section) - Any open feedback requests either assigned to you or requested by you are listed.
* [Codemarks](/docs/codestream/codestream-ui-overview/codemarks-section) - Whether they originated in a pull request, a feedback request, or through ad-hoc code comments/issues, "codemarks" are the discussions that annotate your codebase and all of the codemarks in the current repository are listed for reference.
* [Observability](/docs/codestream/codestream-ui-overview/observability-section) - Track error assigned to you on New Relic One, and discover recent errors in the repositories you have open in your IDE.
* [Issues](/docs/codestream/codestream-ui-overview/issues-section) - See all of your open issues, across multiple services, in one place, and click on one to update its status, create a feature branch to do your work, and even update your status on Slack.

The CodeStream sidebar is completely customizeable. Use drag-and-drop to reorder
the sections. Resize each one individually. Expand or collapse a section as
Expand All @@ -45,16 +30,10 @@ creating and discovering content in your team.

![Global Options](/images/GlobalOptions2.png)

* Compose "+" - Click to create a code comment/issue, request feedback on
changes, or to create a pull request.
* [Activity Feed](/docs/codestream/codestream-ui-overview/activity-feed) - The Activity Feed will let you know about new
code comments/issues and feedback requests, as well as replies to existing
ones.
* [My Organization](/docs/codestream/codestream-ui-overview/myorganization) - See who is in your CodeStream
organization, invite new members, and create blame maps.
* [Filter & Search](/docs/codestream/codestream-ui-overview/filter-and-search) - Filter & Search allows you to slice and
dice your team’s collection of code comments/issues and feature requests
however you see fit.
* Compose "+" - Click to create a code comment/issue, request feedback on changes, or to create a pull request.
* [Activity Feed](/docs/codestream/codestream-ui-overview/activity-feed) - The Activity Feed will let you know about new code comments/issues and feedback requests, as well as replies to existing ones.
* [My Organization](/docs/codestream/codestream-ui-overview/myorganization) - See who is in your CodeStream organization, invite new members, and create blame maps.
* [Filter & Search](/docs/codestream/codestream-ui-overview/filter-and-search) - Filter & Search allows you to slice and dice your team’s collection of code comments/issues and feature requests however you see fit.

And lastly, at the top-left of the CodeStream pane, click on your username for
options related to [account settings](/docs/codestream/codestream-settings/account-settings), [notifications](/docs/codestream/codestream-integrations/notifications) and [organization
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -31,7 +31,7 @@ Observability section, you’ll now see all of the error’s details, including
stack trace, and you can start collaborating with your teammates on resolution
of the error.

![Error Details](/images/ErrorDetails.png)
![Collaborate on Resolution](/images/Observability-VSC.gif)

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
Expand Down Expand Up @@ -62,7 +62,7 @@ SHA allows CodeStream to let you know whether or not you’re looking at the sam
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/#apm). You can go
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.

Expand Down
77 changes: 45 additions & 32 deletions src/content/docs/codestream/start-here/codestream-new-relic.mdx
Expand Up @@ -5,7 +5,11 @@ metaDescription: "Read about the useful ways CodeStream and New Relic work toget

CodeStream and New Relic work together in several ways to give you insight into your code's errors, as well as making it easier to get started instrumenting your code with our APM agents.

Specifically, when CodeStream is connected to New Relic, you can to jump from a stack trace error in the New Relic UI directly to the offending line of code in your IDE. Once in your IDE, you can use all of CodeStream's collaboration tools to [discuss the code](/docs/codestream/how-use-codestream/discuss-code), [request feedback](/docs/codestream/how-use-codestream/request-feedback), and submit a [pull request](/docs/codestream/how-use-codestream/pull-requests) to resolve the issue and push up the fix to your repository.
Specifically, when CodeStream is connected to New Relic, you can to jump from a
stack trace error in the New Relic UI directly to the offending line of code in
your IDE. Once in your IDE, you can navigate the stack trace and [collaborate
with your teammates to resolve the
issue](/docs/codestream/how-use-codestream/performance-monitoriing).

<Callout title="Preview release">
This is a preview release limited to accounts on our US data center, and your use is subject to the [pre-release policy](/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy/).
Expand All @@ -21,7 +25,7 @@ Requirements for connecting CodeStream and New Relic:

In order to get the most out of CodeStream and New Relic, connect CodeStream to New Relic via your [New Relic user key](/docs/apis/intro-apis/new-relic-api-keys/#user-api-key).

Once you have your New Relic user key, in CodeStream's **Observability** section click **Connect to New Relic One**, then paste your API key and click **Connect**.
Once you have your New Relic user key, in CodeStream's **Observability** section click **Connect to New Relic One**, then paste your API key and click **Connect to New Relic One**.

<Callout variant="caution">
New Relic users can share stacktrace errors on CodeStream. Once you've connected CodeStream to New Relic, any new users you add to your CodeStream organization can see those errors.
Expand Down Expand Up @@ -52,37 +56,17 @@ From **[one.newrelic.com/](https://one.newrelic.com/)**, go to **Errors Inbox**,

## APM errors and CodeStream [#apm]

To use CodeStream's **Open in IDE** with your APM stack trace errors, use environment variables to configure your APM agent with your application's [commit sha](https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection)
and/or your [release tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging) associated with the running version of your software.

CodeStream only needs the first seven characters of your commit sha (for example, `734713b`) to make this connection, but you can include the entire sha.
In order to view stack trace errors in your IDE, CodeStream needs to know what
repository the error is associated with and, ideally, which version of the code
generated the error.

Alternately, you can use a release tag (such as `v0.1.209` or `release-209`) for CodeStream to find the correct version of your code.

For New Relic APM, the commit and/or release tag (`tags.commit` and `tags.releaseTag`) are added as attributes on `Transaction` and `TransactionError` events. You can use APM environment variables to set these attributes.

We recommend setting one or both of these variables as part of your build pipeline.

* `NEW_RELIC_METADATA_COMMIT` - The commit sha. You can include the whole thing or only the first seven characters.
* `NEW_RELIC_METADATA_RELEASE_TAG` - A release tag (such as `v0.1.209` or `release-209`). This has the advantage of being human readable.

For more on how to set these variables, here are specific configuration details for each language:

* [Go](/docs/agents/go-agent/configuration/go-agent-configuration/)
* [Java](/docs/agents/java-agent/configuration/java-agent-configuration-config-file/)
* [.NET](/docs/agents/net-agent/configuration/net-agent-configuration/)
* [Node.js](/docs/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration/)
* [PHP](/docs/agents/php-agent/configuration/php-agent-configuration/)
* [Python](/docs/agents/python-agent/configuration/python-agent-configuration/)
* [Ruby](/docs/agents/ruby-agent/configuration/ruby-agent-configuration/)

## Give us your repository's URL [#repo-url]
## Associate repositories with errors [#repo-url]

Once you've started monitoring for APM, mobile, browser, or Lambda, you can connect those things with your repository.

In order to link your data in New Relic to your code, we need to know the URL for your repository.
In order to link your data in New Relic to your code, we need to know the remote URL for your repository.

For example, the URL can be in either the SSH or HTTPS format:
For example, the remote URL can be in either the SSH or HTTPS format:
* `git@github.com:newrelic/beta-docs-site.git`
* `https://github.com/newrelic/beta-docs-site.git`

Expand All @@ -92,7 +76,12 @@ It's possible to add the same GitHub repository more than once, if you're using
For example, `https://github.com/tuna/repo` and `git@github.com:tuna/repo` are the same repo, with different protocols.
</Callout>

You can use any one of these methods to set up your repository:
If you try to open an error in your IDE and there isn't an associated
repository, CodeStream will prompt you to make an association and save that
association for all errors from the given entity on New Relic. However, it would
be preferably to use one of the following methods since they require less
ongoing manual effort and eliminate the possibility of end-user mistakes, such
as misconfigured remote URLs.

<CollapserGroup>
<Collapser
Expand Down Expand Up @@ -237,6 +226,32 @@ mutation DeleteRepository {

</CollapserGroup>

## Associate build SHAs or release tags with errors [#buildsha]

To use CodeStream's **Open in IDE** with your APM stack trace errors, use environment variables to configure your APM agent with your application's [commit sha](https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection)
and/or your [release tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging) associated with the running version of your software.

CodeStream only needs the first seven characters of your commit sha (for example, `734713b`) to make this connection, but you can include the entire sha.

Alternately, you can use a release tag (such as `v0.1.209` or `release-209`) for CodeStream to find the correct version of your code.

For New Relic APM, the commit and/or release tag (`tags.commit` and `tags.releaseTag`) are added as attributes on `Transaction` and `TransactionError` events. You can use APM environment variables to set these attributes.

We recommend setting one or both of these variables as part of your build pipeline.

* `NEW_RELIC_METADATA_COMMIT` - The commit sha. You can include the whole thing or only the first seven characters.
* `NEW_RELIC_METADATA_RELEASE_TAG` - A release tag (such as `v0.1.209` or `release-209`). This has the advantage of being human readable.

For more on how to set these variables, here are specific configuration details for each language:

* [Go](/docs/agents/go-agent/configuration/go-agent-configuration/)
* [Java](/docs/agents/java-agent/configuration/java-agent-configuration-config-file/)
* [.NET](/docs/agents/net-agent/configuration/net-agent-configuration/)
* [Node.js](/docs/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration/)
* [PHP](/docs/agents/php-agent/configuration/php-agent-configuration/)
* [Python](/docs/agents/python-agent/configuration/python-agent-configuration/)
* [Ruby](/docs/agents/ruby-agent/configuration/ruby-agent-configuration/)

## Install APM agents with CodeStream [#install-agents]

Requirements for installing New Relic APM agents via CodeStream:
Expand All @@ -262,6 +277,4 @@ This check only happens automatically when the initial connection is made. To do
* [A Kubernetes cluster monitored by Pixie](/docs/auto-telemetry-pixie/install-auto-telemetry-pixie/)
* An application written in Go

You can use CodeStream to enable dynamic logging for your Pixie-monitored Go applications.

For relevant projects, you can use CodeStream to dynamically log your Go method names in your IDE.
You can use CodeStream to enable dynamic logging for your Pixie-monitored Go applications. Just right-click on any method name and select **Dynamic Logging Using Pixie**.

0 comments on commit c019b1d

Please sign in to comment.