MCPcopy Index your code
hub / github.com/netdata/netdata / emitChart

Function emitChart

src/go/plugin/framework/chartemit/netdata.go:28–48  ·  view source on GitHub ↗
(api *netdataapi.API, env EmitEnv, chartID string, meta chartengine.ChartMeta, obsolete bool)

Source from the content-addressed store, hash-verified

26}
27
28func emitChart(api *netdataapi.API, env EmitEnv, chartID string, meta chartengine.ChartMeta, obsolete bool) {
29 opts := ""
30 if obsolete {
31 opts = "obsolete"
32 }
33 api.CHART(netdataapi.ChartOpts{
34 TypeID: sanitizeWireID(env.TypeID),
35 ID: sanitizeWireID(chartID),
36 Name: "",
37 Title: sanitizeWireValue(meta.Title),
38 Units: sanitizeWireValue(meta.Units),
39 Family: sanitizeWireValue(meta.Family),
40 Context: sanitizeWireValue(meta.Context),
41 ChartType: string(meta.Type),
42 Priority: meta.Priority,
43 UpdateEvery: env.UpdateEvery,
44 Options: opts,
45 Plugin: sanitizeWireValue(env.Plugin),
46 Module: sanitizeWireValue(env.Module),
47 })
48}
49
50func emitChartLabels(api *netdataapi.API, env EmitEnv, chartLabels map[string]string) {
51 chartKeys := make([]string, 0, len(chartLabels))

Callers 2

emitCreatePhaseFunction · 0.85
emitRemovePhaseFunction · 0.85

Calls 3

sanitizeWireIDFunction · 0.85
sanitizeWireValueFunction · 0.85
CHARTMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…