Skip to content

Commit fcf0ea4

Browse files
updated the alignment
1 parent 85da33f commit fcf0ea4

File tree

11 files changed

+695
-889
lines changed

11 files changed

+695
-889
lines changed

src/content/docs/workflow-automation/setup-and-configuration/actions-catalog/aws/aws-cloudwatch.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ See [Set up AWS credentials](/docs/workflow-automation/setup-and-configuration/s
3030

3131
<CollapserGroup>
3232
<Collapser
33-
id="aws-cloudwatch-getlogevents"
33+
id="aws.cloudWatch.getLogEvents"
3434
title="Get CloudWatch log events"
3535
>
3636
Retrieves a batch of log events from a specified log stream in AWS CloudWatch Logs. It's essential for monitoring, auditing, and troubleshooting applications by programmatically fetching log data.
@@ -216,14 +216,15 @@ steps:
216216
logGroupName: ${{ .workflowInputs.logGroupName }}
217217
logStreamName: ${{ .workflowInputs.logStreamName }}
218218
limit: 100
219+
219220
```
220221
</TabsPageItem>
221222
</TabsPages>
222223
</Tabs>
223224
</Collapser>
224225

225226
<Collapser
226-
id="aws-cloudwatch-putlogevents"
227+
id="aws.cloudwatch.putLogEvents"
227228
title="Put log events"
228229
>
229230
This uploads a batch of log events to the specified log stream in AWS CloudWatch Logs. It is used for programmatically sending log data from applications or services to CloudWatch for monitoring and analysis.

src/content/docs/workflow-automation/setup-and-configuration/actions-catalog/aws/aws-ec2.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,7 @@ steps:
15111511
<td>**sessionId**</td>
15121512
<td>Optional</td>
15131513
<td>String</td>
1514-
<td>` e1572683-d2dd-4904-a32a-36f398b52dd5`</td>
1514+
<td>`e1572683-d2dd-4904-a32a-36f398b52dd5`</td>
15151515
</tr>
15161516
<tr>
15171517
<td>**inputText**</td>
@@ -1614,6 +1614,7 @@ steps:
16141614
parameters:
16151615
endSession: false
16161616
next: end
1617+
16171618
```
16181619
</td>
16191620
</tr>

src/content/docs/workflow-automation/setup-and-configuration/actions-catalog/newrelic/newrelic-ingest.mdx

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -431,17 +431,17 @@ SELECT * FROM Log
431431

432432
[Read more about our API keys](/docs/apis/intro-apis/new-relic-api-keys/#license-key) to create and manage your **New Relic Account License Key**.
433433

434-
`"{{ .secrets.secretName }}"`, where `secretName` is the key under which the license key is stored.
434+
Do not input credentials in plain text. Please see example of secrets syntax below.
435+
436+
Example: `"{{ .secrets.secretName }}"`, where `secretName` is the key under which the license key is stored.
435437
</td>
436438
</tr>
437439
<tr>
438440
<td>**selectors**</td>
439441
<td>Optional</td>
440442
<td>List</td>
441443
<td>
442-
```yaml
443-
[{"name": "error", "expression": ".errorMessage"}]
444-
```
444+
`[{"name": "error", "expression": ".errorMessage"}]`
445445
</td>
446446
</tr>
447447
</tbody>
@@ -504,42 +504,6 @@ Each metric data point map in the `metrics` list uses the following key-value st
504504
The metrics API mandates a `timestamp`. Within the action, the `timestamp` is optional, defaulting to the current time if not supplied prior to metrics ingestion.
505505
</Callout>
506506

507-
### Understanding metric types
508-
509-
Choose the right metric type based on what you're measuring and how you want to aggregate it:
510-
511-
**When to use `gauge`:**
512-
- Measures a value at a specific point in time
513-
- Value can go up or down
514-
- Examples: CPU percentage, memory usage, queue depth, temperature
515-
- Aggregation: Latest value, average, min, max over time
516-
517-
**When to use `count`:**
518-
- Measures a delta or change over a time interval
519-
- Tracks how many times something happened during the interval
520-
- **Requires** `interval.ms` to define the time window
521-
- Examples: Request count, error count, messages processed
522-
- Aggregation: Sum, rate (count/interval)
523-
524-
**When to use `summary`:**
525-
- Pre-aggregated statistics over a time interval
526-
- **Requires** `interval.ms` and a value map with `count`, `sum`, `min`, `max`
527-
- Examples: Request duration percentiles, response time distribution
528-
- Aggregation: Percentiles, average (sum/count)
529-
530-
<Callout variant="tip">
531-
**Critical for downstream aggregation**: Using `count` instead of `gauge` for cumulative metrics ensures New Relic correctly calculates rates. For example, a query like `SELECT rate(sum(service.errors.all), 1 minute) FROM Metric` works correctly only if `service.errors.all` is a `count` type with an `interval.ms`.
532-
</Callout>
533-
534-
### Type coercion and numerical handling
535-
536-
The Metric API requires strict numerical types (Double or Long). When working with workflows:
537-
538-
- **Numbers from NRQL**: Results from NRQL queries return proper numerical types and work directly
539-
- **String-to-number conversion**: The action automatically coerces string values to numbers when possible (e.g., `"42"` becomes `42`)
540-
- **Type mismatch handling**: If a string cannot be converted to a number (e.g., `"abc"`), the workflow will fail with an error message indicating the field and value that caused the issue
541-
- **Recommendation**: When transforming data from external APIs or logs, explicitly convert strings to numbers in your workflow logic before passing to `sendMetrics`
542-
543507
### Share attributes across metrics with `common`
544508

545509
If you want to include a set of attributes on multiple metrics (and not add the same attributes for each metric), you can use the `common` block. This is an optional map that specifies information that applies to all associated metric data points. Values in the `common` section will be overridden if the same key exists on a metric data point.

src/content/docs/workflow-automation/setup-and-configuration/actions-catalog/newrelic/newrelic-notification.mdx

Lines changed: 79 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -530,24 +530,24 @@ steps:
530530
id="nerdGraph-Query-Get-DestinationId"
531531
title="NerdGraph Query to get destinationId"
532532
>
533-
```yaml
534-
{
535-
actor {
536-
account(id: 12345678) {
537-
aiNotifications {
538-
destinations(filters: {type: EMAIL, active: true}) {
539-
entities {
540-
createdAt
541-
id
542-
name
543-
active
544-
}
545-
}
533+
```yaml
534+
{
535+
actor {
536+
account(id: 12345678) {
537+
aiNotifications {
538+
destinations(filters: {type: EMAIL, active: true}) {
539+
entities {
540+
createdAt
541+
id
542+
name
543+
active
546544
}
547545
}
548546
}
549547
}
550-
```
548+
}
549+
}
550+
```
551551
</Collapser>
552552
</CollapserGroup>
553553
</td>
@@ -656,12 +656,12 @@ steps:
656656
<td>**attachments**</td>
657657
<td>List</td>
658658
<td>
659-
```yaml
660-
[{
661-
"blobId": "43werdtfgvhiu7y8t6r5e4398yutfgvh",
662-
"rowCount": 100
663-
}]
664-
```
659+
```yaml
660+
[{
661+
"blobId": "43werdtfgvhiu7y8t6r5e4398yutfgvh",
662+
"rowCount": 100
663+
}]
664+
```
665665
</td>
666666
</tr>
667667
</tbody>
@@ -678,42 +678,42 @@ steps:
678678
<tbody>
679679
<tr>
680680
<td>
681-
```yaml
682-
name: email_testing_with_attachment
683-
description: Workflow to test sending an email notification via NewRelic with log step
684-
workflowInputs:
685-
destinationId:
686-
type: String
687-
steps:
688-
- name: sendEmailNotification
689-
type: action
690-
action: newrelic.notification.sendEmail
691-
version: '1'
692-
inputs:
693-
destinationId: ${{ .workflowInputs.destinationId }}
694-
subject: "workflow notification"
695-
message: "Workflow Email Notification Testing from local"
696-
attachments:
697-
- type: QUERY
698-
query: "SELECT * FROM Log"
699-
format: JSON
700-
filename: "log_count.json"
701-
selectors:
702-
- name: success
703-
expression: '.success'
704-
- name: sessionId
705-
expression: '.response.sessionId'
706-
- name: attachments
707-
expression: '.response.attachments'
708-
- name: logOutput
709-
type: action
710-
action: newrelic.ingest.sendLogs
711-
version: '1'
712-
inputs:
713-
logs:
714-
- message: "Hello from cap check Testing staging server user2 : ${{ .steps.sendEmailNotification.outputs.result.attachments }}"
715-
licenseKey: ${{ :secrets:STAGING_NEW_RELIC_LICENSE_KEY }}
716-
```
681+
```yaml
682+
name: email_testing_with_attachment
683+
description: Workflow to test sending an email notification via NewRelic with log step
684+
workflowInputs:
685+
destinationId:
686+
type: String
687+
steps:
688+
- name: sendEmailNotification
689+
type: action
690+
action: newrelic.notification.sendEmail
691+
version: '1'
692+
inputs:
693+
destinationId: ${{ .workflowInputs.destinationId }}
694+
subject: "workflow notification"
695+
message: "Workflow Email Notification Testing from local"
696+
attachments:
697+
- type: QUERY
698+
query: "SELECT * FROM Log"
699+
format: JSON
700+
filename: "log_count.json"
701+
selectors:
702+
- name: success
703+
expression: '.success'
704+
- name: sessionId
705+
expression: '.response.sessionId'
706+
- name: attachments
707+
expression: '.response.attachments'
708+
- name: logOutput
709+
type: action
710+
action: newrelic.ingest.sendLogs
711+
version: '1'
712+
inputs:
713+
logs:
714+
- message: "Hello from cap check Testing staging server user2 : ${{ .steps.sendEmailNotification.outputs.result.attachments }}"
715+
licenseKey: ${{ :secrets:STAGING_NEW_RELIC_LICENSE_KEY }}
716+
```
717717
</td>
718718
</tr>
719719
</tbody>
@@ -978,23 +978,23 @@ steps:
978978

979979
### Example
980980

981-
```yaml
982-
steps:
983-
- name: startHealthyHeartbeat
984-
type: action
985-
action: newrelic.workflowAutomation.startWorkflowRun
986-
version: 1
987-
inputs:
988-
definitionName: "heartbeat_newrelicIngestSendEvents_10062025"
989-
definitionVersion: 1
990-
scopeType: "ACCOUNT"
991-
definitionScopeType: "d34568b7-ee0b-4191-b663-7b2925b0de5b"
992-
workflowInputs:
993-
- key: "cellName"
994-
value: "stg-joint-effort"
995-
runScopeType: "ACCOUNT"
996-
runScopeId: "11544325"
997-
```
981+
```yaml
982+
steps:
983+
- name: startHealthyHeartbeat
984+
type: action
985+
action: newrelic.workflowAutomation.startWorkflowRun
986+
version: 1
987+
inputs:
988+
definitionName: "heartbeat_newrelicIngestSendEvents_10062025"
989+
definitionVersion: 1
990+
scopeType: "ACCOUNT"
991+
definitionScopeType: "d34568b7-ee0b-4191-b663-7b2925b0de5b"
992+
workflowInputs:
993+
- key: "cellName"
994+
value: "stg-joint-effort"
995+
runScopeType: "ACCOUNT"
996+
runScopeId: "11544325"
997+
```
998998
</TabsPageItem>
999999

10001000
<TabsPageItem id="newrelic-workflowautomation-start-outputs">
@@ -1036,12 +1036,12 @@ steps:
10361036
<tbody>
10371037
<tr>
10381038
<td>
1039-
```yaml
1040-
{
1041-
"success": true
1042-
"runId": "00dc031f-c1cc-4d26-a3fb-6153c553c66b"
1043-
}
1044-
```
1039+
```yaml
1040+
{
1041+
"success": true
1042+
"runId": "00dc031f-c1cc-4d26-a3fb-6153c553c66b"
1043+
}
1044+
```
10451045
</td>
10461046
</tr>
10471047
</tbody>

0 commit comments

Comments
 (0)