Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update collector to use common data types from telemetry-exporter #5198

Merged
merged 15 commits into from
Mar 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Re-generate schema and attributes
shaun-nx committed Mar 8, 2024
commit e122d174a1c8a14d15a3c5568b10fa032978fd6b
53 changes: 27 additions & 26 deletions internal/telemetry/data.avdl
Original file line number Diff line number Diff line change
@@ -7,39 +7,40 @@
/** The time our edge ingested the event */
long ingestTime;


/** ProjectName is the name of the project. */
string? projectName = null;

string? ProjectName = null;
/** ProjectVersion is the version of the project. */
string? projectVersion = null;

/** ProjectArchitecture is the architecture the project. For example, "amd64". */
string? projectArchitecture = null;

/** ClusterID is the unique id of the Kubernetes cluster where the project is installed. */
string? clusterID = null;

/** ClusterNodeCount is the number of nodes in the cluster. */
long? clusterNodeCount = null;

string? ProjectVersion = null;

/** ProjectArchitecture is the architecture of the project. For example, "amd64". */
string? ProjectArchitecture = null;

/** ClusterID is the unique id of the Kubernetes cluster where the project is installed.
It is the UID of the `kube-system` Namespace. */
string? ClusterID = null;

/** ClusterVersion is the Kubernetes version of the cluster. */
string? clusterVersion = null;

string? ClusterVersion = null;
/** ClusterPlatform is the Kubernetes platform of the cluster. */
string? clusterPlatform = null;

string? ClusterPlatform = null;
/** InstallationID is the unique id of the project installation in the cluster. */
string? installationID = null;

string? InstallationID = null;

/** ClusterNodeCount is the number of nodes in the cluster. */
long? ClusterNodeCount = null;

/** VirtualServer is the number of VirtualServer managed by the Ingress Controller. */
long? virtualServers = null;

long? VirtualServers = null;
/** VirtualServerRoutes is the number of VirtualServerRoutes managed by the Ingress Controller. */
long? virtualServerRoutes = null;

long? VirtualServerRoutes = null;
/** TransportServers is the number of TransportServers managed by the Ingress Controller. */
long? transportServers = null;

long? TransportServers = null;
}
}
5 changes: 4 additions & 1 deletion internal/telemetry/data_attributes_generated.go
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
package telemetry

package telemetry
/*
This is a generated file. DO NOT EDIT.
*/

import (
"go.opentelemetry.io/otel/attribute"


ngxTelemetry "github.com/nginxinc/telemetry-exporter/pkg/telemetry"

)

func (d *Data) Attributes() []attribute.KeyValue {
var attrs []attribute.KeyValue

attrs = append(attrs, d.Data.Attributes()...)
attrs = append(attrs, d.NICResourceCounts.Attributes()...)


return attrs
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package telemetry

package telemetry
/*
This is a generated file. DO NOT EDIT.
*/

import (
"go.opentelemetry.io/otel/attribute"


ngxTelemetry "github.com/nginxinc/telemetry-exporter/pkg/telemetry"

)

func (d *NICResourceCounts) Attributes() []attribute.KeyValue {
@@ -16,6 +18,7 @@ func (d *NICResourceCounts) Attributes() []attribute.KeyValue {
attrs = append(attrs, attribute.Int64("VirtualServers", d.VirtualServers))
attrs = append(attrs, attribute.Int64("VirtualServerRoutes", d.VirtualServerRoutes))
attrs = append(attrs, attribute.Int64("TransportServers", d.TransportServers))


return attrs
}