Skip to content

Commit

Permalink
ensure not to break status JSON key names
Browse files Browse the repository at this point in the history
  • Loading branch information
GustavoCaso committed Nov 28, 2023
1 parent cf5fca1 commit 880fb5a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/agent/gui/views/templates/generalStatus.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@
<div class="stat">
<span class="stat_title">APM</span>
<span class="stat_data">
{{- with .apmStatus -}}
{{- with .apmStats -}}
{{- if .error }}
Not running or unreachable on localhost:{{.port}}<br>
Error: {{.error}}<br>
Expand Down
2 changes: 1 addition & 1 deletion pkg/status/render/fixtures/agent_status.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@
"SketchesFlushErrors":0,
"SketchesFlushed":0
},
"apmStatus":{
"apmStats":{
"Event":{

},
Expand Down
2 changes: 1 addition & 1 deletion pkg/status/render/templates/trace-agent.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ NOTE: Changes made to this template should be reflected on the following templat
=========
APM Agent
=========
{{- with .apmStatus }}
{{- with .apmStats }}
{{- if .error }}

Status: Not running or unreachable on localhost:{{.port}}.
Expand Down
2 changes: 1 addition & 1 deletion pkg/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func GetStatus(verbose bool, invAgent inventoryagent.Component) (map[string]inte
}

stats["processAgentStatus"] = GetProcessAgentStatus()
stats["apmStatus"] = apm.GetAPMStatus()
stats["apmStats"] = apm.GetAPMStatus()

if !config.Datadog.GetBool("no_proxy_nonexact_match") {
stats["TransportWarnings"] = httputils.GetNumberOfWarnings() > 0
Expand Down

0 comments on commit 880fb5a

Please sign in to comment.