Skip to content

Commit 465c554

Browse files
authored
change field "PluginsTracing.Enable" to "PluginsTracing.Enabled" (#43)
Signed-off-by: laminar <[email protected]>
1 parent cd256da commit 465c554

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

context/context.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ type FunctionOut struct {
299299
}
300300

301301
type PluginsTracing struct {
302-
Enable bool `json:"enable" yaml:"enable"`
302+
Enabled bool `json:"enabled" yaml:"enabled"`
303303
Provider *TracingProvider `json:"provider" yaml:"provider"`
304304
Tags map[string]string `json:"tags,omitempty" yaml:"tags,omitempty"`
305305
Baggage map[string]string `json:"baggage" yaml:"baggage"`
@@ -622,7 +622,7 @@ func (o *FunctionOut) WithData(data []byte) *FunctionOut {
622622
}
623623

624624
func (tracing *PluginsTracing) IsEnabled() bool {
625-
return tracing.Enable
625+
return tracing.Enabled
626626
}
627627

628628
func (tracing *PluginsTracing) ProviderName() string {
@@ -752,7 +752,7 @@ func parseContext() (*FunctionContext, error) {
752752
ctx.podNamespace = podNamespace
753753
}
754754

755-
if ctx.PluginsTracing != nil && ctx.PluginsTracing.Enable {
755+
if ctx.PluginsTracing != nil && ctx.PluginsTracing.IsEnabled() {
756756
if ctx.PluginsTracing.Provider != nil && ctx.PluginsTracing.Provider.Name != "" {
757757
switch ctx.PluginsTracing.Provider.Name {
758758
case TracingProviderSkywalking, TracingProviderOpentelemetry:

context/context_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var (
5454
"prePlugins": ["plgA", "plgB", "plgC"],
5555
"postPlugins": ["plgC", "plgA", "plgB"],
5656
"pluginsTracing": {
57-
"enable": true,
57+
"enabled": true,
5858
"provider": {
5959
"name": "skywalking",
6060
"oapServer": "localhost:xxx"
@@ -79,7 +79,7 @@ var (
7979
"prePlugins": ["plgA", "plgB", "plgC"],
8080
"postPlugins": ["plgC", "plgA", "plgB"],
8181
"pluginsTracing": {
82-
"enable": true,
82+
"enabled": true,
8383
"provider": {
8484
"name": "",
8585
"oapServer": "localhost:xxx"
@@ -94,7 +94,7 @@ var (
9494
"prePlugins": ["plgA", "plgB", "plgC"],
9595
"postPlugins": ["plgC", "plgA", "plgB"],
9696
"pluginsTracing": {
97-
"enable": true,
97+
"enabled": true,
9898
"provider": {
9999
"name": "wrongProvider",
100100
"oapServer": "localhost:xxx"

plugin/skywalking/test/binding-event/manifests/manifests.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ spec:
8484
}
8585
},
8686
"pluginsTracing": {
87-
"enable": true,
87+
"enabled": true,
8888
"provider": {
8989
"name": "skywalking",
9090
"oapServer": "collector.default.svc:19876"
@@ -161,7 +161,7 @@ spec:
161161
}
162162
},
163163
"pluginsTracing": {
164-
"enable": true,
164+
"enabled": true,
165165
"provider": {
166166
"name": "skywalking",
167167
"oapServer": "collector.default.svc:19876"

plugin/skywalking/test/sync-request/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ services:
5353
"prePlugins": [],
5454
"postPlugins": [],
5555
"pluginsTracing": {
56-
"enable": true,
56+
"enabled": true,
5757
"provider": {
5858
"name": "skywalking",
5959
"oapServer": "mockoap:19876"

plugin/skywalking/test/topic-event/manifests/manifests.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ spec:
7979
}
8080
},
8181
"pluginsTracing": {
82-
"enable": true,
82+
"enabled": true,
8383
"provider": {
8484
"name": "skywalking",
8585
"oapServer": "collector.default.svc:19876"
@@ -156,7 +156,7 @@ spec:
156156
}
157157
},
158158
"pluginsTracing": {
159-
"enable": true,
159+
"enabled": true,
160160
"provider": {
161161
"name": "skywalking",
162162
"oapServer": "collector.default.svc:19876"

0 commit comments

Comments
 (0)