MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / OpenTelemetrySpecPresent

Function OpenTelemetrySpecPresent

internal/collector/util.go:18–31  ·  view source on GitHub ↗
(object T)

Source from the content-addressed store, hash-verified

16}
17
18func OpenTelemetrySpecPresent[T CrunchyCRD](object T) bool {
19
20 switch v := any(object).(type) {
21 case *v1beta1.InstrumentationSpec:
22 return v != nil
23 case *v1beta1.PostgresCluster:
24 return v != nil && v.Spec.Instrumentation != nil
25 case *v1beta1.PGAdmin:
26 return v != nil && v.Spec.Instrumentation != nil
27 default:
28 return false
29 }
30
31}
32
33func OpenTelemetryLogsOrMetricsEnabled[T CrunchyCRD](
34 ctx context.Context,

Callers 3

OpenTelemetryLogsEnabledFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected