Skip to content

Commit

Permalink
Merge pull request #18873 from nr-ksteinbach/patch-5
Browse files Browse the repository at this point in the history
Update infrastructure-agent-configuration-settings.mdx
  • Loading branch information
akristen authored Oct 7, 2024
2 parents 1ff6d30 + 4e46646 commit 38e704e
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3236,27 +3236,27 @@ Metrics can also be enriched with extended cloud metadata (including custom reso
</tbody>
</table>

Use a list of custom attributes to annotate the data from this agent instance. Separate keys and values with colons `:`, as in `KEY: VALUE`, and separate each key-value pair with a line break. Keys can be any valid YAML except slashes `/`. Values can be any YAML string, including spaces.
Use a list of custom attributes to annotate the data from this agent instance. Separate keys and values with colons `:`, as in `KEY: VALUE`, and separate each key-value pair with a line break. Keys can be any valid YAML except slashes `/`. Values can be any YAML string, including spaces. Starting the key with `label.` will make sure it remains as is, even if that host might run in different cloud environments, where the cloud tags or cloud labels might interact with it in the combined decoration of tags. In contrast, `custom_labels` might be prefixed with `gcp.` or `azure.` when running in those environments and when combining data from the infrastructure agent with cloud monitoring together.

Example as a YAML attribute:

```yml
custom_attributes:
environment: production
service: login service
team: alpha-team
label.environment: production
label.service: login service
label.team: alpha-team
```

Example as an environment variable:

```ini
NRIA_CUSTOM_ATTRIBUTES='{"customAttribute_1":"SOME_ATTRIBUTE","customAttribute_2": "SOME_ATTRIBUTE_2"}'
NRIA_CUSTOM_ATTRIBUTES='{"label.customAttribute_1":"SOME_ATTRIBUTE","label.customAttribute_2": "SOME_ATTRIBUTE_2"}'
```

NRQL example filtering by custom attribute:

```sql
FROM SystemSample SELECT * WHERE environment = 'production'
FROM SystemSample SELECT * WHERE label.environment = 'production'
```
</Collapser>

Expand Down

0 comments on commit 38e704e

Please sign in to comment.