Skip to content

Commit

Permalink
Merge pull request #13359 from newrelic/ASsorted-fixes-June-5
Browse files Browse the repository at this point in the history
Assorted fixes: .NET config precedence fix, NRQL bucket fix
  • Loading branch information
zuluecho9 committed Jun 6, 2023
2 parents e1ea17a + eabb65c commit 0cdbf89
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,10 @@ Here are details about the configuration methods shown in the diagram, and their

<td>
Configuration settings set in these files take highest precedence.

However, if the agent is disabled in the local or global newrelic.config, the NewRelic.AgentEnabled settings in these files will be ignored.

If the agent is disabled in the local or global `newrelic.config`, the `NewRelic.AgentEnabled` settings in an `appsettings.json` these files **will enable the agent**.

However, if the agent is disabled in the local or global `newrelic.config`, the `NewRelic.AgentEnabled` settings in a `web.config` or `app.config` **will be ignored**.
If the agent is disabled in the local or global `newrelic.config`:
* The `NewRelic.AgentEnabled` settings in `appsettings.json` **will enable the agent**.
* The `NewRelic.AgentEnabled` settings in a `web.config` or `app.config` file **will be ignored**.

</td>
</tr>
Expand Down Expand Up @@ -3419,7 +3417,7 @@ For ASP.NET and .NET Framework console apps you can also configure the following
```

<Callout variant="important">
If the agent is disabled in the local or global `newrelic.config`, the `NewRelic.AgentEnabled` settings in these files will enable the agent.
If the agent is disabled in the local or global `newrelic.config`, the `NewRelic.AgentEnabled` settings in these files will **not** enable the agent.
</Callout>
</Collapser>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ To add a new configuration file for the log forwarding feature:
* Linux: `/etc/newrelic-infra/logging.d/`
* Windows: `C:\Program Files\New Relic\newrelic-infra\logging.d\`

2. Create a `logging.yml` configuration file, and add the parameters you need. The `logging.d` directory has various `.yml.example` files you can use as a reference or starting point.
2. Create a `logging.yml` configuration file, and add the parameters you need. The `logging.d` directory has various `.yml.example` files you can use as a reference or starting point. For Windows examples, see [our Github repo](https://github.com/newrelic/infrastructure-agent/tree/master/assets/examples/logging/windows).

```yml
# Log forwarder configuration file example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metaDescription: Here are some tips for understanding the OpenTelemetry database
After you've sent us your OpenTelemetry data and opened your service (entity) in the UI, click **Databases** to learn about the performance of the database queries your service is making. You can see which database calls (e.g., `SELECT` operation on the `ads` table) are taking the most time in total or on average, or have the most throughput. Then you can investigate performance of an individual call and find traces that involve it.

