-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(.NET): Consolidating APIs #17266
Conversation
Hi @jeff-colucci 👋 Thanks for your pull request! Your PR is in a queue, and a writer will take a look soon. We generally publish small edits within one business day, and larger edits within three days. We will automatically generate a preview of your request, and will comment with a link when the preview is ready (usually 10 to 20 minutes). |
✅ Deploy Preview for docs-website-netlify ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
removing superfluous callout
Preview built and available at: https://deploy-preview-17266--docs-website-netlify.netlify.app/docs/apm/agents/net-agent/net-agent-api/net-agent-api/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Jeff, just finished a review. I found three types of things to address:
- Various rendering / structural things (visible anchor ID, missing collapser tags, tables-in-tables) that should be fixed before merge
- We need to account for existing links to these pages. Some of those are links w/in the page, but we should also account for existing links to individual methods in other docs that will break. We can create a separate Jira for that sweep but let's ensure we don't let it fall thru the cracks.
- Non-fatals: I found a lot of style/grammar/formattng errors and inconsistencies. I suspect many of those were pre-existing in the source docs, and I don't think we need to get these to 100%. But I'd like to fix the low-hanging fruit while we're working on this
- Agents | ||
- NET agent | ||
- API guides | ||
metaDescription: 'A goal-focused guide to the New Relic .NET agent API.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This meta-description feels outdated for the current scope of the doc.
- /docs/agents/net-agent/net-agent-api/tracemetadata-net-agent-api-0 | ||
- /docs/apm/agents/net-agent/net-agent-api/tracemetadata-net-agent-api-0 | ||
|
||
freshnessValidatedDate: never |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be updated
|
||
New Relic's .NET agent includes an API that allows you to extend the agent's standard functionality. For example, you can use the .NET agent API for: | ||
|
||
* Customizing your app name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary -ing verbs
freshnessValidatedDate: never | ||
--- | ||
|
||
New Relic's .NET agent includes an API that allows you to extend the agent's standard functionality. For example, you can use the .NET agent API for: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New Relic's .NET agent includes an API that allows you to extend the agent's standard functionality. For example, you can use the .NET agent API for: | |
New Relic's .NET agent includes an API that allows you to extend the agent's standard functionality. For example, you can use the .NET agent API to: |
To use the .NET agent API, make sure you have the [latest .NET agent release](/docs/release-notes/agent-release-notes/net-release-notes). Then, add a reference to the agent in your project using one of the two options below: | ||
|
||
* Add a reference to `NewRelic.Api.Agent.dll` to your project. | ||
OR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
</tbody> | ||
</table> | ||
|
||
### NoticeError(String, IDictionary, bool) [#string-idictionary-bool-overload] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be its own collapser?
<Callout variant="important"> | ||
* Sending a lot of events can increase the memory overhead of the agent. | ||
* Additionally, posts greater than 1MB (10^6 bytes) in size will not be recorded regardless of the maximum number of events. | ||
* Custom Events are limited to 64-attributes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Custom Events are limited to 64-attributes. | |
* Custom events are limited to 64 attributes. |
Caps and hyphen here are weird
|
||
### Requirements | ||
|
||
* Agent version 5.0.136.0 or higher. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5.0.136.0 is EOL ( https://deploy-preview-17266--docs-website-netlify.netlify.app/docs/apm/agents/net-agent/getting-started/net-agent-eol-policy/ ), shouldn't this be all agent versions?
|
||
This API call is compatible with: | ||
|
||
* Agent versions >= 10.9.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other calls say "or higher" rather than use puncutation
|
||
### Requirements | ||
|
||
* Agent version 5.0.136.0 or higher. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same version comment as previous, this is EOl version
### Syntax | ||
|
||
```cs | ||
public interfac IAgent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo?
public interfac IAgent | |
public interface IAgent |
public interfac IAgent | |
public interfac IAgent |
### Syntax | ||
|
||
```cs | ||
public interfac ITransaction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo?
public interfac ITransaction | |
public interface ITransaction |
public interfac ITransaction | |
public interfac ITransaction |
### Syntax | ||
|
||
```cs | ||
Public interfac ISpan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo?
Public interfac ISpan | |
Public interfac ISpan |
|
||
You can also customize some of the .NET agent's default behavior by adjusting [configuration settings](/docs/agents/net-agent/configuration/net-agent-configuration) or using [custom instrumentation](/docs/agents/net-agent/custom-instrumentation/introduction-net-custom-instrumentation). | ||
|
||
## Requirements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Requirements | |
## Requirements [#requirements] |
|
||
* View and download the API package from the [NuGet Package Library](https://www.nuget.org/packages/NewRelic.Agent.Api/). | ||
|
||
## List of API calls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## List of API calls | |
## List of API calls [#api-calls] |
|
||
#### Disable automatic and manual injection | ||
|
||
This example disables <DoNotTranslate>**both**</DoNotTranslate> automatic and manual injection of the snippet: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would check a lot of these donottranslate tags - I don't think they're always appropriate for the context
</Collapser> | ||
<Collapser | ||
id="AcceptDistributedTracePayload" | ||
title="AcceptDistributedTracePayload" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title="AcceptDistributedTracePayload" | |
title="AcceptDistributedTracePayload (obsolete)" |
|
||
<tr> | ||
<td> | ||
[`AcceptDistributedTracePayload` (obsolete)](/docs/apm/agents/net-agent/net-agent-api/net-agent-api/#InsertDistributedTraceHeaders) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[`AcceptDistributedTracePayload` (obsolete)](/docs/apm/agents/net-agent/net-agent-api/net-agent-api/#InsertDistributedTraceHeaders) | |
[`AcceptDistributedTracePayload` (obsolete)](/docs/apm/agents/net-agent/net-agent-api/net-agent-api/#AcceptDistributedTracePayload) |
[`AcceptDistributedTracePayload` (obsolete)](/docs/apm/agents/net-agent/net-agent-api/net-agent-api/#InsertDistributedTraceHeaders) | |
[`AcceptDistributedTracePayload` (obsolete)](/docs/apm/agents/net-agent/net-agent-api/net-agent-api/#InsertDistributedTraceHeaders) |
|
||
<CollapserGroup> | ||
<Collapser | ||
id="add-custom-attr" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id="add-custom-attr" | |
id="AddCustomAttribute" |
|
||
Notice an error and report it to New Relic along with optional custom attributes. For each transaction, the agent only retains the exception and attributes from the first call to `NoticeError()`. You can pass an actual exception, or pass a string to capture an arbitrary error message. | ||
|
||
If this method is invoked within a [transaction](/docs/glossary/glossary/#transaction), the agent reports the exception within the parent transaction. If it is invoked outside of a transaction, the agent creates an [error trace](/docs/errors-inbox/errors-inbox) and categorizes the error in the New Relic UI as a `NewRelic.Api.Agent.NoticeError` API call. If invoked outside of a transaction, the `NoticeError()` call will not contribute to the error rate of an application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's nothing on the errors inbox page about error trace
</td> | ||
|
||
<td> | ||
Required. Specify a string to report to New Relic as though it's an exception. This method creates both [error events and error traces](/docs/tutorial-error-tracking/respond-outages/). Only the first 1023 characters are retained in error events, while error traces retain the full message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's nothing about error events/error traces on that doc
* Agent version 6.16 or higher. | ||
|
||
<Callout variant="important"> | ||
This method only works when used within a transaction created using the `Transaction` attribute with the `Web` property set to `true`. (See [Instrument using attributes](/docs/agents/net-agent/api-guides/net-agent-api-instrument-using-attributes).) It provides support for custom web-based frameworks that the agent does not automatically support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method only works when used within a transaction created using the `Transaction` attribute with the `Web` property set to `true`. (See [Instrument using attributes](/docs/agents/net-agent/api-guides/net-agent-api-instrument-using-attributes).) It provides support for custom web-based frameworks that the agent does not automatically support. | |
This method only works when used within a transaction created using the `Transaction` attribute with the `Web` property set to `true` (see [Custom instrumentation via attributes](/docs/agents/net-agent/api-guides/net-agent-api-instrument-using-attributes)). It provides support for custom web-based frameworks that the agent does not automatically support. |
|
||
### Description | ||
|
||
Sets the URI of the current transaction. The URI appears in the 'request.uri' [attribute](/docs/agents/net-agent/attributes/net-agent-attributes) of [transaction traces](/docs/apm/transactions/transaction-traces/transaction-traces) and [transaction events](/docs/using-new-relic/metrics/analyze-your-metrics/data-collection-metric-timeslice-event-data), and also can affect transaction naming. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sets the URI of the current transaction. The URI appears in the 'request.uri' [attribute](/docs/agents/net-agent/attributes/net-agent-attributes) of [transaction traces](/docs/apm/transactions/transaction-traces/transaction-traces) and [transaction events](/docs/using-new-relic/metrics/analyze-your-metrics/data-collection-metric-timeslice-event-data), and also can affect transaction naming. | |
Sets the URI of the current transaction. The URI appears in the `request.uri` attribute of [transaction traces](/docs/apm/transactions/transaction-traces/transaction-traces) and [transaction events](/docs/using-new-relic/metrics/analyze-your-metrics/data-collection-metric-timeslice-event-data), and it also can affect transaction naming. |
No description provided.