Skip to content

Commit

Permalink
Merge pull request kubeedge#5628 from forsaken628/otel
Browse files Browse the repository at this point in the history
Add opentelemetry to mapper-framework for enhancing pushmethod.
  • Loading branch information
kubeedge-bot authored Oct 23, 2024
2 parents fdc990f + 5ac358a commit 93e6aad
Show file tree
Hide file tree
Showing 16 changed files with 1,166 additions and 1,367 deletions.
8 changes: 8 additions & 0 deletions build/crds/devices/devices_v1beta1_device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,14 @@ spec:
description: publish topic for mqtt
type: string
type: object
otel:
description: OTEL Push Method configuration for otel
properties:
endpointURL:
description: the target endpoint URL the Exporter will
connect to, like https://localhost:4318/v1/metrics
type: string
type: object
type: object
reportCycle:
description: Define how frequent mapper will report the value.
Expand Down
6 changes: 5 additions & 1 deletion hack/generate-groups.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ GENS="$1"
OUTPUT_PKG="$2"
APIS_PKG="$3"
GROUPS_WITH_VERSIONS="$4"
GOBIN="${GOBIN-$GOPATH/bin}"
if [ $(go env GOBIN) != "" ]; then
GOBIN=${GOBIN-$(go env GOBIN)}
else
GOBIN=${GOBIN-$(go env GOPATH)/bin}
fi
shift 4

(
Expand Down
8 changes: 8 additions & 0 deletions manifests/charts/cloudcore/crds/devices_v1beta1_device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,14 @@ spec:
description: publish topic for mqtt
type: string
type: object
otel:
description: OTEL Push Method configuration for otel
properties:
endpointURL:
description: the target endpoint URL the Exporter will
connect to, like https://localhost:4318/v1/metrics
type: string
type: object
type: object
reportCycle:
description: Define how frequent mapper will report the value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ type PushMethod struct {
// MQTT Push method configuration for mqtt
// +optional
MQTT *PushMethodMQTT `json:"mqtt,omitempty"`
// OTEL Push Method configuration for otel
// +optional
OTEL *PushMethodOTEL `json:"otel,omitempty"`
// DBMethod represents the method used to push data to database,
// please ensure that the mapper can access the destination address.
// +optional
Expand Down Expand Up @@ -181,6 +184,11 @@ type PushMethodMQTT struct {
Retained bool `json:"retained,omitempty"`
}

type PushMethodOTEL struct {
// the target endpoint URL the Exporter will connect to, like https://localhost:4318/v1/metrics
EndpointURL string `protobuf:"bytes,1,opt,name=endpointURL,proto3" json:"endpointURL,omitempty"`
}

type DBMethodConfig struct {
// method configuration for database
// +optional
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 93e6aad

Please sign in to comment.