Skip to content

Commit

Permalink
Move service graph section under the Traces product
Browse files Browse the repository at this point in the history
- Updated template configs checkbox location
- Updated scripts locations
  • Loading branch information
ralongit committed Dec 10, 2023
1 parent 4fdf299 commit 89b2a41
Show file tree
Hide file tree
Showing 40 changed files with 523 additions and 523 deletions.
18 changes: 9 additions & 9 deletions configs/2-1-k8s-eks.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,6 @@
"description": "",
"hint": "Check this box if you want Logz.io Telemetry Collector to collect only the relevant system metrics to populate Kubernetes 360 and prebuilt dashboards. In addition, we will also collect application metrics that are exposed by your pods.",
"value": true
},
{
"type": "boolean",
"name": "isServiceGraph",
"label": "Collect Service Graph metrics",
"description": "",
"hint": "Check this box if you want Logz.io Telemetry Collector to collect Service Graph metrics to populate the Services Overview.",
"value": true
}
],
"dashboards": [
Expand All @@ -96,7 +88,15 @@
"type": "TRACING",
"description": "",
"hint": "Switch the toggle on if you want Logz.io Telemetry Collector to collect traces from your instrumented applications in the Kubernetes environment",
"params": []
"params": [
{
"type": "boolean",
"name": "isServiceGraph",
"label": "Collect Service Graph metrics",
"description": "",
"hint": "Check this box if you want Logz.io Telemetry Collector to collect Service Graph metrics to populate the Services Overview.",
"value": true
}]
}
]
},
Expand Down
18 changes: 9 additions & 9 deletions configs/2-2-k8s-aks.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@
"hint": "Check this box if you want Logz.io Telemetry Collector to collect only the relevant system metrics to populate Kubernetes 360 and prebuilt dashboards. In addition, we will also collect application metrics that are exposed by your pods.",
"value": true
},
{
"type": "boolean",
"name": "isServiceGraph",
"label": "Collect Service Graph metrics",
"description": "",
"hint": "Check this box if you want Logz.io Telemetry Collector to collect Service Graph metrics to populate the Services Overview.",
"value": true
},
{
"type": "boolean",
"name": "isWindows",
Expand All @@ -90,7 +82,15 @@
{
"type": "TRACING",
"hint": "Switch the toggle on if you want Logz.io Telemetry Collector to collect traces from your instrumented applications in the Kubernetes environment",
"params": []
"params": [
{
"type": "boolean",
"name": "isServiceGraph",
"label": "Collect Service Graph metrics",
"description": "",
"hint": "Check this box if you want Logz.io Telemetry Collector to collect Service Graph metrics to populate the Services Overview.",
"value": true
}]
}
]
},
Expand Down
18 changes: 9 additions & 9 deletions configs/2-3-k8s-gke.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@
"description": "",
"hint": "Check this box if you want Logz.io Telemetry Collector to collect only the relevant system metrics to populate Kubernetes 360 and prebuilt dashboards. In addition, we will also collect application metrics that are exposed by your pods.",
"value": true
},
{
"type": "boolean",
"name": "isServiceGraph",
"label": "Collect Service Graph metrics",
"description": "",
"hint": "Check this box if you want Logz.io Telemetry Collector to collect Service Graph metrics to populate the Services Overview.",
"value": true
}
],
"dashboards": [
Expand All @@ -88,7 +80,15 @@
"type": "TRACING",
"description": "",
"hint": "Switch the toggle on if you want Logz.io Telemetry Collector to collect traces from your instrumented applications in the Kubernetes environment",
"params": []
"params": [
{
"type": "boolean",
"name": "isServiceGraph",
"label": "Collect Service Graph metrics",
"description": "",
"hint": "Check this box if you want Logz.io Telemetry Collector to collect Service Graph metrics to populate the Services Overview.",
"value": true
}]
}
]
},
Expand Down
18 changes: 9 additions & 9 deletions configs/2-4-k8s-digitalocean.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@
"description": "",
"hint": "Check this box if you want Logz.io Telemetry Collector to collect only the relevant system metrics to populate Kubernetes 360 and prebuilt dashboards. In addition, we will also collect application metrics that are exposed by your pods.",
"value": true
},
{
"type": "boolean",
"name": "isServiceGraph",
"label": "Collect Service Graph metrics",
"description": "",
"hint": "Check this box if you want Logz.io Telemetry Collector to collect Service Graph metrics to populate the Services Overview.",
"value": true
}
],
"dashboards": [
Expand All @@ -88,7 +80,15 @@
"type": "TRACING",
"description": "",
"hint": "Switch the toggle on if you want Logz.io Telemetry Collector to collect traces from your instrumented applications in the Kubernetes environment",
"params": []
"params": [
{
"type": "boolean",
"name": "isServiceGraph",
"label": "Collect Service Graph metrics",
"description": "",
"hint": "Check this box if you want Logz.io Telemetry Collector to collect Service Graph metrics to populate the Services Overview.",
"value": true
}]
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,4 @@ if $IS_FILTER; then
# Build enable metrics filter Helm set
CLOUD_PROVIDER='aks'
execute_task 'build_enable_metrics_filter_helm_set' 'Building enable metrics filter Helm set'
fi
if $IS_SERVICE_GRAPH; then
execute_task 'build_enable_service_graph_helm_set' 'Building service graph Helm set'
fi
fi
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ execute_task 'get_logzio_metrics_token' 'Getting Logz.io SPM token'
execute_task 'build_enable_spm_helm_set' 'Building enable SPM Helm set'
# Build Logz.io SPM token Helm set
execute_task 'build_logzio_spm_token_helm_set' 'Building Logz.io SPM token Helm set'
# Get if service graph option was selected
execute_task 'get_is_service_graph_was_selected' 'Getting is service graph option was selected'
if $IS_SERVICE_GRAPH; then
execute_task 'build_enable_service_graph_helm_set' 'Building service graph Helm set'
fi
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,4 @@ if $IS_FILTER; then
# Build enable metrics filter Helm set
CLOUD_PROVIDER='aks'
execute_task 'build_enable_metrics_filter_helm_set' 'Building enable metrics filter Helm set'
fi
# Get if service graph option was selected
execute_task 'get_is_service_graph_was_selected' 'Getting is service graph option was selected'
if $IS_SERVICE_GRAPH; then
execute_task 'build_enable_service_graph_helm_set' 'Building service graph Helm set'
fi
fi
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ execute_task 'get_logzio_metrics_token' 'Getting Logz.io SPM token'
execute_task 'build_enable_spm_helm_set' 'Building enable SPM Helm set'
# Build Logz.io SPM token Helm set
execute_task 'build_logzio_spm_token_helm_set' 'Building Logz.io SPM token Helm set'
# Get if service graph option was selected
execute_task 'get_is_service_graph_was_selected' 'Getting is service graph option was selected'
if $IS_SERVICE_GRAPH; then
execute_task 'build_enable_service_graph_helm_set' 'Building service graph Helm set'
fi
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,4 @@ fi
if $IS_FARGATE; then
# Build Fargate collector mode standalone Helm set
execute_task 'build_fargate_collector_mode_standalone_helm_set' 'Building Fargate collector mode standalone Helm set'
fi
# Get if service graph option was selected
execute_task 'get_is_service_graph_was_selected' 'Getting is service graph option was selected'
if $IS_SERVICE_GRAPH; then
execute_task 'build_enable_service_graph_helm_set' 'Building service graph Helm set'
fi
fi
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ execute_task 'get_logzio_metrics_token' 'Getting Logz.io SPM token'
execute_task 'build_enable_spm_helm_set' 'Building enable SPM Helm set'
# Build Logz.io SPM token Helm set
execute_task 'build_logzio_spm_token_helm_set' 'Building Logz.io SPM token Helm set'
# Get if service graph option was selected
execute_task 'get_is_service_graph_was_selected' 'Getting is service graph option was selected'
if $IS_SERVICE_GRAPH; then
execute_task 'build_enable_service_graph_helm_set' 'Building service graph Helm set'
fi
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,4 @@ if $IS_FILTER; then
# Build enable metrics filter Helm set
CLOUD_PROVIDER='gke'
execute_task 'build_enable_metrics_filter_helm_set' 'Building enable metrics filter Helm set'
fi
# Get if service graph option was selected
execute_task 'get_is_service_graph_was_selected' 'Getting is service graph option was selected'
if $IS_SERVICE_GRAPH; then
execute_task 'build_enable_service_graph_helm_set' 'Building service graph Helm set'
fi
fi
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ execute_task 'get_logzio_metrics_token' 'Getting Logz.io SPM token'
execute_task 'build_enable_spm_helm_set' 'Building enable SPM Helm set'
# Build Logz.io SPM token Helm set
execute_task 'build_logzio_spm_token_helm_set' 'Building Logz.io SPM token Helm set'
# Get if service graph option was selected
execute_task 'get_is_service_graph_was_selected' 'Getting is service graph option was selected'
if $IS_SERVICE_GRAPH; then
execute_task 'build_enable_service_graph_helm_set' 'Building service graph Helm set'
fi
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,4 @@ if $IS_FILTER; then
# Build enable metrics filter Helm set
CLOUD_PROVIDER='aks'
execute_task 'build_enable_metrics_filter_helm_set' 'Building enable metrics filter Helm set'
fi
# Get if service graph option was selected
execute_task 'get_is_service_graph_was_selected' 'Getting is service graph option was selected'
if $IS_SERVICE_GRAPH; then
execute_task 'build_enable_service_graph_helm_set' 'Building service graph Helm set'
fi
fi
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ execute_task 'get_logzio_metrics_token' 'Getting Logz.io SPM token'
execute_task 'build_enable_spm_helm_set' 'Building enable SPM Helm set'
# Build Logz.io SPM token Helm set
execute_task 'build_logzio_spm_token_helm_set' 'Building Logz.io SPM token Helm set'
# Get if service graph option was selected
execute_task 'get_is_service_graph_was_selected' 'Getting is service graph option was selected'
if $IS_SERVICE_GRAPH; then
execute_task 'build_enable_service_graph_helm_set' 'Building service graph Helm set'
fi
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,4 @@ if $IS_FILTER; then
# Build enable metrics filter Helm set
CLOUD_PROVIDER='aks'
execute_task 'build_enable_metrics_filter_helm_set' 'Building enable metrics filter Helm set'
fi
# Get if service graph option was selected
execute_task 'get_is_service_graph_was_selected' 'Getting is service graph option was selected'
if $IS_SERVICE_GRAPH; then
execute_task 'build_enable_service_graph_helm_set' 'Building service graph Helm set'
fi
fi
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ execute_task 'get_logzio_metrics_token' 'Getting Logz.io SPM token'
execute_task 'build_enable_spm_helm_set' 'Building enable SPM Helm set'
# Build Logz.io SPM token Helm set
execute_task 'build_logzio_spm_token_helm_set' 'Building Logz.io SPM token Helm set'
# Get if service graph option was selected
execute_task 'get_is_service_graph_was_selected' 'Getting is service graph option was selected'
if $IS_SERVICE_GRAPH; then
execute_task 'build_enable_service_graph_helm_set' 'Building service graph Helm set'
fi
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,4 @@ fi
if $IS_FARGATE; then
# Build Fargate collector mode standalone Helm set
execute_task 'build_fargate_collector_mode_standalone_helm_set' 'Building Fargate collector mode standalone Helm set'
fi
# Get if service graph option was selected
execute_task 'get_is_service_graph_was_selected' 'Getting is service graph option was selected'
if $IS_SERVICE_GRAPH; then
execute_task 'build_enable_service_graph_helm_set' 'Building service graph Helm set'
fi
fi
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ execute_task 'get_logzio_metrics_token' 'Getting Logz.io SPM token'
execute_task 'build_enable_spm_helm_set' 'Building enable SPM Helm set'
# Build Logz.io SPM token Helm set
execute_task 'build_logzio_spm_token_helm_set' 'Building Logz.io SPM token Helm set'
# Get if service graph option was selected
execute_task 'get_is_service_graph_was_selected' 'Getting is service graph option was selected'
if $IS_SERVICE_GRAPH; then
execute_task 'build_enable_service_graph_helm_set' 'Building service graph Helm set'
fi
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,4 @@ if $IS_FILTER; then
# Build enable metrics filter Helm set
CLOUD_PROVIDER='gke'
execute_task 'build_enable_metrics_filter_helm_set' 'Building enable metrics filter Helm set'
fi
# Get if service graph option was selected
execute_task 'get_is_service_graph_was_selected' 'Getting is service graph option was selected'
if $IS_SERVICE_GRAPH; then
execute_task 'build_enable_service_graph_helm_set' 'Building service graph Helm set'
fi
fi
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ execute_task 'get_logzio_metrics_token' 'Getting Logz.io SPM token'
execute_task 'build_enable_spm_helm_set' 'Building enable SPM Helm set'
# Build Logz.io SPM token Helm set
execute_task 'build_logzio_spm_token_helm_set' 'Building Logz.io SPM token Helm set'
# Get if service graph option was selected
execute_task 'get_is_service_graph_was_selected' 'Getting is service graph option was selected'
if $IS_SERVICE_GRAPH; then
execute_task 'build_enable_service_graph_helm_set' 'Building service graph Helm set'
fi
Original file line number Diff line number Diff line change
Expand Up @@ -258,78 +258,4 @@ function Build-EnableMetricsFilterHelmSet {

Write-TaskPostRun "`$script:LogHelmSets += '$HelmSet'"
Write-TaskPostRun "`$script:HelmSets += '$HelmSet'"
}

# Gets is service graph was selected
# Input:
# FuncArgs - Hashtable {MetricsParams = $script:MetricsParams}
# Output:
# IsServiceGraph - Tells if service graph was selected (true/false)
function Get-IsServiceGraphWasSelected {
param (
[hashtable]$FuncArgs
)

$local:ExitCode = 4
$local:FuncName = $MyInvocation.MyCommand.Name

$local:Message = 'Getting if service graph option was selected ...'
Send-LogToLogzio $script:LogLevelDebug $Message $script:LogStepMetrics $script:LogScriptMetrics $FuncName $script:AgentId $script:Platform $script:Subtype $script:CurrentDataSource
Write-Log $script:LogLevelDebug $Message

$local:Err = Test-AreFuncArgsExist $FuncArgs @('MetricsParams')
if ($Err.Count -ne 0) {
$Message = "metrics.ps1 ($ExitCode): $($Err[0])"
Send-LogToLogzio $script:LogLevelError $Message $script:LogStepMetrics $script:LogScriptMetrics $FuncName $script:AgentId $script:Platform $script:Subtype $script:CurrentDataSource
Write-TaskPostRun "Write-Error `"$Message`""

return $ExitCode
}

$local:MetricsParams = $FuncArgs.MetricsParams

$Err = Get-ParamValue $MetricsParams 'isServiceGraph'
if ($Err.Count -ne 0) {
$Message = "metrics.ps1 ($ExitCode): $($Err[0])"
Send-LogToLogzio $script:LogLevelError $Message $script:LogStepMetrics $script:LogScriptMetrics $FuncName $script:AgentId $script:Platform $script:Subtype $script:CurrentDataSource
Write-TaskPostRun "Write-Error `"$Message`""

return $ExitCode
}

$local:IsServiceGraph = $script:ParamValue

if ($IsServiceGraph) {
$Message = 'Service Graph option was selected'
}
else {
$Message = 'Service Graph option was not selected'
}
Send-LogToLogzio $script:LogLevelDebug $Message $script:LogStepMetrics $script:LogScriptMetrics $FuncName $script:AgentId $script:Platform $script:Subtype $script:CurrentDataSource
Write-Log $script:LogLevelDebug $Message

Write-TaskPostRun "`$script:IsServiceGraph = `$$IsServiceGraph"
}

# Builds enable service graph Helm set
# Input:
# ---
# Output:
# LogHelmSets - Containt all the Helm sets for logging
# HelmSets - Contains all the Helm sets
function Build-EnableServiceGraphHelmSet {
$local:FuncName = $MyInvocation.MyCommand.Name

$local:Message = 'Building service graph Helm set ...'
Send-LogToLogzio $script:LogLevelDebug $Message $script:LogStepMetrics $script:LogScriptMetrics $FuncName $script:AgentId $script:Platform $script:Subtype $script:CurrentDataSource
Write-Log $script:LogLevelDebug $Message

$local:HelmSet = " --set logzio-k8s-telemetry.serviceGraph.enabled=true"

$local:Message = "Enable service graph Helm set is '$HelmSet'"
Send-LogToLogzio $script:LogLevelDebug $Message $script:LogStepMetrics $script:LogScriptMetrics $FuncName $script:AgentId $script:Platform $script:Subtype $script:CurrentDataSource
Write-Log $script:LogLevelDebug $Message

Write-TaskPostRun "`$script:LogHelmSets += '$HelmSet'"
Write-TaskPostRun "`$script:HelmSets += '$HelmSet'"
}
}
Loading

0 comments on commit 89b2a41

Please sign in to comment.