New Relic
New Relic Event API receives custom events for the stories executed by VIVIDUS.
Installation
-
Copy the below line to
dependenciessection of the projectbuild.gradlefilePlease make sure to use the same version for all VIVIDUS dependencies. Example 1. build.gradleimplementation('org.vividus:vividus-agent-newrelic') -
If the project was imported to the IDE before adding new dependency, re-generate the configuration files for the used IDE and then refresh the project in the used IDE.
Reporting is off until newrelic.enabled is true. Given stories, excluded stories, and dry runs are not sent.
Properties
| The properties marked with bold are mandatory when New Relic reporting is enabled. |
| Property Name | Acceptable values | Default | Description |
|---|---|---|---|
|
|
|
Enables reporting to New Relic |
|
API key |
empty |
Insights insert key or Ingest license key, sent in the |
|
URL |
empty |
Event API URL, including the account ID. US accounts use |
|
Any string |
empty |
Value of the |
|
ISO-8601 duration |
|
How long to wait for in-flight story events after the stories finish |
|
Any string |
empty |
Custom attribute added to every event. |
Events
Before the stories of a run, VIVIDUS posts a VividusRun event with phase started. After the stories it posts a VividusRun event with phase finished and status passed or failed. After each completed story it posts a VividusStory event with status passed or failed. Each request body is a JSON array with that single event. Every event carries the same runId: the value of newrelic.run-id, or a generated UUID when that property is empty.
SELECT * FROM VividusRun WHERE runId = '5d8c1a2e-3b4f-4c6d-9e10-11a2b3c4d5e6' FACET phase
The finished run is failed when any included story failed, and passed otherwise. On VividusStory, status is failed when the story or a given story failed, and passed otherwise. Pending and skipped steps do not mark the story as failed. Given stories are not sent as their own events. Excluded stories are not sent.
SELECT * FROM VividusStory WHERE runId = '5d8c1a2e-3b4f-4c6d-9e10-11a2b3c4d5e6' FACET status
newrelic.enabled=true
newrelic.api-key=NRAK-example
newrelic.endpoint=https://insights-collector.newrelic.com/v1/accounts/12345/events
newrelic.event.attribute.environment=staging
newrelic.event.attribute.teamName=qa
VividusRun, sent before the stories[
{
"eventType": "VividusRun",
"runId": "5d8c1a2e-3b4f-4c6d-9e10-11a2b3c4d5e6",
"phase": "started",
"environment": "staging",
"teamName": "qa"
}
]
VividusRun, sent after the stories[
{
"eventType": "VividusRun",
"runId": "5d8c1a2e-3b4f-4c6d-9e10-11a2b3c4d5e6",
"phase": "finished",
"status": "passed",
"environment": "staging",
"teamName": "qa"
}
]
VividusStory, sent after the story Login[
{
"eventType": "VividusStory",
"runId": "5d8c1a2e-3b4f-4c6d-9e10-11a2b3c4d5e6",
"storyName": "Login",
"status": "passed",
"environment": "staging",
"teamName": "qa"
}
]