A resource in OpenTelemetry represents information about an entity generating telemetry data. Make sure all telemetry data sent to New Relic is associated with a resource so it can be linked with the appropriate entity in New Relic. The OpenTelemetry Resource SDK specification defines the functionality implemented by all language SDKs for defining a resource.
The following suites of attributes are defined by the OpenTelemetry resource semantic conventions. These attributes are usually set by creating a resource using the OpenTelemetry SDK.
service.nameattribute is required to associate your resource with an entity in the UI
service.instance.idis required for certain panes to light up
telemetry.sdk.language=javais required to see data in the JVM section
You can use tags to organize and filter your entities in the UI. Tags are key-value pairs, for example
team: operations, added to various sets of data, like monitored apps and hosts. Certain important attributes are automatically available as tags, such as account ID; you can also add your own custom tags directly in the UI, or with one of the methods below.
Use the resource processor to add resource attributes prefixed with
tags, which will result in a tag on your entity in New Relic. For example, adding the attribute
tags.mytag=myvalue will result in the entity tag
mytag=myvalue. Here’s an example configuration:
You can also add resource attributes directly in the resource builder in your SDK (check your language SDK repo for how to do this, and remember to use the prefix
tags.), or export them as environment variables.