Skip to content

Commit 3a67bac

Browse files
committed
use refinement
1 parent e005385 commit 3a67bac

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/fluent/plugin/in_otlp.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,23 @@
44
require "fluent/plugin/otlp/constant"
55
require "fluent/plugin/otlp/request"
66
require "fluent/plugin/otlp/response"
7+
require "fluent/plugin_helper/http_server"
78
require "zlib"
89

10+
unless Fluent::PluginHelper::HttpServer::Request.method_defined?(:headers)
11+
module Fluent::PluginHelper::HttpServer
12+
module Extension
13+
refine Request do
14+
def headers
15+
@request.headers
16+
end
17+
end
18+
end
19+
end
20+
21+
using Fluent::PluginHelper::HttpServer::Extension
22+
end
23+
924
module Fluent::Plugin
1025
class OtlpInput < Input
1126
Fluent::Plugin.register_input("otlp", self)

0 commit comments

Comments
 (0)