Skip to content

Commit f1c4521

Browse files
authored
Merge pull request #22344 from brnhensley/patch-47
fix: indentation
2 parents 546cd5c + 5cd9576 commit f1c4521

File tree

7 files changed

+90
-92
lines changed

7 files changed

+90
-92
lines changed

src/content/docs/distributed-tracing/infinite-tracing-on-premise/bring-your-own-cache.mdx

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ The processor supports any Redis-compatible cache implementation. It has been te
1919
For production deployments, we recommend using cluster mode (sharded) to ensure high availability and scalability. To enable distributed caching, add the `distributed_cache` configuration to your `tail_sampling` processor section:
2020

2121
```yaml
22-
tail_sampling:
23-
distributed_cache:
24-
connection:
25-
address: redis://localhost:6379/0
26-
password: 'local'
27-
trace_window_expiration: 30s # Default: how long to wait after last span before evaluating
28-
in_flight_timeout: 120s # Optional: defaults to trace_window_expiration if not set
29-
traces_ttl: 3600s # Optional: default 1 hour
30-
cache_ttl: 7200s # Optional: default 2 hours
31-
suffix: "itc" # Redis key prefix
32-
max_traces_per_batch: 500 # Default: traces processed per evaluation cycle
33-
evaluation_interval: 1s # Default: evaluation frequency
34-
evaluation_workers: 4 # Default: number of parallel workers (defaults to CPU count)
35-
data_compression:
36-
format: lz4 # Optional: compression format (none, snappy, zstd, lz4); lz4 recommended
22+
tail_sampling:
23+
distributed_cache:
24+
connection:
25+
address: redis://localhost:6379/0
26+
password: 'local'
27+
trace_window_expiration: 30s # Default: how long to wait after last span before evaluating
28+
in_flight_timeout: 120s # Optional: defaults to trace_window_expiration if not set
29+
traces_ttl: 3600s # Optional: default 1 hour
30+
cache_ttl: 7200s # Optional: default 2 hours
31+
suffix: "itc" # Redis key prefix
32+
max_traces_per_batch: 500 # Default: traces processed per evaluation cycle
33+
evaluation_interval: 1s # Default: evaluation frequency
34+
evaluation_workers: 4 # Default: number of parallel workers (defaults to CPU count)
35+
data_compression:
36+
format: lz4 # Optional: compression format (none, snappy, zstd, lz4); lz4 recommended
3737
```
3838
3939
<Callout variant="important">
@@ -43,16 +43,16 @@ For production deployments, we recommend using cluster mode (sharded) to ensure
4343
The `address` parameter must specify a valid Redis-compatible server address using the standard format:
4444

4545
```shell
46-
redis[s]://[[username][:password]@][host][:port][/db-number]
46+
[output] redis[s]://[[username][:password]@][host][:port][/db-number]
4747
```
4848

4949
Alternatively, you can embed credentials directly in the `address` parameter:
5050

5151
```yaml
52-
tail_sampling:
53-
distributed_cache:
54-
connection:
55-
address: redis://:yourpassword@localhost:6379/0
52+
tail_sampling:
53+
distributed_cache:
54+
connection:
55+
address: redis://:yourpassword@localhost:6379/0
5656
```
5757