## Required attributes
With OpenTelemetry, we rely on [`SpanKind`](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#spankind) and the presence of the `db.system` attribute to identify spans representing client usage of a database.
With OpenTelemetry, we rely on [`SpanKind`](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#spankind) and the presence of the [`db.system`](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/database.md) attribute to identify spans representing client usage of a database.

For your OpenTelemetry data to appear in the **Databases** page, make sure it has the following attributes, in accordance with the OTel semantic conventions:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1778,11 +1778,11 @@ SELECT histogram(duration, 10, 20) FROM PageView SINCE 1 week ago

It takes three arguments:

* Attribute name
* Maximum value of the sample range. Any outliers will appear in the final bucket.
* Total number of buckets
* Attribute name
* Maximum value of the sample range (any outliers will appear in the final bucket)
* Total number of buckets

For more information and examples, see [Split your data into buckets](/docs/insights/nrql-new-relic-query-language/nrql-query-examples/segment-your-insights-data-buckets).
For more information and examples, see [Split your data into buckets](/docs/insights/nrql-new-relic-query-language/nrql-query-examples/segment-your-insights-data-buckets).
</Collapser>

<Collapser
Expand Down Expand Up @@ -1864,7 +1864,7 @@ SELECT histogram(duration, 10, 20) FROM PageView SINCE 1 week ago
FROM Metric SELECT count(node_filesystem_size) TIMESERIES FACET dimensions()
```

When used with a `FACET` clause, `dimensions()` produces a unique timeseries for all facets available on the event type, similar to how Prometheus behaves with non-aggregated queries.
When used with a `FACET` clause, `dimensions()` produces a unique timeseries for all facets available on the event type, similar to how Prometheus behaves with non-aggregated queries.
</Collapser>

<Collapser
Expand Down Expand Up @@ -2082,7 +2082,7 @@ SELECT histogram(duration, 10, 20) FROM PageView SINCE 1 week ago
* Use [`TIMESERIES`](#sel-timeseries) to generate a line chart with rates mapped over time.
* Omit [`TIMESERIES`](#sel-timeseries) to generate a billboard showing a single rate value averaged over time.

Here's a basic query that will generate a line chart showing the rate of throughput for <InlinePopover type="apm" /> transactions per 10 minutes over the past 6 hours:
Here's a basic query that will generate a line chart showing the rate of throughput for <InlinePopover type="apm" /> transactions per 10 minutes over the past 6 hours:

```sql
SELECT rate(count(*), 10 minute) FROM Transaction SINCE 6 hours ago
Expand Down Expand Up @@ -2324,8 +2324,9 @@ Note: `aparse()` is case-insensitive.
Use `capture()` to extract values from an attribute using a regular expression with [RE2 syntax](https://github.com/google/re2/wiki/Syntax).

It takes two arguments:
* Attribute name.
* Regular expression with capture syntax. Regex expressions in NRQL use Python-like syntax, `r'...'`.

* Attribute name
* Regular expression with capture syntax (regex expressions in NRQL use Python-like syntax, `r'...'`)

When capturing, use the RE2 named-capture syntax `...(?P<name> pattern )...` to capture the contained pattern, given the specified name.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,19 @@ import queriesnrqlFacetbyBucketsNRQLQueryBuilder from 'images/queries-nrql_scree

Using [NRQL](/docs/query-data/nrql-new-relic-query-language/getting-started/introduction-nrql), you can split your query results into buckets that cover certain ranges using the [`buckets` function](/docs/query-your-data/nrql-new-relic-query-language/get-started/nrql-syntax-clauses-functions/#func-buckets).

## Why use bucketed results? [#overview]

You can use the `FACET buckets()` function to group and categorize data into buckets based on specified ranges, such as for creating histograms or frequency distributions. Use it in combination with aggregating functions like [`count()`](/docs/query-your-data/nrql-new-relic-query-language/get-started/nrql-syntax-clauses-functions/#func-count) or [`sum()`](/docs/query-your-data/nrql-new-relic-query-language/get-started/nrql-syntax-clauses-functions/#func-sum) to analyze data distribution across different ranges.

Here are some use cases:
* Analyzing response times: You can use `FACET buckets()` to group response times into ranges (for example, 0-100ms, 100-200ms, 200-300ms) and calculate the count or average response time within each range. This allows you to understand the distribution of response times and identify performance issues.
* Examining request sizes: By using `FACET buckets()` on request sizes, you can categorize the size of requests into different buckets (for example, 0-1KB, 1-5KB, 5-10KB) and analyze the frequency of requests falling within each bucket. This can help you identify patterns and optimize resource allocation.
* Monitoring error rates: You can use `FACET buckets()` on error codes or error rates to group them into specific ranges. For example, you could create buckets for different HTTP error codes (like 400, 500, and others) or error rate ranges (for example, 0-1%, or 1-5%). This allows you to track your error distribution and identify areas requiring attention.
* Tracking user engagement: If you have a metric related to user engagement, such as session durations or page views, you can use `FACET buckets()` to group them into time intervals. This lets you analyze how users engage with your application or website across different time ranges.

## Create bucketed NRQL query [#segmentation]

To return bucketed results, use the `FACET buckets()` clause in a NRQL query. A bucketing query has this structure:
To return bucketed results, use the `FACET buckets()` clause in a NRQL query. A bucketed query has this structure:

```
SELECT FUNCTION(ATTRIBUTE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Use synthetic monitoring's [API tests](/docs/synthetics/new-relic-synthetics/get
Here we present some example functions showing how to use the `$http` object to submit your request. For detailed documentation on the options available for this object, see the [http-request readme](https://github.com/request/request). (Note that Request is deprecated, but these options still apply.)

<Callout variant="tip">
To view and share other API test examples, visit the [synthetics scripts](https://discuss.newrelic.com/tags/c/full-stack-observability/synthetic/81/script) section in Support Forum or the [Synthetic Monitoring Quickstarts Library](https://newrelic.github.io/quickstarts-synthetics-library/#/).
To view and share other API test examples, visit the [Support Forum synthetics scripts section](https://forum.newrelic.com/s/?c__tags=%5B%7B%22id%22%3A%22a9P8W0000004KS5UAM%22%2C%22sObjectType%22%3A%22Tag__c%22%2C%22subtitle%22%3A%22%22%2C%22title%22%3A%22syntheticsscript%22%2C%22titleFormatted%22%3A%22synthetics%3Cstrong%3Escript%3C%2Fstrong%3E%22%2C%22subtitleFormatted%22%3A%22%22%2C%22icon%22%3A%22standard%3Adefault%22%7D%5D) or the [Synthetic monitoring quickstarts library](https://newrelic.github.io/quickstarts-synthetics-library/#/).
</Callout>

## Use API http-request module [#overview]
Expand Down

0 comments on commit 0cdbf89

Please sign in to comment.