Skip to content

Commit

Permalink
fixup! tests(opentelemetry): OTel formatted logs
Browse files Browse the repository at this point in the history
  • Loading branch information
samugi committed Jul 4, 2024
1 parent 4c8acaf commit fc44de7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/01-unit/26-observability/05-logs_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ describe("Observability/Logs unit tests", function()
local log_level = ngx.WARN
local body = "Careful! I'm a warning!"

maybe_push(1, log_level, body)
maybe_push(1, log_level, body, true, 123, ngx.null, nil, function()end, { foo = "bar" })
local worker_logs = get_worker_logs()
assert.equals(1, #worker_logs)

local logged_entry = worker_logs[1]
assert.same(log_level, logged_entry.log_level)
assert.same(body, logged_entry.body)
assert.matches(body .. "true123nilnilfunction:%s0x%x+table:%s0x%x+", logged_entry.body)
assert.is_table(logged_entry.attributes)
assert.is_number(logged_entry.attributes["introspection.current.line"])
assert.is_string(logged_entry.attributes["introspection.name"])
Expand Down

0 comments on commit fc44de7

Please sign in to comment.