5858
The processor is implemented in Go and uses the [go-redis](https://github.com/redis/go-redis/tree/v9) client library.
@@ -114,8 +114,8 @@ Proper Redis instance sizing is critical for optimal performance. Use the config
114114

115115
### Memory estimation formula
116116

117-
```shell
118-
Total Memory = (Trace Data) + (Decision Caches) + (Overhead)
117+
```
118+
Total Memory = (Trace Data) + (Decision Caches) + (Overhead)
119119
```
120120
121121
#### 1. Trace data storage
@@ -133,13 +133,13 @@ Trace data is stored in Redis for the full `traces_ttl` period to support late-a
133133
134134
**Example calculation**: At 10,000 spans/second with 1-hour `traces_ttl`:
135135
136-
```shell
136+
```
137137
10,000 spans/sec × 3600 sec × 900 bytes = 32.4 GB
138138
```
139139
140140
**With lz4 compression** (we have observed 25% reduction):
141141
142-
```shell
142+
```
143143
32.4 GB × 0.75 = 24.3 GB
144144
```
145145
@@ -164,7 +164,7 @@ When using `distributed_cache`, the decision caches are stored in Redis without
164164
165165
**Example calculation**: 500 traces per batch (default) with 20 spans per trace on average:
166166
167-
```shell
167+
```
168168
500 × 20 × 900 bytes = 9 MB per batch
169169
```
170170
@@ -247,4 +247,4 @@ The processor uses a cascading TTL structure, with each level providing protecti
247247
4. **`cache_ttl`** (default: 2 hours)
248248
- Redis key expiration for decision cache entries (sampled/non-sampled)
249249
- Prevents duplicate evaluation for late-arriving spans
250-
- Defined via `distributed_cache.cache_ttl`
250+
- Defined via `distributed_cache.cache_ttl`

src/content/docs/infrastructure-as-code/terraform/migrate-drop-rules-to-pipeline-cloud-rules.mdx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ This section describes the standard Terraform workflow for migrating from `newre
5454
Navigate to your Terraform working directory and run one of the following commands:
5555

5656
```bash
57-
# Apply to update state with pipeline_cloud_rule_entity_id
58-
terraform apply
57+
# Apply to update state with pipeline_cloud_rule_entity_id
58+
terraform apply
5959

60-
# Safer: use refresh-only to see changes without modifying infrastructure
61-
terraform apply -refresh-only
60+
# Safer: use refresh-only to see changes without modifying infrastructure
61+
terraform apply -refresh-only
6262

63-
# Targeted: limit operation to specific drop rule resources
64-
terraform apply -refresh-only -target=newrelic_nrql_drop_rule.foo
63+
# Targeted: limit operation to specific drop rule resources
64+
terraform apply -refresh-only -target=newrelic_nrql_drop_rule.foo
6565
```
6666

6767
After running one of the above commands, the `pipeline_cloud_rule_entity_id` will be available in your state for each drop rule. Keep the IDs handy for the next step.
@@ -620,7 +620,8 @@ To simplify the native Terraform migration workflow described above, New Relic p
620620
action = "drop"
621621
nrql = "SELECT * FROM Log WHERE contains(message, 'SSN')"
622622
}
623-
``` */}
623+
```
624+
*/}
624625
</Step>
625626

626627
<Step>

src/content/docs/infrastructure/host-integrations/db-entity-tags.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Changes to these configuration files are automatically picked up and do not requ
1919
Example snippet for a database integration config file (for example, `mysql-config.yml`):
2020

2121
```yaml
22-
2322
# /etc/newrelic-infra/integrations.d/mysql-config.yml
2423
integrations:
2524
- name: nri-mysql
@@ -42,8 +41,7 @@ Changes to `newrelic-infra.yml` require a restart of the infrastructure agent to
4241

4342
Example `newrelic-infra.yml` snippet:
4443

45-
``` yaml
46-
44+
```yaml
4745
# /etc/newrelic-infra.yml
4846
# ... other configuration ...
4947
custom_attributes:

src/content/docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/java-extensions-k8s-auto-attach.mdx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Replace `your-registry/{Your-Image-Name}` with your actual container registry pa
8686
Push the image to your container registry:
8787

8888
```bash
89-
docker push your-registry/{Your-Image-Name}
89+
docker push your-registry/{Your-Image-Name}
9090
```
9191

