Skip to content

Commit

Permalink
fix(opentelemetry): migration exception when upgrading from below ver…
Browse files Browse the repository at this point in the history
…sion 3.3 to 3.7
  • Loading branch information
ms2008 committed Jul 18, 2024
1 parent 5576c64 commit 0d5f9fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog/unreleased/kong/fix-otel-migrations-exception.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions kong/plugins/opentelemetry/migrations/001_331_to_332.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0d5f9fc

Please sign in to comment.