Faros Tags & Paths
What are Faros tags and paths?
Faros tags (faros_Tag
) and Faros paths (faros_Path
) are models in the Faros schema that allow you to arbitrarily organize data within Faros.
"Universal tag"
type faros_Tag @model(key: ["uid"]) {
"The unique identifier for the tag across key and value"
uid: ID
"The key of the tag"
key: String
"The value of the tag"
value: String
}
"Universal hierarchical path"
type faros_Path @model(key: ["uid"]) {
"The unique identifier for the path"
uid: ID
"The path as a string"
path: String
"The path represented as an array of its parts"
parts: [String!]
}
Supported Models
The entities that can be organized with tags and paths are listed in the supported models table below. The models that appear in the columns under faros_Tag
and faros_Path
are the many-to-many association models that are used to link a tag or path to a desired entity. If a model that you would like to organize is not in the list, please reach out to Faros support for next steps on getting it added to the schema!
Model | faros_Tag | faros_Path |
---|---|---|
ams_Activity | ams_ActivityTag | |
cicd_Agent | cicd_AgentTag | |
cicd_Build | cicd_BuildTag | |
cicd_BuildStep | cicd_BuildStepTag | |
cicd_Deployment | cicd_DeploymentTag | |
compute_Application | compute_ApplicationTag | compute_ApplicationPath |
faros_MetricDefinition | faros_MetricDefinitionTag | |
faros_MetricValue | faros_MetricValueTag | |
org_Employee | org_EmployeeTag | |
org_Team | org_TeamTag | |
qa_TestExecution | qa_TestExecutionTag | |
survey_Question | survey_QuestionTag | |
survey_Survey | survey_SurveyTag | |
tms_Project | tms_ProjectTag | tms_ProjectPath |
tms_TaskBoard | tms_TaskBoardTag | |
vcs_Repository | vcs_RepositoryTag |
How do I associate a Faros tag or path with an entity?
An entity is associated with a Faros tag or path if an instance of the model listed in the faros_Tag
or faros_Path
columns of the Supported Models table associates the entity with the desired faros_Tag
or faros_Path
.
Faros Tag Example
If the following compute_Application
exists in my Faros graph
{
"compute_Application": {
"name": "solaris-app",
"platform": "AWS"
}
}
And a faros_Tag
exists in my Faros graph that indicates if something is not customer facing
{
"faros_Tag": {
"uid": "Customer Facing__false",
"key": "Customer Facing",
"value": "false"
}
}
Note: The tag's uid is
Customer Facing__false
so that it is unique across key and value.
We can add a compute_ApplicationTag
to tag solaris-app
as not customer facing
{
"compute_ApplicationTag": {
"compute_Application": {
"name": "solaris-app",
"platform": "AWS"
},
"faros_Tag": {
"uid": "Customer Facing__false"
}
}
}
Faros Path Example
If the following compute_Application
tag exists in my Faros graph
{
"compute_Application": {
"name": "solaris-app",
"platform": "AWS"
}
}
And a faros_Path
exists in my Faros graph
{
"faros_Path": {
"uid": "dir_1/dir_2",
"path": "dir_1/dir_2",
"parts": ["dir_1", "dir_2"]
}
}
We can add a compute_ApplicationPath
to associate solaris-app
with path/to/app
{
"compute_ApplicationPath": {
"compute_Application": {
"name": "solaris-app",
"platform": "AWS"
},
"faros_Path": {
"uid": "dir_1/dir_2"
}
}
}
How to use Faros tags or paths in dashboards?
Once entities in your graph are associated with the desired faros_Tags
and faros_Paths
the next step is to use these associations to organize the data within your dashboards. Faros exposes three tables (Faros Tag
, Faros Tags
, and Faros Path
) that are used to join in tag and path information for desired entities. To join with these tables, you will need to join the ID field of the entity that you would like to augment with tags/paths with the Entity ID field on the tag/path table.
The Faros Tag
table should only be used if you care about a single tag per entity. There are exceptions, but the reason we suggest this is because it will explode the number of returned rows by the number of tags per entity. If you are interested in more than one tag per entity, but you want all the tags on a single row, you will need to use the Faros Tags
table with custom columns that performs regex extracts to isolate the tag values that you care about.
Faros Tag Example
We can join the Deployment
table with the Faros Tag
table by joining the Application ID
field with the Entity ID
field. This will explode the deployment rows with one row per application tag.
Because of the row explosion per tag, we should now filter to avoid double counting deployments. In this example, let's filter to only the deployments of applications that are not customer facing.
Faros Tags Example
We can join the Deployment
table with the Faros Tags
table to augment each row with all of the application's tags. To do this, we join the Application ID
field with the Entity ID
field.
We can now extract the values of the tags that we care about using a custom column with a regex extract formula. Replace <tag_key>
with your desired tag key.
regexextract([Faros Tags ā Tags], "<tag_key>:([^\}]+)")
Faros Path Example
We can join the Deployments
table with the Faros Path
table to explode each deployment row by the hierarchy defined by the application's Faros path. To do this, we join the Application ID
field with the Entity ID
field.
Now using a filter on Ancestor
, either within the question or at the dashboard level, you can target data at specific levels of your path hierarchies. The root node of any Faros path is the all
node.
You can also construct click-through behavior for your questions that drills down into the descendant node within the path for an intuitive hierarchical traversal found in many other dashboards within Faros.
Updated 3 months ago