Skip to content

Commit

Permalink
Merge pull request #61 from yangxikun/feature/https_client
Browse files Browse the repository at this point in the history
feat: exporter client support https #60
  • Loading branch information
yangxikun authored Jan 30, 2023
2 parents c050781 + 2dedbe2 commit 1a197b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion lib/opentelemetry/trace/exporter/http_client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ function _M.new(address, timeout, headers)
headers = headers or {}
headers["Content-Type"] = "application/x-protobuf"

local uri = address .. "/v1/traces"
if address:find("http", 1, true) ~= 1 then
uri = "http://" .. uri
end

local self = {
uri = "http://" .. address .. "/v1/traces",
uri = uri,
timeout = timeout,
headers = headers,
}
Expand Down
2 changes: 1 addition & 1 deletion lib/opentelemetry/trace/span_status.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api_span_status = require("lib.opentelemetry.api.trace.span_status")
local api_span_status = require("opentelemetry.api.trace.span_status")

local _M = api_span_status:new()

Expand Down

0 comments on commit 1a197b4

Please sign in to comment.