diff --git a/changelog/unreleased/kong/fix-otel-migrations-exception.yml b/changelog/unreleased/kong/fix-otel-migrations-exception.yml new file mode 100644 index 000000000000..08ae5efec755 --- /dev/null +++ b/changelog/unreleased/kong/fix-otel-migrations-exception.yml @@ -0,0 +1,3 @@ +message: "**OpenTelemetry:** Fixed an issue where migration fails when upgrading from below version 3.3 to 3.7." +type: bugfix +scope: Plugin diff --git a/kong/plugins/opentelemetry/migrations/001_331_to_332.lua b/kong/plugins/opentelemetry/migrations/001_331_to_332.lua index 3916fba72037..b188c105183f 100644 --- a/kong/plugins/opentelemetry/migrations/001_331_to_332.lua +++ b/kong/plugins/opentelemetry/migrations/001_331_to_332.lua @@ -4,6 +4,10 @@ local operations = require "kong.db.migrations.operations.331_to_332" local function ws_migration_teardown(ops) return function(connector) return ops:fixup_plugin_config(connector, "opentelemetry", function(config) + if not config.queue then + return false + end + if config.queue.max_batch_size == 1 then config.queue.max_batch_size = 200 return true