File tree Expand file tree Collapse file tree 2 files changed +26
-8
lines changed Expand file tree Collapse file tree 2 files changed +26
-8
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,14 @@ import (
13
13
func (d * Data ) Attributes () []attribute.KeyValue {
14
14
var attrs []attribute.KeyValue
15
15
16
- attrs = append (attrs , attribute .Int64 ("Nodes" , d .Nodes ))
16
+ attrs = append (attrs , attribute .String ("ProjectName" , d .ProjectName ))
17
+ attrs = append (attrs , attribute .String ("ProjectVersion" , d .ProjectVersion ))
18
+ attrs = append (attrs , attribute .String ("ProjectArchitecture" , d .ProjectArchitecture ))
19
+ attrs = append (attrs , attribute .String ("ClusterID" , d .ClusterID ))
20
+ attrs = append (attrs , attribute .Int64 ("ClusterNodeCount" , d .ClusterNodeCount ))
21
+ attrs = append (attrs , attribute .String ("ClusterVersion" , d .ClusterVersion ))
22
+ attrs = append (attrs , attribute .String ("ClusterPlatform" , d .ClusterPlatform ))
23
+ attrs = append (attrs , attribute .String ("DeploymentID" , d .DeploymentID ))
17
24
18
25
19
26
return attrs
Original file line number Diff line number Diff line change @@ -11,16 +11,27 @@ import (
11
11
sdktrace "go.opentelemetry.io/otel/sdk/trace"
12
12
)
13
13
14
- // Data includes common telemetry data points.
15
- // FIXME(pleshakov): Define the data points.
16
- // Currently, only one data point is added, for the only reason that we can make sure the generator
17
- // generates code for a struct defined in this package.
18
- // https://github.com/nginxinc/telemetry-exporter/issues/8 will define the actual data points.
14
+ // Data defines common telemetry data points for NGINX Kubernetes-related projects.
19
15
//
20
16
//go:generate go run -tags=generator github.com/nginxinc/telemetry-exporter/cmd/generator -type Data
21
17
type Data struct {
22
- // Nodes is a number of nodes.
23
- Nodes int64
18
+ // ProjectName is the name of the project.
19
+ ProjectName string
20
+ // ProjectVersion is the version of the project.
21
+ ProjectVersion string
22
+ // ProjectArchitecture is the architecture the project. For example, "amd64".
23
+ ProjectArchitecture string
24
+ // ClusterID is the unique id of the Kubernetes cluster where the project is installed.
25
+ // It is the UID of the `kube-system` Namespace.
26
+ ClusterID string
27
+ // ClusterVersion is the Kubernetes version of the cluster.
28
+ ClusterVersion string
29
+ // ClusterPlatform is the Kubernetes platform of the cluster.
30
+ ClusterPlatform string
31
+ // DeploymentID is the unique id of the project installation in the cluster.
32
+ DeploymentID string
33
+ // ClusterNodeCount is the number of nodes in the cluster.
34
+ ClusterNodeCount int64
24
35
}
25
36
26
37
// Exportable allows exporting telemetry data using the Exporter.
You can’t perform that action at this time.
0 commit comments