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

Add tracing API #5

Draft
wants to merge 21 commits into
base: add-logger
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
branches:
- "main"
- "update-ci"
- "api-tracestate"
pull_request:
branches:
- main
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ openresty-build:
$(CONTAINER_ORCHESTRATOR) build

doc:
$(CONTAINER_ORCHESTRATOR) run $(CONTAINER_ORCHESTRATOR_EXEC_OPTIONS) -- openresty bash -c 'ldoc lib/opentelemetry/api'
$(CONTAINER_ORCHESTRATOR) run --no-deps $(CONTAINER_ORCHESTRATOR_EXEC_OPTIONS) -- utils bash -c 'ldoc --all lib/opentelemetry/api'

check-format:
$(CONTAINER_ORCHESTRATOR) run --no-deps $(CONTAINER_ORCHESTRATOR_EXEC_OPTIONS) -- utils bash -c 'lua-format --check lib/opentelemetry/api/**/*.lua spec/api/**/*.lua'
Expand All @@ -31,4 +31,4 @@ format:
$(CONTAINER_ORCHESTRATOR) run --no-deps $(CONTAINER_ORCHESTRATOR_EXEC_OPTIONS) -- utils bash -c 'lua-format -i lib/opentelemetry/api/**/*.lua spec/api/**/*.lua'

api-test:
$(CONTAINER_ORCHESTRATOR) run --no-deps $(CONTAINER_ORCHESTRATOR_EXEC_OPTIONS) -- openresty bash -c 'busted -m "./lib/?.lua;./lib/?/?.lua;./lib/?/?/?.lua" ./spec/api'
$(CONTAINER_ORCHESTRATOR) run --no-deps $(CONTAINER_ORCHESTRATOR_EXEC_OPTIONS) -- openresty bash -c 'busted -m "./lib/?.lua;./lib/?/?.lua;./lib/?/?/?.lua" ./spec/api/'
5 changes: 3 additions & 2 deletions busted-runner
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
package.path = './lib/?.lua;./lib/?/?.lua;./lib/?/init.lua' .. package.path

-- Set up global tracer
Global = require("opentelemetry.global")
otel_global = require("opentelemetry.global")
otel_global.logger = require("opentelemetry.utils.logger.nginx"):new("debug")
local tracer_provider = require("opentelemetry.trace.tracer_provider")
local attr = require("opentelemetry.attribute")
local resource = require("opentelemetry.resource")
Expand All @@ -17,7 +18,7 @@ local tracer_provider = tracer_provider.new(processor, {
sampler = always_on_sampler,
resource = resource.new(attr.string("service.name", "openresty"), attr.int("attr_int", 100)),
})
Global.set_tracer_provider(tracer_provider)
otel_global.set_tracer_provider(tracer_provider)

if ngx ~= nil then
ngx.exit = function() end
Expand Down
98 changes: 0 additions & 98 deletions doc/index.html

This file was deleted.

Loading