9292
</Step>
@@ -114,7 +114,6 @@ spec:
114114
agent:
115115
language: java
116116
image: your-registry/{Your-Image-Name}
117-
118117
```
119118
120119
</Step>
@@ -126,7 +125,7 @@ spec:
126125
Apply the updated instrumentation to your cluster:
127126
128127
```bash
129-
kubectl apply -f instrumentation-java.yaml
128+
kubectl apply -f instrumentation-java.yaml
130129
```
131130

132131
</Step>
@@ -140,17 +139,17 @@ Restart your Java applications to pick up the new init container with extensions
140139

141140
* To restart a specific deployment:
142141

143-
```bash
144-
# Restart a specific deployment
145-
kubectl rollout restart deployment/my-java-deployment
146-
```
142+
```bash
143+
# Restart a specific deployment
144+
kubectl rollout restart deployment/my-java-deployment
145+
```
147146

148147
* To restart all deployments in a namespace:
149148

150-
```bash
151-
# Or restart all deployments in a namespace
152-
kubectl rollout restart deployments -n my-namespace
153-
```
149+
```bash
150+
# Or restart all deployments in a namespace
151+
kubectl rollout restart deployments -n my-namespace
152+
```
154153

155154
</Step>
156155

@@ -165,7 +164,7 @@ If extensions aren't loading:
165164
1. Verify the extensions directory exists in your custom image:
166165

167166
```bash
168-
docker run --rm your-registry/{Your-Image-Name} ls -la /extensions
167+
docker run --rm your-registry/{Your-Image-Name} ls -la /extensions
169168
```
170169

171170
2. Check file permissions ensure extension JAR files are readable.
@@ -178,4 +177,4 @@ If extensions aren't loading:
178177
* [Java extension modules documentation](/docs/apm/agents/java-agent/instrumentation/extension-additional-instrumentation-modules/)
179178
* [Kubernetes APM auto-attach](/docs/kubernetes-pixie/kubernetes-integration/installation/k8s-agent-operator/)
180179
* [Java agent configuration](/docs/apm/agents/java-agent/configuration/java-agent-configuration-config-file/)
181-
* [Custom instrumentation for Java](/docs/apm/agents/java-agent/custom-instrumentation/java-custom-instrumentation/)
180+
* [Custom instrumentation for Java](/docs/apm/agents/java-agent/custom-instrumentation/java-custom-instrumentation/)

src/content/docs/query-your-data/explore-query-data/notebooks/notebooks-examples.mdx

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Our main API experienced elevated error rates starting at 14:32 UTC...
3535

3636
**Query block: Error rate timeline**
3737
```sql
38-
SELECT count(*) as 'Total Requests',
39-
filter(count(*), WHERE httpResponseCode >= 400) as 'Errors'
38+
SELECT count(*) AS 'Total Requests',
39+
filter(count(*), WHERE httpResponseCode >= 400) AS 'Errors'
4040
FROM Transaction
4141
WHERE appName = 'api-production'
4242
TIMESERIES 1 minute
@@ -45,8 +45,8 @@ SINCE '2024-10-15 14:00:00' UNTIL '2024-10-15 16:00:00'
4545

4646
**Query block: Error breakdown by endpoint**
4747
```sql
48-
SELECT count(*) as 'Error Count',
49-
average(duration) as 'Avg Duration (ms)'
48+
SELECT count(*) AS 'Error Count',
49+
average(duration) AS 'Avg Duration (ms)'
5050
FROM Transaction
5151
WHERE appName = 'api-production'
5252
AND httpResponseCode >= 400
@@ -73,8 +73,8 @@ ORDER BY count(*) DESC
7373

7474
**Query block: Database performance during incident**
7575
```sql
76-
SELECT average(duration) as 'Query Duration (ms)',
77-
count(*) as 'Query Count'
76+
SELECT average(duration) AS 'Query Duration (ms)',
77+
count(*) AS 'Query Count'
7878
FROM DatabaseSample
7979
WHERE host = 'prod-db-01'
8080
TIMESERIES 5 minutes
@@ -104,9 +104,9 @@ Track and analyze application performance trends over time to identify optimizat
104104

105105
**Query block: Response time trends**
106106
```sql
107-
SELECT percentile(duration, 50) as 'P50',
108-
percentile(duration, 95) as 'P95',
109-
percentile(duration, 99) as 'P99'
107+
SELECT percentile(duration, 50) AS 'P50',
108+
percentile(duration, 95) AS 'P95',
109+
percentile(duration, 99) AS 'P99'
110110
FROM Transaction
111111
WHERE appName IN ('web-frontend', 'api-backend', 'auth-service')
112112
FACET appName
@@ -116,7 +116,7 @@ SINCE 7 days ago
116116

117117
**Query block: Error rate comparison**
118118
```sql
119-
SELECT percentage(count(*), WHERE error IS true) as 'Error Rate %'
119+
SELECT percentage(count(*), WHERE error IS true) AS 'Error Rate %'
120120
FROM Transaction
121121
WHERE appName IN ('web-frontend', 'api-backend', 'auth-service')
122122
FACET appName
@@ -167,7 +167,7 @@ New interactive dashboard builder with drag-and-drop widgets...
167167

