Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: OTLP Exporter #1324

Merged
merged 27 commits into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bb0d00d
feat: deprecate jaeger enabled in favor or specifying tracing exporter
markphelps Feb 3, 2023
2d9b8ad
chore: update example config; cue/json schemas
markphelps Feb 3, 2023
5b754c8
feat: add zipkin support for traces
markphelps Feb 3, 2023
a8ca1d3
chore: add shutdown functionality
markphelps Feb 3, 2023
e1d8e0b
chore: switch to 'backend'
markphelps Feb 6, 2023
253adcc
Merge branch 'main' into deprecate-jaeger-enabled
markphelps Feb 6, 2023
dcd6d01
chore: missed a few renames
markphelps Feb 6, 2023
f57704f
chore: missed in deprecations.md
markphelps Feb 6, 2023
9f6efe8
chore: change log msg
markphelps Feb 6, 2023
b7fb210
chore: merge in upstream branch
markphelps Feb 6, 2023
913d4bd
chore: merge main
markphelps Feb 6, 2023
c4d87d2
chore: add cue/json schema
markphelps Feb 6, 2023
39b40ba
chore: update tracing example docker-compose
markphelps Feb 6, 2023
f9061ab
chore: use build for docker-compose for now until release
markphelps Feb 6, 2023
3de305d
chore: config tests
markphelps Feb 6, 2023
91ca180
chore: update README
markphelps Feb 6, 2023
5dd3738
feat: support otlp exporter
markphelps Feb 6, 2023
e8b834a
chore: merge main
markphelps Feb 7, 2023
055c203
chore: fix readme merge conflicts; rename back to exporter
markphelps Feb 7, 2023
b89df15
chore: fix tests
markphelps Feb 7, 2023
3b08295
chore: add readme; finish backend->exporter
markphelps Feb 7, 2023
1f2ea9b
chore: update tracing example readme
markphelps Feb 7, 2023
cf1993c
chore: update config schemas
markphelps Feb 7, 2023
da2689b
chore: update examples docker-compose files
markphelps Feb 7, 2023
a036dd3
Update config/flipt.schema.cue
markphelps Feb 8, 2023
12aad19
chore: respond to PR feedback
markphelps Feb 8, 2023
281e252
Merge branch 'main' into otlp
markphelps Feb 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: fix tests
  • Loading branch information
markphelps committed Feb 7, 2023
commit b89df15c66503e059c76c42ff06e915d3a3aa25f
50 changes: 28 additions & 22 deletions internal/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ func defaultConfig() *Config {
Zipkin: ZipkinTracingConfig{
Endpoint: "http://localhost:9411/api/v2/spans",
},
OTLP: OTLPTracingConfig{
Endpoint: "localhost:4317",
},
},

