mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Plugins: Removed feature toggle enablePluginsTracingByDefault (#85953)
This commit is contained in:
@@ -58,7 +58,6 @@ Some features are enabled by default. You can disable these feature by setting t
|
|||||||
| `alertingSimplifiedRouting` | Enables users to easily configure alert notifications by specifying a contact point directly when editing or creating an alert rule | Yes |
|
| `alertingSimplifiedRouting` | Enables users to easily configure alert notifications by specifying a contact point directly when editing or creating an alert rule | Yes |
|
||||||
| `logRowsPopoverMenu` | Enable filtering menu displayed when text of a log line is selected | Yes |
|
| `logRowsPopoverMenu` | Enable filtering menu displayed when text of a log line is selected | Yes |
|
||||||
| `lokiQueryHints` | Enables query hints for Loki | Yes |
|
| `lokiQueryHints` | Enables query hints for Loki | Yes |
|
||||||
| `enablePluginsTracingByDefault` | Enable plugin tracing for all external plugins | Yes |
|
|
||||||
| `alertingQueryOptimization` | Optimizes eligible queries in order to reduce load on datasources | |
|
| `alertingQueryOptimization` | Optimizes eligible queries in order to reduce load on datasources | |
|
||||||
| `betterPageScrolling` | Removes CustomScrollbar from the UI, relying on native browser scrollbars | Yes |
|
| `betterPageScrolling` | Removes CustomScrollbar from the UI, relying on native browser scrollbars | Yes |
|
||||||
| `cloudWatchNewLabelParsing` | Updates CloudWatch label parsing to be more accurate | Yes |
|
| `cloudWatchNewLabelParsing` | Updates CloudWatch label parsing to be more accurate | Yes |
|
||||||
|
|||||||
@@ -157,7 +157,6 @@ export interface FeatureToggles {
|
|||||||
regressionTransformation?: boolean;
|
regressionTransformation?: boolean;
|
||||||
lokiQueryHints?: boolean;
|
lokiQueryHints?: boolean;
|
||||||
kubernetesFeatureToggles?: boolean;
|
kubernetesFeatureToggles?: boolean;
|
||||||
enablePluginsTracingByDefault?: boolean;
|
|
||||||
cloudRBACRoles?: boolean;
|
cloudRBACRoles?: boolean;
|
||||||
alertingQueryOptimization?: boolean;
|
alertingQueryOptimization?: boolean;
|
||||||
newFolderPicker?: boolean;
|
newFolderPicker?: boolean;
|
||||||
|
|||||||
@@ -1035,15 +1035,6 @@ var (
|
|||||||
AllowSelfServe: false,
|
AllowSelfServe: false,
|
||||||
HideFromAdminPage: true,
|
HideFromAdminPage: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
Name: "enablePluginsTracingByDefault",
|
|
||||||
Description: "Enable plugin tracing for all external plugins",
|
|
||||||
FrontendOnly: false,
|
|
||||||
Stage: FeatureStageGeneralAvailability,
|
|
||||||
Owner: grafanaPluginsPlatformSquad,
|
|
||||||
RequiresRestart: true,
|
|
||||||
Expression: "true", // enabled by default
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
Name: "cloudRBACRoles",
|
Name: "cloudRBACRoles",
|
||||||
Description: "Enabled grafana cloud specific RBAC roles",
|
Description: "Enabled grafana cloud specific RBAC roles",
|
||||||
|
|||||||
@@ -138,7 +138,6 @@ tableSharedCrosshair,experimental,@grafana/dataviz-squad,false,false,true
|
|||||||
regressionTransformation,preview,@grafana/dataviz-squad,false,false,true
|
regressionTransformation,preview,@grafana/dataviz-squad,false,false,true
|
||||||
lokiQueryHints,GA,@grafana/observability-logs,false,false,true
|
lokiQueryHints,GA,@grafana/observability-logs,false,false,true
|
||||||
kubernetesFeatureToggles,experimental,@grafana/grafana-operator-experience-squad,false,false,true
|
kubernetesFeatureToggles,experimental,@grafana/grafana-operator-experience-squad,false,false,true
|
||||||
enablePluginsTracingByDefault,GA,@grafana/plugins-platform-backend,false,true,false
|
|
||||||
cloudRBACRoles,experimental,@grafana/identity-access-team,false,true,false
|
cloudRBACRoles,experimental,@grafana/identity-access-team,false,true,false
|
||||||
alertingQueryOptimization,GA,@grafana/alerting-squad,false,false,false
|
alertingQueryOptimization,GA,@grafana/alerting-squad,false,false,false
|
||||||
newFolderPicker,experimental,@grafana/grafana-frontend-platform,false,false,true
|
newFolderPicker,experimental,@grafana/grafana-frontend-platform,false,false,true
|
||||||
|
|||||||
|
@@ -563,10 +563,6 @@ const (
|
|||||||
// Use the kubernetes API for feature toggle management in the frontend
|
// Use the kubernetes API for feature toggle management in the frontend
|
||||||
FlagKubernetesFeatureToggles = "kubernetesFeatureToggles"
|
FlagKubernetesFeatureToggles = "kubernetesFeatureToggles"
|
||||||
|
|
||||||
// FlagEnablePluginsTracingByDefault
|
|
||||||
// Enable plugin tracing for all external plugins
|
|
||||||
FlagEnablePluginsTracingByDefault = "enablePluginsTracingByDefault"
|
|
||||||
|
|
||||||
// FlagCloudRBACRoles
|
// FlagCloudRBACRoles
|
||||||
// Enabled grafana cloud specific RBAC roles
|
// Enabled grafana cloud specific RBAC roles
|
||||||
FlagCloudRBACRoles = "cloudRBACRoles"
|
FlagCloudRBACRoles = "cloudRBACRoles"
|
||||||
|
|||||||
@@ -627,7 +627,8 @@
|
|||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "enablePluginsTracingByDefault",
|
"name": "enablePluginsTracingByDefault",
|
||||||
"resourceVersion": "1712639261786",
|
"resourceVersion": "1712639261786",
|
||||||
"creationTimestamp": "2024-04-09T05:07:41Z"
|
"creationTimestamp": "2024-04-09T05:07:41Z",
|
||||||
|
"deletionTimestamp": "2024-04-11T13:21:52Z"
|
||||||
},
|
},
|
||||||
"spec": {
|
"spec": {
|
||||||
"description": "Enable plugin tracing for all external plugins",
|
"description": "Enable plugin tracing for all external plugins",
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import (
|
|||||||
|
|
||||||
"github.com/grafana/grafana/pkg/plugins"
|
"github.com/grafana/grafana/pkg/plugins"
|
||||||
"github.com/grafana/grafana/pkg/plugins/envvars"
|
"github.com/grafana/grafana/pkg/plugins/envvars"
|
||||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ envvars.Provider = (*EnvVarsProvider)(nil)
|
var _ envvars.Provider = (*EnvVarsProvider)(nil)
|
||||||
@@ -142,12 +141,7 @@ func (p *EnvVarsProvider) secureSocksProxyEnvVars() []string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *EnvVarsProvider) tracingEnvVars(plugin *plugins.Plugin) []string {
|
func (p *EnvVarsProvider) tracingEnvVars(plugin *plugins.Plugin) []string {
|
||||||
pluginTracingEnabled := p.cfg.Features.IsEnabledGlobally(featuremgmt.FlagEnablePluginsTracingByDefault)
|
if !p.cfg.Tracing.IsEnabled() {
|
||||||
if v, exists := p.cfg.PluginSettings[plugin.ID]["tracing"]; exists && !pluginTracingEnabled {
|
|
||||||
pluginTracingEnabled = v == "true"
|
|
||||||
}
|
|
||||||
|
|
||||||
if !p.cfg.Tracing.IsEnabled() || !pluginTracingEnabled {
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -216,53 +216,24 @@ func TestPluginEnvVarsProvider_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
cfg: &PluginInstanceCfg{
|
cfg: &PluginInstanceCfg{
|
||||||
AWSAssumeRoleEnabled: false,
|
AWSAssumeRoleEnabled: false,
|
||||||
Tracing: config.Tracing{},
|
Tracing: config.Tracing{},
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
},
|
||||||
plugin: defaultPlugin,
|
plugin: defaultPlugin,
|
||||||
exp: expNoTracing,
|
exp: expNoTracing,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "otel not configured but plugin-tracing enabled",
|
name: "otlp no propagation",
|
||||||
cfg: &PluginInstanceCfg{
|
cfg: &PluginInstanceCfg{
|
||||||
PluginSettings: map[string]map[string]string{pluginID: {"tracing": "true"}},
|
|
||||||
Tracing: config.Tracing{},
|
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
|
||||||
plugin: defaultPlugin,
|
|
||||||
exp: expNoTracing,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "otlp no propagation plugin enabled",
|
|
||||||
cfg: &PluginInstanceCfg{
|
|
||||||
PluginSettings: map[string]map[string]string{
|
|
||||||
pluginID: {"tracing": "true"},
|
|
||||||
},
|
|
||||||
Tracing: config.Tracing{
|
Tracing: config.Tracing{
|
||||||
OpenTelemetry: defaultOTelCfg,
|
OpenTelemetry: defaultOTelCfg,
|
||||||
},
|
},
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
},
|
||||||
|
|
||||||
plugin: defaultPlugin,
|
plugin: defaultPlugin,
|
||||||
exp: expDefaultOtlp,
|
exp: expDefaultOtlp,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "otlp no propagation disabled by default",
|
|
||||||
cfg: &PluginInstanceCfg{
|
|
||||||
Tracing: config.Tracing{
|
|
||||||
OpenTelemetry: defaultOTelCfg,
|
|
||||||
},
|
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
|
||||||
plugin: defaultPlugin,
|
|
||||||
exp: expNoTracing,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "otlp propagation plugin enabled",
|
name: "otlp propagation plugin enabled",
|
||||||
cfg: &PluginInstanceCfg{
|
cfg: &PluginInstanceCfg{
|
||||||
PluginSettings: map[string]map[string]string{
|
|
||||||
pluginID: {"tracing": "true"},
|
|
||||||
},
|
|
||||||
AWSAssumeRoleEnabled: true,
|
AWSAssumeRoleEnabled: true,
|
||||||
Tracing: config.Tracing{
|
Tracing: config.Tracing{
|
||||||
OpenTelemetry: config.OpenTelemetryCfg{
|
OpenTelemetry: config.OpenTelemetryCfg{
|
||||||
@@ -275,11 +246,10 @@ func TestPluginEnvVarsProvider_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
SamplerRemoteURL: "",
|
SamplerRemoteURL: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
},
|
||||||
plugin: defaultPlugin,
|
plugin: defaultPlugin,
|
||||||
exp: func(t *testing.T, envVars []string) {
|
exp: func(t *testing.T, envVars []string) {
|
||||||
assert.Len(t, envVars, 8)
|
assert.Len(t, envVars, 7)
|
||||||
assert.Equal(t, "GF_VERSION=", envVars[0])
|
assert.Equal(t, "GF_VERSION=", envVars[0])
|
||||||
assert.Equal(t, "GF_INSTANCE_OTLP_ADDRESS=127.0.0.1:4317", envVars[1])
|
assert.Equal(t, "GF_INSTANCE_OTLP_ADDRESS=127.0.0.1:4317", envVars[1])
|
||||||
assert.Equal(t, "GF_INSTANCE_OTLP_PROPAGATION=w3c", envVars[2])
|
assert.Equal(t, "GF_INSTANCE_OTLP_PROPAGATION=w3c", envVars[2])
|
||||||
@@ -287,15 +257,11 @@ func TestPluginEnvVarsProvider_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
assert.Equal(t, "GF_INSTANCE_OTLP_SAMPLER_PARAM=1.000000", envVars[4])
|
assert.Equal(t, "GF_INSTANCE_OTLP_SAMPLER_PARAM=1.000000", envVars[4])
|
||||||
assert.Equal(t, "GF_INSTANCE_OTLP_SAMPLER_REMOTE_URL=", envVars[5])
|
assert.Equal(t, "GF_INSTANCE_OTLP_SAMPLER_REMOTE_URL=", envVars[5])
|
||||||
assert.Equal(t, "GF_PLUGIN_VERSION=1.0.0", envVars[6])
|
assert.Equal(t, "GF_PLUGIN_VERSION=1.0.0", envVars[6])
|
||||||
assert.Equal(t, "GF_PLUGIN_TRACING=true", envVars[7])
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "otlp enabled composite propagation",
|
name: "otlp enabled composite propagation",
|
||||||
cfg: &PluginInstanceCfg{
|
cfg: &PluginInstanceCfg{
|
||||||
PluginSettings: map[string]map[string]string{
|
|
||||||
pluginID: {"tracing": "true"},
|
|
||||||
},
|
|
||||||
AWSAssumeRoleEnabled: true,
|
AWSAssumeRoleEnabled: true,
|
||||||
Tracing: config.Tracing{
|
Tracing: config.Tracing{
|
||||||
OpenTelemetry: config.OpenTelemetryCfg{
|
OpenTelemetry: config.OpenTelemetryCfg{
|
||||||
@@ -308,11 +274,10 @@ func TestPluginEnvVarsProvider_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
SamplerRemoteURL: "",
|
SamplerRemoteURL: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
},
|
||||||
plugin: defaultPlugin,
|
plugin: defaultPlugin,
|
||||||
exp: func(t *testing.T, envVars []string) {
|
exp: func(t *testing.T, envVars []string) {
|
||||||
assert.Len(t, envVars, 8)
|
assert.Len(t, envVars, 7)
|
||||||
assert.Equal(t, "GF_VERSION=", envVars[0])
|
assert.Equal(t, "GF_VERSION=", envVars[0])
|
||||||
assert.Equal(t, "GF_INSTANCE_OTLP_ADDRESS=127.0.0.1:4317", envVars[1])
|
assert.Equal(t, "GF_INSTANCE_OTLP_ADDRESS=127.0.0.1:4317", envVars[1])
|
||||||
assert.Equal(t, "GF_INSTANCE_OTLP_PROPAGATION=w3c,jaeger", envVars[2])
|
assert.Equal(t, "GF_INSTANCE_OTLP_PROPAGATION=w3c,jaeger", envVars[2])
|
||||||
@@ -320,98 +285,14 @@ func TestPluginEnvVarsProvider_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
assert.Equal(t, "GF_INSTANCE_OTLP_SAMPLER_PARAM=1.000000", envVars[4])
|
assert.Equal(t, "GF_INSTANCE_OTLP_SAMPLER_PARAM=1.000000", envVars[4])
|
||||||
assert.Equal(t, "GF_INSTANCE_OTLP_SAMPLER_REMOTE_URL=", envVars[5])
|
assert.Equal(t, "GF_INSTANCE_OTLP_SAMPLER_REMOTE_URL=", envVars[5])
|
||||||
assert.Equal(t, "GF_PLUGIN_VERSION=1.0.0", envVars[6])
|
assert.Equal(t, "GF_PLUGIN_VERSION=1.0.0", envVars[6])
|
||||||
assert.Equal(t, "GF_PLUGIN_TRACING=true", envVars[7])
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "otlp no propagation disabled by default",
|
|
||||||
cfg: &PluginInstanceCfg{
|
|
||||||
Tracing: config.Tracing{
|
|
||||||
OpenTelemetry: config.OpenTelemetryCfg{
|
|
||||||
Address: "127.0.0.1:4317",
|
|
||||||
Propagation: "w3c",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
|
||||||
plugin: defaultPlugin,
|
|
||||||
exp: expNoTracing,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "disabled on plugin",
|
|
||||||
cfg: &PluginInstanceCfg{
|
|
||||||
PluginSettings: setting.PluginSettings{
|
|
||||||
pluginID: map[string]string{"tracing": "false"},
|
|
||||||
},
|
|
||||||
Tracing: config.Tracing{
|
|
||||||
OpenTelemetry: defaultOTelCfg,
|
|
||||||
},
|
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
|
||||||
plugin: defaultPlugin,
|
|
||||||
exp: expNoTracing,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "disabled on plugin with other plugin settings",
|
|
||||||
cfg: &PluginInstanceCfg{
|
|
||||||
PluginSettings: map[string]map[string]string{
|
|
||||||
pluginID: {"some_other_option": "true"},
|
|
||||||
},
|
|
||||||
AWSAssumeRoleEnabled: true,
|
|
||||||
Tracing: config.Tracing{
|
|
||||||
OpenTelemetry: defaultOTelCfg,
|
|
||||||
},
|
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
|
||||||
plugin: defaultPlugin,
|
|
||||||
exp: expNoTracing,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "enabled on plugin with other plugin settings",
|
|
||||||
cfg: &PluginInstanceCfg{
|
|
||||||
PluginSettings: map[string]map[string]string{
|
|
||||||
pluginID: {"some_other_option": "true", "tracing": "true"},
|
|
||||||
},
|
|
||||||
Tracing: config.Tracing{
|
|
||||||
OpenTelemetry: defaultOTelCfg,
|
|
||||||
},
|
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
|
||||||
plugin: defaultPlugin,
|
|
||||||
exp: expDefaultOtlp,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: `enabled on plugin with no "tracing" plugin setting but with enablePluginsTracingByDefault feature flag`,
|
|
||||||
cfg: &PluginInstanceCfg{
|
|
||||||
PluginSettings: map[string]map[string]string{pluginID: {}},
|
|
||||||
Tracing: config.Tracing{
|
|
||||||
OpenTelemetry: defaultOTelCfg,
|
|
||||||
},
|
|
||||||
Features: featuremgmt.WithFeatures(featuremgmt.FlagEnablePluginsTracingByDefault),
|
|
||||||
},
|
|
||||||
plugin: defaultPlugin,
|
|
||||||
exp: expDefaultOtlp,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: `enabled on plugin with plugin setting "tracing=false" but with enablePluginsTracingByDefault feature flag`,
|
|
||||||
cfg: &PluginInstanceCfg{
|
|
||||||
PluginSettings: map[string]map[string]string{pluginID: {"tracing": "false"}},
|
|
||||||
Tracing: config.Tracing{
|
|
||||||
OpenTelemetry: defaultOTelCfg,
|
|
||||||
},
|
|
||||||
Features: featuremgmt.WithFeatures(featuremgmt.FlagEnablePluginsTracingByDefault),
|
|
||||||
},
|
|
||||||
plugin: defaultPlugin,
|
|
||||||
exp: expDefaultOtlp,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "GF_PLUGIN_VERSION is not present if tracing is disabled",
|
name: "GF_PLUGIN_VERSION is not present if tracing is disabled",
|
||||||
cfg: &PluginInstanceCfg{
|
cfg: &PluginInstanceCfg{
|
||||||
PluginSettings: map[string]map[string]string{pluginID: {"tracing": "true"}},
|
|
||||||
Tracing: config.Tracing{
|
Tracing: config.Tracing{
|
||||||
OpenTelemetry: config.OpenTelemetryCfg{},
|
OpenTelemetry: config.OpenTelemetryCfg{},
|
||||||
},
|
},
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
},
|
||||||
plugin: defaultPlugin,
|
plugin: defaultPlugin,
|
||||||
exp: expGfPluginVersionNotPresent,
|
exp: expGfPluginVersionNotPresent,
|
||||||
@@ -419,11 +300,9 @@ func TestPluginEnvVarsProvider_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "GF_PLUGIN_VERSION is present if tracing is enabled and plugin has version",
|
name: "GF_PLUGIN_VERSION is present if tracing is enabled and plugin has version",
|
||||||
cfg: &PluginInstanceCfg{
|
cfg: &PluginInstanceCfg{
|
||||||
PluginSettings: map[string]map[string]string{pluginID: {"tracing": "true"}},
|
|
||||||
Tracing: config.Tracing{
|
Tracing: config.Tracing{
|
||||||
OpenTelemetry: defaultOTelCfg,
|
OpenTelemetry: defaultOTelCfg,
|
||||||
},
|
},
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
},
|
||||||
plugin: defaultPlugin,
|
plugin: defaultPlugin,
|
||||||
exp: expGfPluginVersionPresent,
|
exp: expGfPluginVersionPresent,
|
||||||
@@ -431,11 +310,9 @@ func TestPluginEnvVarsProvider_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "GF_PLUGIN_VERSION is not present if tracing is enabled but plugin doesn't have a version",
|
name: "GF_PLUGIN_VERSION is not present if tracing is enabled but plugin doesn't have a version",
|
||||||
cfg: &PluginInstanceCfg{
|
cfg: &PluginInstanceCfg{
|
||||||
PluginSettings: map[string]map[string]string{pluginID: {"tracing": "true"}},
|
|
||||||
Tracing: config.Tracing{
|
Tracing: config.Tracing{
|
||||||
OpenTelemetry: config.OpenTelemetryCfg{},
|
OpenTelemetry: config.OpenTelemetryCfg{},
|
||||||
},
|
},
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
},
|
||||||
plugin: pluginWithoutVersion,
|
plugin: pluginWithoutVersion,
|
||||||
exp: expGfPluginVersionNotPresent,
|
exp: expGfPluginVersionNotPresent,
|
||||||
@@ -443,7 +320,6 @@ func TestPluginEnvVarsProvider_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "no sampling (neversample)",
|
name: "no sampling (neversample)",
|
||||||
cfg: &PluginInstanceCfg{
|
cfg: &PluginInstanceCfg{
|
||||||
PluginSettings: map[string]map[string]string{pluginID: {"tracing": "true"}},
|
|
||||||
Tracing: config.Tracing{
|
Tracing: config.Tracing{
|
||||||
OpenTelemetry: config.OpenTelemetryCfg{
|
OpenTelemetry: config.OpenTelemetryCfg{
|
||||||
Address: "127.0.0.1:4317",
|
Address: "127.0.0.1:4317",
|
||||||
@@ -453,7 +329,6 @@ func TestPluginEnvVarsProvider_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
SamplerRemoteURL: "",
|
SamplerRemoteURL: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
},
|
||||||
plugin: defaultPlugin,
|
plugin: defaultPlugin,
|
||||||
exp: func(t *testing.T, envVars []string) {
|
exp: func(t *testing.T, envVars []string) {
|
||||||
@@ -465,7 +340,6 @@ func TestPluginEnvVarsProvider_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "empty sampler with param",
|
name: "empty sampler with param",
|
||||||
cfg: &PluginInstanceCfg{
|
cfg: &PluginInstanceCfg{
|
||||||
PluginSettings: map[string]map[string]string{pluginID: {"tracing": "true"}},
|
|
||||||
Tracing: config.Tracing{
|
Tracing: config.Tracing{
|
||||||
OpenTelemetry: config.OpenTelemetryCfg{
|
OpenTelemetry: config.OpenTelemetryCfg{
|
||||||
Address: "127.0.0.1:4317",
|
Address: "127.0.0.1:4317",
|
||||||
@@ -475,7 +349,6 @@ func TestPluginEnvVarsProvider_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
SamplerRemoteURL: "",
|
SamplerRemoteURL: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
},
|
||||||
plugin: defaultPlugin,
|
plugin: defaultPlugin,
|
||||||
exp: func(t *testing.T, envVars []string) {
|
exp: func(t *testing.T, envVars []string) {
|
||||||
@@ -487,7 +360,6 @@ func TestPluginEnvVarsProvider_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "const sampler with param",
|
name: "const sampler with param",
|
||||||
cfg: &PluginInstanceCfg{
|
cfg: &PluginInstanceCfg{
|
||||||
PluginSettings: map[string]map[string]string{pluginID: {"tracing": "true"}},
|
|
||||||
Tracing: config.Tracing{
|
Tracing: config.Tracing{
|
||||||
OpenTelemetry: config.OpenTelemetryCfg{
|
OpenTelemetry: config.OpenTelemetryCfg{
|
||||||
Address: "127.0.0.1:4317",
|
Address: "127.0.0.1:4317",
|
||||||
@@ -497,7 +369,6 @@ func TestPluginEnvVarsProvider_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
SamplerRemoteURL: "",
|
SamplerRemoteURL: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
},
|
||||||
plugin: defaultPlugin,
|
plugin: defaultPlugin,
|
||||||
exp: func(t *testing.T, envVars []string) {
|
exp: func(t *testing.T, envVars []string) {
|
||||||
@@ -509,7 +380,6 @@ func TestPluginEnvVarsProvider_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "rateLimiting sampler",
|
name: "rateLimiting sampler",
|
||||||
cfg: &PluginInstanceCfg{
|
cfg: &PluginInstanceCfg{
|
||||||
PluginSettings: map[string]map[string]string{pluginID: {"tracing": "true"}},
|
|
||||||
Tracing: config.Tracing{
|
Tracing: config.Tracing{
|
||||||
OpenTelemetry: config.OpenTelemetryCfg{
|
OpenTelemetry: config.OpenTelemetryCfg{
|
||||||
Address: "127.0.0.1:4317",
|
Address: "127.0.0.1:4317",
|
||||||
@@ -519,7 +389,6 @@ func TestPluginEnvVarsProvider_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
SamplerRemoteURL: "",
|
SamplerRemoteURL: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
},
|
},
|
||||||
plugin: defaultPlugin,
|
plugin: defaultPlugin,
|
||||||
exp: func(t *testing.T, envVars []string) {
|
exp: func(t *testing.T, envVars []string) {
|
||||||
@@ -531,8 +400,6 @@ func TestPluginEnvVarsProvider_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "remote sampler",
|
name: "remote sampler",
|
||||||
cfg: &PluginInstanceCfg{
|
cfg: &PluginInstanceCfg{
|
||||||
PluginSettings: map[string]map[string]string{pluginID: {"tracing": "true"}},
|
|
||||||
Features: featuremgmt.WithFeatures(),
|
|
||||||
Tracing: config.Tracing{
|
Tracing: config.Tracing{
|
||||||
OpenTelemetry: config.OpenTelemetryCfg{
|
OpenTelemetry: config.OpenTelemetryCfg{
|
||||||
Address: "127.0.0.1:4317",
|
Address: "127.0.0.1:4317",
|
||||||
|
|||||||
Reference in New Issue
Block a user