mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 13:09:22 -06:00
Plugins: Tracing: Add test for composite propagation (#65917)
This commit is contained in:
parent
f932952c68
commit
f1eddbad06
@ -304,6 +304,27 @@ func TestInitializer_tracingEnvironmentVariables(t *testing.T) {
|
|||||||
assert.Equal(t, "GF_INSTANCE_OTLP_PROPAGATION=w3c", envVars[4])
|
assert.Equal(t, "GF_INSTANCE_OTLP_PROPAGATION=w3c", envVars[4])
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "otlp enabled composite propagation",
|
||||||
|
cfg: &config.Cfg{
|
||||||
|
Opentelemetry: config.OpentelemetryCfg{
|
||||||
|
Address: "127.0.0.1:4317",
|
||||||
|
Propagation: "w3c,jaeger",
|
||||||
|
},
|
||||||
|
PluginSettings: map[string]map[string]string{
|
||||||
|
pluginID: {"tracing": "true"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
plugin: defaultPlugin,
|
||||||
|
exp: func(t *testing.T, envVars []string) {
|
||||||
|
assert.Len(t, envVars, 5)
|
||||||
|
assert.Equal(t, "GF_PLUGIN_TRACING=true", envVars[0])
|
||||||
|
assert.Equal(t, "GF_VERSION=", envVars[1])
|
||||||
|
assert.Equal(t, "GF_PLUGIN_VERSION=1.0.0", envVars[2])
|
||||||
|
assert.Equal(t, "GF_INSTANCE_OTLP_ADDRESS=127.0.0.1:4317", envVars[3])
|
||||||
|
assert.Equal(t, "GF_INSTANCE_OTLP_PROPAGATION=w3c,jaeger", envVars[4])
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "otlp no propagation disabled by default",
|
name: "otlp no propagation disabled by default",
|
||||||
cfg: &config.Cfg{
|
cfg: &config.Cfg{
|
||||||
|
Loading…
Reference in New Issue
Block a user