Database: DatabaseConfig{
Expand Down Expand Up @@ -291,7 +294,7 @@ func TestLoad(t *testing.T) {
expected: defaultConfig,
},
{
name: "deprecated - tracing jaeger enabled",
name: "deprecated tracing jaeger enabled",
path: "./testdata/deprecated/tracing_jaeger_enabled.yml",
expected: func() *Config {
cfg := defaultConfig()
Expand All @@ -304,7 +307,7 @@ func TestLoad(t *testing.T) {
},
},
{
name: "deprecated - cache memory enabled",
name: "deprecated cache memory enabled",
path: "./testdata/deprecated/cache_memory_enabled.yml",
expected: func() *Config {
cfg := defaultConfig()
Expand All @@ -319,27 +322,27 @@ func TestLoad(t *testing.T) {
},
},
{
name: "deprecated - cache memory items defaults",
name: "deprecated cache memory items defaults",
path: "./testdata/deprecated/cache_memory_items.yml",
expected: defaultConfig,
warnings: []string{
"\"cache.memory.enabled\" is deprecated and will be removed in a future version. Please use 'cache.enabled' and 'cache.backend' instead.",
},
},
{
name: "deprecated - database migrations path",
name: "deprecated database migrations path",
path: "./testdata/deprecated/database_migrations_path.yml",
expected: defaultConfig,
warnings: []string{"\"db.migrations.path\" is deprecated and will be removed in a future version. Migrations are now embedded within Flipt and are no longer required on disk."},
},
{
name: "deprecated - database migrations path legacy",
name: "deprecated database migrations path legacy",
path: "./testdata/deprecated/database_migrations_path_legacy.yml",
expected: defaultConfig,
warnings: []string{"\"db.migrations.path\" is deprecated and will be removed in a future version. Migrations are now embedded within Flipt and are no longer required on disk."},
},
{
name: "deprecated - ui disabled",
name: "deprecated ui disabled",
path: "./testdata/deprecated/ui_disabled.yml",
expected: func() *Config {
cfg := defaultConfig()
Expand All @@ -349,7 +352,7 @@ func TestLoad(t *testing.T) {
warnings: []string{"\"ui.enabled\" is deprecated and will be removed in a future version."},
},
{
name: "cache - no backend set",
name: "cache no backend set",
path: "./testdata/cache/default.yml",
expected: func() *Config {
cfg := defaultConfig()
Expand All @@ -360,7 +363,7 @@ func TestLoad(t *testing.T) {
},
},
{
name: "cache - memory",
name: "cache memory",
path: "./testdata/cache/memory.yml",
expected: func() *Config {
cfg := defaultConfig()
Expand All @@ -372,7 +375,7 @@ func TestLoad(t *testing.T) {
},
},
{
name: "cache - redis",
name: "cache redis",
path: "./testdata/cache/redis.yml",
expected: func() *Config {
cfg := defaultConfig()
Expand All @@ -387,7 +390,7 @@ func TestLoad(t *testing.T) {
},
},
{
name: "tracing - zipkin",
name: "tracing zipkin",
path: "./testdata/tracing/zipkin.yml",
expected: func() *Config {
cfg := defaultConfig()
Expand Down Expand Up @@ -415,52 +418,52 @@ func TestLoad(t *testing.T) {
},
},
{
name: "server - https missing cert file",
name: "server https missing cert file",
path: "./testdata/server/https_missing_cert_file.yml",
wantErr: errValidationRequired,
},
{
name: "server - https missing cert key",
name: "server https missing cert key",
path: "./testdata/server/https_missing_cert_key.yml",
wantErr: errValidationRequired,
},
{
name: "server - https defined but not found cert file",
name: "server https defined but not found cert file",
path: "./testdata/server/https_not_found_cert_file.yml",
wantErr: fs.ErrNotExist,
},
{
name: "server - https defined but not found cert key",
name: "server https defined but not found cert key",
path: "./testdata/server/https_not_found_cert_key.yml",
wantErr: fs.ErrNotExist,
},
{
name: "database - protocol required",
name: "database protocol required",
path: "./testdata/database/missing_protocol.yml",
wantErr: errValidationRequired,
},
{
name: "database - host required",
name: "database host required",
path: "./testdata/database/missing_host.yml",
wantErr: errValidationRequired,
},
{
name: "database - name required",
name: "database name required",
path: "./testdata/database/missing_name.yml",
wantErr: errValidationRequired,
},
{
name: "authentication - negative interval",
name: "authentication negative interval",
path: "./testdata/authentication/negative_interval.yml",
wantErr: errPositiveNonZeroDuration,
},
{
name: "authentication - zero grace_period",
name: "authentication zero grace_period",
path: "./testdata/authentication/zero_grace_period.yml",
wantErr: errPositiveNonZeroDuration,
},
{
name: "authentication - strip session domain scheme/port",
name: "authentication strip session domain scheme/port",
path: "./testdata/authentication/session_domain_scheme_port.yml",
expected: func() *Config {
cfg := defaultConfig()
Expand Down Expand Up @@ -530,6 +533,9 @@ func TestLoad(t *testing.T) {
Zipkin: ZipkinTracingConfig{
Endpoint: "http://localhost:9411/api/v2/spans",
},
OTLP: OTLPTracingConfig{
Endpoint: "localhost:4317",
},
}
cfg.Database = DatabaseConfig{
URL: "postgres://postgres@localhost:5432/flipt?sslmode=disable",
Expand Down Expand Up @@ -583,7 +589,7 @@ func TestLoad(t *testing.T) {
},
},
{
name: "version - v1",
name: "version v1",
path: "./testdata/version/v1.yml",
expected: func() *Config {
cfg := defaultConfig()
Expand All @@ -592,7 +598,7 @@ func TestLoad(t *testing.T) {
},
},
{
name: "version - invalid",
name: "version invalid",
path: "./testdata/version/invalid.yml",
wantErr: errors.New("invalid version: 2.0"),
},
Expand Down
2 changes: 1 addition & 1 deletion internal/config/testdata/tracing/zipkin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tracing:
enabled: true
backend: zipkin
exporter: zipkin
zipkin:
endpoint: http://localhost:9999/api/v2/spans