diff --git a/context/context.go b/context/context.go index d6bfbab..e1ff846 100644 --- a/context/context.go +++ b/context/context.go @@ -299,7 +299,7 @@ type FunctionOut struct { } type PluginsTracing struct { - Enable bool `json:"enable" yaml:"enable"` + Enabled bool `json:"enabled" yaml:"enabled"` Provider *TracingProvider `json:"provider" yaml:"provider"` Tags map[string]string `json:"tags,omitempty" yaml:"tags,omitempty"` Baggage map[string]string `json:"baggage" yaml:"baggage"` @@ -622,7 +622,7 @@ func (o *FunctionOut) WithData(data []byte) *FunctionOut { } func (tracing *PluginsTracing) IsEnabled() bool { - return tracing.Enable + return tracing.Enabled } func (tracing *PluginsTracing) ProviderName() string { @@ -752,7 +752,7 @@ func parseContext() (*FunctionContext, error) { ctx.podNamespace = podNamespace } - if ctx.PluginsTracing != nil && ctx.PluginsTracing.Enable { + if ctx.PluginsTracing != nil && ctx.PluginsTracing.IsEnabled() { if ctx.PluginsTracing.Provider != nil && ctx.PluginsTracing.Provider.Name != "" { switch ctx.PluginsTracing.Provider.Name { case TracingProviderSkywalking, TracingProviderOpentelemetry: diff --git a/context/context_test.go b/context/context_test.go index 4007eb6..098f518 100644 --- a/context/context_test.go +++ b/context/context_test.go @@ -54,7 +54,7 @@ var ( "prePlugins": ["plgA", "plgB", "plgC"], "postPlugins": ["plgC", "plgA", "plgB"], "pluginsTracing": { - "enable": true, + "enabled": true, "provider": { "name": "skywalking", "oapServer": "localhost:xxx" @@ -79,7 +79,7 @@ var ( "prePlugins": ["plgA", "plgB", "plgC"], "postPlugins": ["plgC", "plgA", "plgB"], "pluginsTracing": { - "enable": true, + "enabled": true, "provider": { "name": "", "oapServer": "localhost:xxx" @@ -94,7 +94,7 @@ var ( "prePlugins": ["plgA", "plgB", "plgC"], "postPlugins": ["plgC", "plgA", "plgB"], "pluginsTracing": { - "enable": true, + "enabled": true, "provider": { "name": "wrongProvider", "oapServer": "localhost:xxx" diff --git a/plugin/skywalking/test/binding-event/manifests/manifests.yaml b/plugin/skywalking/test/binding-event/manifests/manifests.yaml index f1e98e7..f3ecc2f 100644 --- a/plugin/skywalking/test/binding-event/manifests/manifests.yaml +++ b/plugin/skywalking/test/binding-event/manifests/manifests.yaml @@ -84,7 +84,7 @@ spec: } }, "pluginsTracing": { - "enable": true, + "enabled": true, "provider": { "name": "skywalking", "oapServer": "collector.default.svc:19876" @@ -161,7 +161,7 @@ spec: } }, "pluginsTracing": { - "enable": true, + "enabled": true, "provider": { "name": "skywalking", "oapServer": "collector.default.svc:19876" diff --git a/plugin/skywalking/test/sync-request/docker-compose.yml b/plugin/skywalking/test/sync-request/docker-compose.yml index a008b60..848febd 100644 --- a/plugin/skywalking/test/sync-request/docker-compose.yml +++ b/plugin/skywalking/test/sync-request/docker-compose.yml @@ -53,7 +53,7 @@ services: "prePlugins": [], "postPlugins": [], "pluginsTracing": { - "enable": true, + "enabled": true, "provider": { "name": "skywalking", "oapServer": "mockoap:19876" diff --git a/plugin/skywalking/test/topic-event/manifests/manifests.yaml b/plugin/skywalking/test/topic-event/manifests/manifests.yaml index 240b843..f47cd84 100644 --- a/plugin/skywalking/test/topic-event/manifests/manifests.yaml +++ b/plugin/skywalking/test/topic-event/manifests/manifests.yaml @@ -79,7 +79,7 @@ spec: } }, "pluginsTracing": { - "enable": true, + "enabled": true, "provider": { "name": "skywalking", "oapServer": "collector.default.svc:19876" @@ -156,7 +156,7 @@ spec: } }, "pluginsTracing": { - "enable": true, + "enabled": true, "provider": { "name": "skywalking", "oapServer": "collector.default.svc:19876"