168168
**Query block: Daily active users creating dashboards**
169169
```sql
170-
SELECT uniqueCount(userId) as 'Users Creating Dashboards'
170+
SELECT uniqueCount(userId) AS 'Users Creating Dashboards'
171171
FROM PageView
172172
WHERE pageUrl LIKE '%/dashboard/create%'
173173
TIMESERIES 1 day
@@ -177,9 +177,9 @@ SINCE 30 days ago
177177
**Query block: Dashboard creation funnel**
178178
```sql
179179
SELECT funnel(userId,
180-
WHERE pageUrl LIKE '%/dashboard/create%' as 'Started Creation',
181-
WHERE pageUrl LIKE '%/dashboard/create%' AND eventType = 'widget_added' as 'Added Widget',
182-
WHERE eventType = 'dashboard_saved' as 'Saved Dashboard'
180+
WHERE pageUrl LIKE '%/dashboard/create%' AS 'Started Creation',
181+
WHERE pageUrl LIKE '%/dashboard/create%' AND eventType = 'widget_added' AS 'Added Widget',
182+
WHERE eventType = 'dashboard_saved' AS 'Saved Dashboard'
183183
)
184184
FROM PageView, UserAction
185185
SINCE 30 days ago
@@ -209,8 +209,8 @@ Create ongoing security analysis to track potential threats and system vulnerabi
209209

210210
**Query block: Failed authentication patterns**
211211
```sql
212-
SELECT count(*) as 'Failed Attempts',
213-
latest(remoteAddr) as 'Source IP'
212+
SELECT count(*) AS 'Failed Attempts',
213+
latest(remoteAddr) AS 'Source IP'
214214
FROM Log
215215
WHERE message LIKE '%authentication failed%'
216216
FACET remoteAddr
@@ -221,8 +221,8 @@ ORDER BY count(*) DESC
221221

222222
**Query block: API access anomalies**
223223
```sql
224-
SELECT count(*) as 'Request Count',
225-
uniqueCount(userAgent) as 'Unique User Agents'
224+
SELECT count(*) AS 'Request Count',
225+
uniqueCount(userAgent) AS 'Unique User Agents'
226226
FROM Transaction
227227
WHERE appName = 'api-gateway'
228228
FACET request.headers.x-forwarded-for
@@ -254,9 +254,9 @@ Track key business KPIs alongside technical metrics to understand the complete p
254254

255255
**Query block: User engagement metrics**
256256
```sql
257-
SELECT count(*) as 'Page Views',
258-
uniqueCount(userId) as 'Active Users',
259-
average(duration) as 'Avg Session Duration'
257+
SELECT count(*) AS 'Page Views',
258+
uniqueCount(userId) AS 'Active Users',
259+
average(duration) AS 'Avg Session Duration'
260260
FROM PageView
261261
TIMESERIES 1 day
262262
SINCE 30 days ago
@@ -265,10 +265,10 @@ SINCE 30 days ago
265265
**Query block: Conversion funnel**
266266
```sql
267267
SELECT funnel(userId,
268-
WHERE pageUrl = '/signup' as 'Signup Page',
269-
WHERE pageUrl = '/signup/verify' as 'Email Verified',
270-
WHERE pageUrl = '/onboarding/complete' as 'Onboarding Complete',
271-
WHERE eventType = 'subscription_created' as 'Converted'
268+
WHERE pageUrl = '/signup' AS 'Signup Page',
269+
WHERE pageUrl = '/signup/verify' AS 'Email Verified',
270+
WHERE pageUrl = '/onboarding/complete' AS 'Onboarding Complete',
271+
WHERE eventType = 'subscription_created' AS 'Converted'
272272
)
273273
FROM PageView, UserAction
274274
SINCE 30 days ago
@@ -344,4 +344,4 @@ SINCE 1 hour ago
344344

345345
* Learn how to [add queries to notebooks](/docs/query-your-data/explore-query-data/notebooks/add-queries-to-notebooks)
346346
* Discover [sharing options](/docs/query-your-data/explore-query-data/notebooks/share-notebooks) for your notebooks
347-
* Explore [NRQL examples](/docs/nrql/nrql-examples) for more query inspiration
347+
* Explore [NRQL examples](/docs/nrql/nrql-examples) for more query inspiration

0 commit comments

Comments
 (0)