fluent-plugin-opentelemetry 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fce288ab5297db7255a6f89bd709731863d5a8952a08a40276f2f06381bfdf6
4
- data.tar.gz: df4713f998552481517d0af45085b99551751e89600d9c6f46e541349173aaf3
3
+ metadata.gz: 8f6154975d902432eeaefe60976cc6e1439d5a0cffcea2a38271a3b4bced9b7a
4
+ data.tar.gz: cfee50b70e200cbd90aa4e0b4f2f5d4809df91dda7ae89c9034a9b33e46b8b71
5
5
  SHA512:
6
- metadata.gz: 8e1d534c9ed6045031b9a40e58751c9c4a1c77e519d37a06dffa9d9d9e97eacccb8e0f90b3931ef925b20268dd97163423aaf05d4013f4b73192fbd46f322f82
7
- data.tar.gz: e11de5fbc7b9282a205a653b05f7ed6e6554ac5760ef02b3e9f143875cc771720609095012f343ea5bc0a02daeba6e85baafb7e2a1ffe5fdcb0a7756f40e12a0
6
+ metadata.gz: 149b90626377df714c8b0df916187aa27f2769cb5d5bb9881463e06a90034ef29f25ee44b00ac1ea08d14fcc5ec9671f5fe1629de9a745fbe166b7211e19580c
7
+ data.tar.gz: c7d7cd3c01561c67bd5ef63fe973c31bc07cd556b5ae0f5ba7c424e250d4e2534f34bbea4b2f5c658027b0ebbd07c33a68ba7ffed9109dbe4ede8bbfc1034e88
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.0] - 2026-02-01
4
+
5
+ Improvements:
6
+
7
+ - out_opentelemetry: add gRPC keep alive settings (#29)
8
+ - in_opentelemetry_metrics: add Fluentd CPU and memory usage metrics (#21)
9
+ - out_opentelemetry: reuse the connection in grpc (#19)
10
+ - out_opentelemetry: add timeout parameter in grpc (#18)
11
+ - out_opentelemetry: add compress parameter in grpc (#17)
12
+ - ProtocolBuffer: update OTLP v1.9.0
13
+
14
+ Fixes:
15
+
16
+ - out_opentelemetry: fix memory leak by explicitly consuming response body (#27)
17
+ - out_opentelemetry: Fix buffer handling to support buffered flush modes (#26)
18
+ - in_opentelemetry_metrics: add process id in CPU and memory usage
19
+ - in_opentelemetry: Ensure request body is closed to prevent socket leaks (#25)
20
+ - in_opentelemetry: fix "Errno::EMFILE: Too many open files" error by reusing connection (#23)
21
+ - in_opentelemetry: stop the grpc server explicitly
22
+ - http_output_handler: Fix HTTP response handling to accept all 2xx success status codes (#13)
23
+
24
+ Breaking Changes:
25
+
26
+ - in_opentelemetry_metrics: rename attribute key name with dot separation
27
+ - in_opentelemetry_metrics: rename metrics to use dot notation instead of underscores (#28)
28
+
3
29
  ## [0.4.0] - 2025-10-10
4
30
 
5
31
  - in_opentelemetry_metrics: Add plugin to support fluentd metrics export (#10)
data/README.md CHANGED
@@ -117,7 +117,7 @@ To output the data, it requires to use output `opentelemetry` plugin.
117
117
  |--------------------|--------|-------------------------------------------------------|-------------|
118
118
  | tag | string | The tag of the event | required |
119
119
  | emit_interval | time | Determine the rate to emit internal metrics as events | `60` |
120
- | metric_name_prefix | string | The prefix of metric name | `fluentd_` |
120
+ | metric_name_prefix | string | The prefix of metric name | `fluentd.` |
121
121
 
122
122
  #### Example
123
123
 
@@ -139,6 +139,11 @@ To output the data, it requires to use output `opentelemetry` plugin.
139
139
  </match>
140
140
  ```
141
141
 
142
+ > [!TIP]
143
+ > To visualize Fluentd CPU usage (`process_cpu_time`), use the `rate()` function since the CPU metric is reported as cumulative time (Counter).
144
+ >
145
+ > **PromQL Example:** `rate(fluentd_process_cpu_time_seconds_total[$__rate_interval])`
146
+
142
147
  ### Output `opentelemetry` plugin
143
148
 
144
149
  To send data, this plugin requires `<http>` or `<grpc>` section.
@@ -169,9 +174,16 @@ It needs to install `grpc` gem manually to use this feature.
169
174
  > [!WARNING]
170
175
  > Now, gRPC feature status is experimental.
171
176
 
172
- | parameter | type | description | default |
173
- |---------------------------------|---------|----------------------------------------------------------------|------------------|
174
- | endpoint | string | The endpoint for HTTP/HTTPS request | `127.0.0.1:4317` |
177
+ | parameter | type | description | default |
178
+ |-------------------|---------|----------------------------------------------------------------------|------------------|
179
+ | endpoint | string | The endpoint for gRPC request | `127.0.0.1:4317` |
180
+ | timeout | integer | The maximum time (seconds) to wait a response from the server | `60` |
181
+ | keepalive_time | integer | The interval in seconds to send gRPC keepalive pings. | `30` |
182
+ | keepalive_timeout | integer | The timeout in seconds to wait for a keepalive ping acknowledgement. | `15` |
183
+
184
+ | parameter | type | description | available values | default |
185
+ |-----------|--------|-------------------------------------------|------------------|---------|
186
+ | compress | enum | The option to compress gRPC request body | `text` / `gzip` | `text` |
175
187
 
176
188
  #### `<transport>` section
177
189
 
data/Rakefile CHANGED
@@ -15,13 +15,16 @@ end
15
15
 
16
16
  task default: :test
17
17
 
18
+ # Ref. https://github.com/open-telemetry/opentelemetry-proto/releases
19
+ OTLP_VERSION = "v1.9.0"
20
+
18
21
  desc "Regenerate 'lib/opentelemetry'"
19
22
  task :"regenerate:opentelemetry" do
20
23
  lib_path = File.expand_path("lib/opentelemetry")
21
24
 
22
25
  rm_rf lib_path
23
26
  cd Dir.tmpdir do
24
- sh "git clone https://github.com/open-telemetry/opentelemetry-proto.git --depth 1"
27
+ sh "git clone --depth 1 --branch #{OTLP_VERSION} https://github.com/open-telemetry/opentelemetry-proto.git"
25
28
  cd "opentelemetry-proto" do
26
29
  files = Dir.glob("opentelemetry/**/*.proto")
27
30
 
data/TODO.md CHANGED
@@ -3,9 +3,9 @@ Ref. https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specif
3
3
 
4
4
  # Protocol Details
5
5
  ## OTLP/gRPC
6
- - [ ] [MUST] All server components MUST support the following transport compression options:
7
- - [ ] [MUST] No compression, denoted by none.
8
- - [ ] [MUST] Gzip compression, denoted by gzip.
6
+ - [x] [MUST] All server components MUST support the following transport compression options:
7
+ - [x] [MUST] No compression, denoted by none.
8
+ - [x] [MUST] Gzip compression, denoted by gzip.
9
9
 
10
10
  ### OTLP/gRPC Concurrent Requests
11
11
  - [ ] [SHOULD] The implementations that need to achieve high throughput SHOULD support concurrent Unary calls to achieve higher throughput.
@@ -17,7 +17,7 @@ Ref. https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specif
17
17
  - Full Success
18
18
  - [x] [MUST] On success, the server response MUST be a Export<signal>ServiceResponse message.
19
19
  - [x] [MUST] The server MUST leave the partial_success field unset in case of a successful response.
20
- - [ ] [SHOULD] If the server receives an empty request the server SHOULD respond with success.
20
+ - [x] [SHOULD] If the server receives an empty request the server SHOULD respond with success.
21
21
  - Partial Success (NOTE: Currentry, it does not support partially accepting)
22
22
  - [ ] [MUST] The server response MUST be the same Export<signal>ServiceResponse message as in the Full Success case.
23
23
  - [ ] [MUST] The server MUST initialize the partial_success field, and it MUST set the respective rejected_spans, rejected_data_points, rejected_log_records or rejected_profiles field with the number of spans/data points/log records/profiles it rejected.
@@ -74,8 +74,8 @@ module Fluent::Plugin
74
74
 
75
75
  if @grpc_config
76
76
  thread_create(:in_opentelemetry_grpc_server) do
77
- grpc_handler = Opentelemetry::GrpcInputHandler.new(@grpc_config, log)
78
- grpc_handler.run(
77
+ @grpc_handler = Opentelemetry::GrpcInputHandler.new(@grpc_config, log)
78
+ @grpc_handler.run(
79
79
  logs: lambda { |record|
80
80
  router.emit(tag_for(Opentelemetry::RECORD_TYPE_LOGS), Fluent::EventTime.now, { "type" => Opentelemetry::RECORD_TYPE_LOGS, "message" => record })
81
81
  },
@@ -90,6 +90,12 @@ module Fluent::Plugin
90
90
  end
91
91
  end
92
92
 
93
+ def stop
94
+ @grpc_handler&.stop
95
+
96
+ super
97
+ end
98
+
93
99
  private
94
100
 
95
101
  def expand_tag_placeholders(tag)
@@ -6,6 +6,7 @@ require "fluent/plugin/opentelemetry/version"
6
6
  require "fluent/plugin_helper/timer"
7
7
  require "fluent/version"
8
8
 
9
+ require "get_process_mem"
9
10
  require "json"
10
11
  require "socket"
11
12
 
@@ -22,7 +23,7 @@ module Fluent::Plugin
22
23
  config_param :tag, :string
23
24
 
24
25
  desc "The prefix of metric name."
25
- config_param :metric_name_prefix, :string, default: "fluentd_"
26
+ config_param :metric_name_prefix, :string, default: "fluentd."
26
27
 
27
28
  def start
28
29
  super
@@ -49,6 +50,7 @@ module Fluent::Plugin
49
50
  @metric_name_prefix = metric_name_prefix.to_s
50
51
  @hostname = Socket.gethostname
51
52
  @monitor_info = MonitorInfo.new
53
+ @memory = GetProcessMem.new
52
54
  end
53
55
 
54
56
  def record
@@ -99,17 +101,17 @@ module Fluent::Plugin
99
101
 
100
102
  @monitor_info.plugins_info_all.each do |record|
101
103
  attributes = {
102
- plugin_id: record["plugin_id"],
103
- plugin: plugin_name(record["plugin_category"], record["type"]),
104
- plugin_category: record["plugin_category"],
105
- plugin_type: record["type"]
104
+ "plugin.id" => record["plugin_id"],
105
+ "plugin" => plugin_name(record["plugin_category"], record["type"]),
106
+ "plugin.category" => record["plugin_category"],
107
+ "plugin.type" => record["type"]
106
108
  }.map { |k, v| string_value_attribute(k, v) }
107
109
 
108
110
  record.each do |key, value|
109
111
  next unless value.is_a?(Numeric)
110
112
 
111
113
  metrics << {
112
- "name" => @metric_name_prefix + key.to_s,
114
+ "name" => replace_metrics_name_separator(@metric_name_prefix + key.to_s),
113
115
  "unit" => "1",
114
116
  # TODO: "description"
115
117
  "gauge" => {
@@ -125,10 +127,52 @@ module Fluent::Plugin
125
127
  }
126
128
  end
127
129
  end
130
+ metrics.concat(process_metrics(time_nano_sec))
128
131
 
129
132
  metrics
130
133
  end
131
134
 
135
+ def process_metrics(time_nano_sec)
136
+ [
137
+ {
138
+ "name" => replace_metrics_name_separator(@metric_name_prefix + "process.memory.usage"),
139
+ "unit" => "By",
140
+ "gauge" => {
141
+ "dataPoints" => [
142
+ {
143
+ "startTimeUnixNano" => @start_time_unix_nano,
144
+ "timeUnixNano" => time_nano_sec,
145
+ "asInt" => @memory.bytes.to_i,
146
+ "attributes" => [
147
+ string_value_attribute("type", "resident"),
148
+ int_value_attribute("process.pid", Process.pid)
149
+ ]
150
+ }
151
+ ]
152
+ }
153
+ },
154
+ {
155
+ "name" => replace_metrics_name_separator(@metric_name_prefix + "process.cpu.time"),
156
+ "unit" => "s",
157
+ "sum" => {
158
+ "aggregationTemporality" => 2, # CUMULATIVE
159
+ "isMonotonic" => true,
160
+ "dataPoints" => [
161
+ {
162
+ "startTimeUnixNano" => @start_time_unix_nano,
163
+ "timeUnixNano" => time_nano_sec,
164
+ "asDouble" => Process.times.utime.to_f,
165
+ "attributes" => [
166
+ string_value_attribute("state", "user"),
167
+ int_value_attribute("process.pid", Process.pid)
168
+ ]
169
+ }
170
+ ]
171
+ }
172
+ }
173
+ ]
174
+ end
175
+
132
176
  def plugin_name(category, type)
133
177
  prefix =
134
178
  case category
@@ -160,6 +204,10 @@ module Fluent::Plugin
160
204
  }
161
205
  }
162
206
  end
207
+
208
+ def replace_metrics_name_separator(name)
209
+ name.tr("_", ".")
210
+ end
163
211
  end
164
212
 
165
213
  # Imported from Fluent::Plugin::MonitorAgentInput
@@ -55,31 +55,35 @@ module Fluent::Plugin::Opentelemetry
55
55
  end
56
56
 
57
57
  def run(logs:, metrics:, traces:)
58
- server = GRPC::RpcServer.new(interceptors: [ExceptionInterceptor.new])
59
- server.add_http2_port("#{@grpc_config.bind}:#{@grpc_config.port}", :this_port_is_insecure)
58
+ @server = GRPC::RpcServer.new(interceptors: [ExceptionInterceptor.new])
59
+ @server.add_http2_port("#{@grpc_config.bind}:#{@grpc_config.port}", :this_port_is_insecure)
60
60
 
61
61
  logs_handler = ServiceHandler::Logs.new
62
62
  logs_handler.callback = lambda { |request|
63
63
  logs.call(request.to_json)
64
64
  Fluent::Plugin::Opentelemetry::Response::Logs.build
65
65
  }
66
- server.handle(logs_handler)
66
+ @server.handle(logs_handler)
67
67
 
68
68
  metrics_handler = ServiceHandler::Metrics.new
69
69
  metrics_handler.callback = lambda { |request|
70
70
  metrics.call(request.to_json)
71
71
  Fluent::Plugin::Opentelemetry::Response::Metrics.build
72
72
  }
73
- server.handle(metrics_handler)
73
+ @server.handle(metrics_handler)
74
74
 
75
75
  traces_handler = ServiceHandler::Traces.new
76
76
  traces_handler.callback = lambda { |request|
77
77
  traces.call(request.to_json)
78
78
  Fluent::Plugin::Opentelemetry::Response::Traces.build
79
79
  }
80
- server.handle(traces_handler)
80
+ @server.handle(traces_handler)
81
81
 
82
- server.run_till_terminated
82
+ @server.run_till_terminated
83
+ end
84
+
85
+ def stop
86
+ @server.stop
83
87
  end
84
88
  end
85
89
  end
@@ -17,9 +17,9 @@ class Fluent::Plugin::Opentelemetry::GrpcOutputHandler
17
17
  @stub = Opentelemetry::Proto::Collector::Logs::V1::LogsService::Stub.new(host, creds, **kw)
18
18
  end
19
19
 
20
- def export(json)
20
+ def export(json, **kw)
21
21
  message = Opentelemetry::Proto::Collector::Logs::V1::ExportLogsServiceRequest.decode_json(json)
22
- @stub.export(message)
22
+ @stub.export(message, **kw)
23
23
  end
24
24
  end
25
25
 
@@ -28,9 +28,9 @@ class Fluent::Plugin::Opentelemetry::GrpcOutputHandler
28
28
  @stub = Opentelemetry::Proto::Collector::Metrics::V1::MetricsService::Stub.new(host, creds, **kw)
29
29
  end
30
30
 
31
- def export(json)
31
+ def export(json, **kw)
32
32
  message = Opentelemetry::Proto::Collector::Metrics::V1::ExportMetricsServiceRequest.decode_json(json)
33
- @stub.export(message)
33
+ @stub.export(message, **kw)
34
34
  end
35
35
  end
36
36
 
@@ -39,9 +39,9 @@ class Fluent::Plugin::Opentelemetry::GrpcOutputHandler
39
39
  @stub = Opentelemetry::Proto::Collector::Trace::V1::TraceService::Stub.new(host, creds, **kw)
40
40
  end
41
41
 
42
- def export(json)
42
+ def export(json, **kw)
43
43
  message = Opentelemetry::Proto::Collector::Trace::V1::ExportTraceServiceRequest.decode_json(json)
44
- @stub.export(message)
44
+ @stub.export(message, **kw)
45
45
  end
46
46
  end
47
47
  end
@@ -50,24 +50,27 @@ class Fluent::Plugin::Opentelemetry::GrpcOutputHandler
50
50
  @grpc_config = grpc_config
51
51
  @transport_config = transport_config
52
52
  @logger = logger
53
+
54
+ channel_args = {}
55
+ channel_args = GRPC::Core::CompressionOptions.new({ default_algorithm: :gzip }).to_channel_arg_hash if @grpc_config.compress == :gzip
56
+ channel_args["grpc.keepalive_time_ms"] = grpc_config.keepalive_time * 1000
57
+ channel_args["grpc.keepalive_timeout_ms"] = grpc_config.keepalive_timeout * 1000
58
+ channel_args["grpc.keepalive_permit_without_calls"] = 1
59
+ @services = {
60
+ Fluent::Plugin::Opentelemetry::RECORD_TYPE_LOGS => ServiceStub::Logs.new(@grpc_config.endpoint, :this_channel_is_insecure, channel_args: channel_args),
61
+ Fluent::Plugin::Opentelemetry::RECORD_TYPE_METRICS => ServiceStub::Metrics.new(@grpc_config.endpoint, :this_channel_is_insecure, channel_args: channel_args),
62
+ Fluent::Plugin::Opentelemetry::RECORD_TYPE_TRACES => ServiceStub::Traces.new(@grpc_config.endpoint, :this_channel_is_insecure, channel_args: channel_args)
63
+ }
53
64
  end
54
65
 
55
66
  def export(record)
56
67
  msg = record["message"]
57
68
 
58
- credential = :this_channel_is_insecure
59
-
60
- case record["type"]
61
- when Fluent::Plugin::Opentelemetry::RECORD_TYPE_LOGS
62
- service = ServiceStub::Logs.new(@grpc_config.endpoint, credential)
63
- when Fluent::Plugin::Opentelemetry::RECORD_TYPE_METRICS
64
- service = ServiceStub::Metrics.new(@grpc_config.endpoint, credential)
65
- when Fluent::Plugin::Opentelemetry::RECORD_TYPE_TRACES
66
- service = ServiceStub::Traces.new(@grpc_config.endpoint, credential)
67
- end
69
+ service = @services[record["type"]]
70
+ raise ::Fluent::UnrecoverableError, "got unknown record type '#{record['type']}'" unless service
68
71
 
69
72
  begin
70
- service.export(msg)
73
+ service.export(msg, deadline: Time.now + @grpc_config.timeout)
71
74
  rescue Google::Protobuf::ParseError => e
72
75
  # The message format does not comply with the OpenTelemetry protocol.
73
76
  raise ::Fluent::UnrecoverableError, e.message
@@ -6,24 +6,32 @@ require "fluent/plugin/opentelemetry/response"
6
6
  require "google/protobuf"
7
7
  require "zlib"
8
8
 
9
- unless Fluent::PluginHelper::HttpServer::Request.method_defined?(:headers)
10
- # This API was introduced at fluentd v1.19.0.
11
- # Ref. https://github.com/fluent/fluentd/pull/4903
12
- # If we have supported v1.19.0+ only, we can remove this patch.
13
- module Fluent::PluginHelper::HttpServer
14
- module Extension
15
- refine Request do
9
+ module Fluent::PluginHelper::HttpServer
10
+ module Extension
11
+ refine Request do
12
+ # This API was introduced at fluentd v1.19.0.
13
+ # Ref. https://github.com/fluent/fluentd/pull/4903
14
+ # If we have supported v1.19.0+ only, we can remove this patch.
15
+ unless method_defined?(:headers)
16
16
  def headers
17
17
  @request.headers
18
18
  end
19
19
  end
20
+
21
+ # Workaround for fluentd v1.19.1 or earlier which does not close request body.
22
+ # Ref. https://github.com/fluent/fluentd/pull/5231
23
+ unless method_defined?(:close)
24
+ def close
25
+ @request.body&.close
26
+ end
27
+ end
20
28
  end
21
29
  end
22
-
23
- using Fluent::PluginHelper::HttpServer::Extension
24
30
  end
25
31
 
26
32
  class Fluent::Plugin::Opentelemetry::HttpInputHandler
33
+ using Fluent::PluginHelper::HttpServer::Extension
34
+
27
35
  def logs(req, &block)
28
36
  common(req, Fluent::Plugin::Opentelemetry::Request::Logs, Fluent::Plugin::Opentelemetry::Response::Logs, &block)
29
37
  end
@@ -41,10 +49,10 @@ class Fluent::Plugin::Opentelemetry::HttpInputHandler
41
49
  def common(req, request_class, response_class)
42
50
  content_type = req.headers["content-type"]
43
51
  content_encoding = req.headers["content-encoding"]&.first
52
+ body = req.body
44
53
  return response_unsupported_media_type unless valid_content_type?(content_type)
45
54
  return response_bad_request(content_type) unless valid_content_encoding?(content_encoding)
46
55
 
47
- body = req.body
48
56
  body = Zlib::GzipReader.new(StringIO.new(body)).read if content_encoding == Fluent::Plugin::Opentelemetry::CONTENT_ENCODING_GZIP
49
57
 
50
58
  begin
@@ -58,6 +66,8 @@ class Fluent::Plugin::Opentelemetry::HttpInputHandler
58
66
 
59
67
  res = response_class.new
60
68
  response(200, content_type, res.body(type: Fluent::Plugin::Opentelemetry::Response.type(content_type)))
69
+ ensure
70
+ req.close
61
71
  end
62
72
 
63
73
  def valid_content_type?(content_type)
@@ -14,40 +14,51 @@ class Fluent::Plugin::Opentelemetry::HttpOutputHandler
14
14
  @transport_config = transport_config
15
15
  @logger = logger
16
16
 
17
- @tls_settings = {}
18
- if @transport_config.protocol == :tls
19
- @tls_settings[:client_cert] = @transport_config.cert_path
20
- @tls_settings[:client_key] = @transport_config.private_key_path
21
- @tls_settings[:client_key_pass] = @transport_config.private_key_passphrase
22
- @tls_settings[:ssl_min_version] = Fluent::Plugin::Opentelemetry::TLS_VERSIONS_MAP[@transport_config.min_version]
23
- @tls_settings[:ssl_max_version] = Fluent::Plugin::Opentelemetry::TLS_VERSIONS_MAP[@transport_config.max_version]
17
+ tls_settings = {}
18
+ if transport_config.protocol == :tls
19
+ tls_settings[:client_cert] = @transport_config.cert_path
20
+ tls_settings[:client_key] = @transport_config.private_key_path
21
+ tls_settings[:client_key_pass] = @transport_config.private_key_passphrase
22
+ tls_settings[:ssl_min_version] = Fluent::Plugin::Opentelemetry::TLS_VERSIONS_MAP[@transport_config.min_version]
23
+ tls_settings[:ssl_max_version] = Fluent::Plugin::Opentelemetry::TLS_VERSIONS_MAP[@transport_config.max_version]
24
24
  end
25
25
 
26
- @timeout_settings = {
26
+ timeout_settings = {
27
27
  read_timeout: http_config.read_timeout,
28
28
  write_timeout: http_config.write_timeout,
29
29
  connect_timeout: http_config.connect_timeout
30
30
  }
31
+
32
+ Excon.defaults[:ssl_verify_peer] = false if @transport_config.insecure
33
+ @connections = {
34
+ Fluent::Plugin::Opentelemetry::RECORD_TYPE_LOGS => Excon.new(http_logs_endpoint, proxy: @http_config.proxy, persistent: true, **tls_settings, **timeout_settings),
35
+ Fluent::Plugin::Opentelemetry::RECORD_TYPE_METRICS => Excon.new(http_metrics_endpoint, proxy: @http_config.proxy, persistent: true, **tls_settings, **timeout_settings),
36
+ Fluent::Plugin::Opentelemetry::RECORD_TYPE_TRACES => Excon.new(http_traces_endpoint, proxy: @http_config.proxy, persistent: true, **tls_settings, **timeout_settings)
37
+ }
31
38
  end
32
39
 
33
40
  def export(record)
34
- uri, connection = create_http_connection(record)
35
- response = connection.post
41
+ uri, headers, body = get_post_data(record)
42
+ response = @connections[record["type"]].post(body: body, headers: headers, idempotent: true)
36
43
 
37
- if response.status != 200
38
- if response.status == 400
39
- # The client MUST NOT retry the request when it receives HTTP 400 Bad Request response.
40
- raise Fluent::UnrecoverableError, "got unrecoverable error response from '#{uri}', response code is #{response.status}"
41
- end
44
+ # Explicitly consume the response body to clear the socket buffer.
45
+ # Without this, Excon retains the buffer, causing memory leaks and blocking persistent connections.
46
+ response.body
42
47
 
43
- if @http_config.retryable_response_codes&.include?(response.status)
44
- raise Fluent::Plugin::OpentelemetryOutput::RetryableResponse, "got retryable error response from '#{uri}', response code is #{response.status}"
45
- end
46
- if @http_config.error_response_as_unrecoverable
47
- raise Fluent::UnrecoverableError, "got unrecoverable error response from '#{uri}', response code is #{response.status}"
48
- else
49
- @logger.error "got error response from '#{uri}', response code is #{response.status}"
50
- end
48
+ return if response.status >= 200 && response.status < 300
49
+
50
+ if response.status == 400
51
+ # The client MUST NOT retry the request when it receives HTTP 400 Bad Request response.
52
+ raise Fluent::UnrecoverableError, "got unrecoverable error response from '#{uri}', response code is #{response.status}"
53
+ end
54
+
55
+ if @http_config.retryable_response_codes&.include?(response.status)
56
+ raise Fluent::Plugin::OpentelemetryOutput::RetryableResponse, "got retryable error response from '#{uri}', response code is #{response.status}"
57
+ end
58
+ if @http_config.error_response_as_unrecoverable
59
+ raise Fluent::UnrecoverableError, "got unrecoverable error response from '#{uri}', response code is #{response.status}"
60
+ else
61
+ @logger.error "got error response from '#{uri}', response code is #{response.status}"
51
62
  end
52
63
  end
53
64
 
@@ -65,7 +76,7 @@ class Fluent::Plugin::Opentelemetry::HttpOutputHandler
65
76
  "#{@http_config.endpoint}/v1/traces"
66
77
  end
67
78
 
68
- def create_http_connection(record)
79
+ def get_post_data(record)
69
80
  msg = record["message"]
70
81
 
71
82
  begin
@@ -93,8 +104,6 @@ class Fluent::Plugin::Opentelemetry::HttpOutputHandler
93
104
  body = gz.close.string
94
105
  end
95
106
 
96
- Excon.defaults[:ssl_verify_peer] = false if @transport_config.insecure
97
- connection = Excon.new(uri, body: body, headers: headers, proxy: @http_config.proxy, persistent: true, **@tls_settings, **@timeout_settings)
98
- [uri, connection]
107
+ [uri, headers, body]
99
108
  end
100
109
  end
@@ -3,7 +3,7 @@
3
3
  module Fluent
4
4
  module Plugin
5
5
  module Opentelemetry
6
- VERSION = "0.4.0"
6
+ VERSION = "0.5.0"
7
7
  end
8
8
  end
9
9
  end
@@ -50,6 +50,18 @@ module Fluent::Plugin
50
50
  config_section :grpc, required: false, multi: false, init: false, param_name: :grpc_config do
51
51
  desc "The endpoint"
52
52
  config_param :endpoint, :string, default: "127.0.0.1:4317"
53
+
54
+ desc "Compress request body"
55
+ config_param :compress, :enum, list: %i[text gzip], default: :text
56
+
57
+ desc "The timeout in seconds"
58
+ config_param :timeout, :integer, default: 60
59
+
60
+ desc "The interval in seconds to send gRPC keepalive pings."
61
+ config_param :keepalive_time, :integer, default: 30
62
+
63
+ desc "The timeout in seconds to wait for a keepalive ping acknowledgement."
64
+ config_param :keepalive_timeout, :integer, default: 10
53
65
  end
54
66
 
55
67
  config_section :transport, required: false, multi: false, init: false, param_name: :transport_config do
@@ -75,17 +87,13 @@ module Fluent::Plugin
75
87
  true
76
88
  end
77
89
 
78
- def format(tag, time, record)
79
- JSON.generate(record)
80
- end
81
-
82
90
  def write(chunk)
83
- record = JSON.parse(chunk.read)
84
-
85
- if @grpc_handler
86
- @grpc_handler.export(record)
87
- else
88
- @http_handler.export(record)
91
+ chunk.each do |_, record| # rubocop:disable Style/HashEachMethods
92
+ if @grpc_handler
93
+ @grpc_handler.export(record)
94
+ else
95
+ @http_handler.export(record)
96
+ end
89
97
  end
90
98
  end
91
99
  end
@@ -9,7 +9,7 @@ require 'opentelemetry/proto/logs/v1/logs_pb'
9
9
 
10
10
  descriptor_data = "\n8opentelemetry/proto/collector/logs/v1/logs_service.proto\x12%opentelemetry.proto.collector.logs.v1\x1a&opentelemetry/proto/logs/v1/logs.proto\"\\\n\x18\x45xportLogsServiceRequest\x12@\n\rresource_logs\x18\x01 \x03(\x0b\x32).opentelemetry.proto.logs.v1.ResourceLogs\"u\n\x19\x45xportLogsServiceResponse\x12X\n\x0fpartial_success\x18\x01 \x01(\x0b\x32?.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\"O\n\x18\x45xportLogsPartialSuccess\x12\x1c\n\x14rejected_log_records\x18\x01 \x01(\x03\x12\x15\n\rerror_message\x18\x02 \x01(\t2\x9d\x01\n\x0bLogsService\x12\x8d\x01\n\x06\x45xport\x12?.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\x1a@.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\"\x00\x42\x98\x01\n(io.opentelemetry.proto.collector.logs.v1B\x10LogsServiceProtoP\x01Z0go.opentelemetry.io/proto/otlp/collector/logs/v1\xaa\x02%OpenTelemetry.Proto.Collector.Logs.V1b\x06proto3"
11
11
 
12
- pool = Google::Protobuf::DescriptorPool.generated_pool
12
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
13
13
  pool.add_serialized_file(descriptor_data)
14
14
 
15
15
  module Opentelemetry
@@ -9,7 +9,7 @@ require 'opentelemetry/proto/metrics/v1/metrics_pb'
9
9
 
10
10
  descriptor_data = "\n>opentelemetry/proto/collector/metrics/v1/metrics_service.proto\x12(opentelemetry.proto.collector.metrics.v1\x1a,opentelemetry/proto/metrics/v1/metrics.proto\"h\n\x1b\x45xportMetricsServiceRequest\x12I\n\x10resource_metrics\x18\x01 \x03(\x0b\x32/.opentelemetry.proto.metrics.v1.ResourceMetrics\"~\n\x1c\x45xportMetricsServiceResponse\x12^\n\x0fpartial_success\x18\x01 \x01(\x0b\x32\x45.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\"R\n\x1b\x45xportMetricsPartialSuccess\x12\x1c\n\x14rejected_data_points\x18\x01 \x01(\x03\x12\x15\n\rerror_message\x18\x02 \x01(\t2\xac\x01\n\x0eMetricsService\x12\x99\x01\n\x06\x45xport\x12\x45.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\x1a\x46.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\"\x00\x42\xa4\x01\n+io.opentelemetry.proto.collector.metrics.v1B\x13MetricsServiceProtoP\x01Z3go.opentelemetry.io/proto/otlp/collector/metrics/v1\xaa\x02(OpenTelemetry.Proto.Collector.Metrics.V1b\x06proto3"
11
11
 
12
- pool = Google::Protobuf::DescriptorPool.generated_pool
12
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
13
13
  pool.add_serialized_file(descriptor_data)
14
14
 
15
15
  module Opentelemetry
@@ -7,9 +7,9 @@ require 'google/protobuf'
7
7
  require 'opentelemetry/proto/profiles/v1development/profiles_pb'
8
8
 
9
9
 
10
- descriptor_data = "\nKopentelemetry/proto/collector/profiles/v1development/profiles_service.proto\x12\x34opentelemetry.proto.collector.profiles.v1development\x1a\x39opentelemetry/proto/profiles/v1development/profiles.proto\"w\n\x1c\x45xportProfilesServiceRequest\x12W\n\x11resource_profiles\x18\x01 \x03(\x0b\x32<.opentelemetry.proto.profiles.v1development.ResourceProfiles\"\x8c\x01\n\x1d\x45xportProfilesServiceResponse\x12k\n\x0fpartial_success\x18\x01 \x01(\x0b\x32R.opentelemetry.proto.collector.profiles.v1development.ExportProfilesPartialSuccess\"P\n\x1c\x45xportProfilesPartialSuccess\x12\x19\n\x11rejected_profiles\x18\x01 \x01(\x03\x12\x15\n\rerror_message\x18\x02 \x01(\t2\xc7\x01\n\x0fProfilesService\x12\xb3\x01\n\x06\x45xport\x12R.opentelemetry.proto.collector.profiles.v1development.ExportProfilesServiceRequest\x1aS.opentelemetry.proto.collector.profiles.v1development.ExportProfilesServiceResponse\"\x00\x42\xc9\x01\n7io.opentelemetry.proto.collector.profiles.v1developmentB\x14ProfilesServiceProtoP\x01Z?go.opentelemetry.io/proto/otlp/collector/profiles/v1development\xaa\x02\x34OpenTelemetry.Proto.Collector.Profiles.V1Developmentb\x06proto3"
10
+ descriptor_data = "\nKopentelemetry/proto/collector/profiles/v1development/profiles_service.proto\x12\x34opentelemetry.proto.collector.profiles.v1development\x1a\x39opentelemetry/proto/profiles/v1development/profiles.proto\"\xcb\x01\n\x1c\x45xportProfilesServiceRequest\x12W\n\x11resource_profiles\x18\x01 \x03(\x0b\x32<.opentelemetry.proto.profiles.v1development.ResourceProfiles\x12R\n\ndictionary\x18\x02 \x01(\x0b\x32>.opentelemetry.proto.profiles.v1development.ProfilesDictionary\"\x8c\x01\n\x1d\x45xportProfilesServiceResponse\x12k\n\x0fpartial_success\x18\x01 \x01(\x0b\x32R.opentelemetry.proto.collector.profiles.v1development.ExportProfilesPartialSuccess\"P\n\x1c\x45xportProfilesPartialSuccess\x12\x19\n\x11rejected_profiles\x18\x01 \x01(\x03\x12\x15\n\rerror_message\x18\x02 \x01(\t2\xc7\x01\n\x0fProfilesService\x12\xb3\x01\n\x06\x45xport\x12R.opentelemetry.proto.collector.profiles.v1development.ExportProfilesServiceRequest\x1aS.opentelemetry.proto.collector.profiles.v1development.ExportProfilesServiceResponse\"\x00\x42\xc9\x01\n7io.opentelemetry.proto.collector.profiles.v1developmentB\x14ProfilesServiceProtoP\x01Z?go.opentelemetry.io/proto/otlp/collector/profiles/v1development\xaa\x02\x34OpenTelemetry.Proto.Collector.Profiles.V1Developmentb\x06proto3"
11
11
 
12
- pool = Google::Protobuf::DescriptorPool.generated_pool
12
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
13
13
  pool.add_serialized_file(descriptor_data)
14
14
 
15
15
  module Opentelemetry
@@ -9,7 +9,7 @@ require 'opentelemetry/proto/trace/v1/trace_pb'
9
9
 
10
10
  descriptor_data = "\n:opentelemetry/proto/collector/trace/v1/trace_service.proto\x12&opentelemetry.proto.collector.trace.v1\x1a(opentelemetry/proto/trace/v1/trace.proto\"`\n\x19\x45xportTraceServiceRequest\x12\x43\n\x0eresource_spans\x18\x01 \x03(\x0b\x32+.opentelemetry.proto.trace.v1.ResourceSpans\"x\n\x1a\x45xportTraceServiceResponse\x12Z\n\x0fpartial_success\x18\x01 \x01(\x0b\x32\x41.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\"J\n\x19\x45xportTracePartialSuccess\x12\x16\n\x0erejected_spans\x18\x01 \x01(\x03\x12\x15\n\rerror_message\x18\x02 \x01(\t2\xa2\x01\n\x0cTraceService\x12\x91\x01\n\x06\x45xport\x12\x41.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\x1a\x42.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\"\x00\x42\x9c\x01\n)io.opentelemetry.proto.collector.trace.v1B\x11TraceServiceProtoP\x01Z1go.opentelemetry.io/proto/otlp/collector/trace/v1\xaa\x02&OpenTelemetry.Proto.Collector.Trace.V1b\x06proto3"
11
11
 
12
- pool = Google::Protobuf::DescriptorPool.generated_pool
12
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
13
13
  pool.add_serialized_file(descriptor_data)
14
14
 
15
15
  module Opentelemetry
@@ -7,7 +7,7 @@ require 'google/protobuf'
7
7
 
8
8
  descriptor_data = "\n*opentelemetry/proto/common/v1/common.proto\x12\x1dopentelemetry.proto.common.v1\"\x8c\x02\n\x08\x41nyValue\x12\x16\n\x0cstring_value\x18\x01 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x02 \x01(\x08H\x00\x12\x13\n\tint_value\x18\x03 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x04 \x01(\x01H\x00\x12@\n\x0b\x61rray_value\x18\x05 \x01(\x0b\x32).opentelemetry.proto.common.v1.ArrayValueH\x00\x12\x43\n\x0ckvlist_value\x18\x06 \x01(\x0b\x32+.opentelemetry.proto.common.v1.KeyValueListH\x00\x12\x15\n\x0b\x62ytes_value\x18\x07 \x01(\x0cH\x00\x42\x07\n\x05value\"E\n\nArrayValue\x12\x37\n\x06values\x18\x01 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.AnyValue\"G\n\x0cKeyValueList\x12\x37\n\x06values\x18\x01 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\"O\n\x08KeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.opentelemetry.proto.common.v1.AnyValue\"\x94\x01\n\x14InstrumentationScope\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12;\n\nattributes\x18\x03 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12 \n\x18\x64ropped_attributes_count\x18\x04 \x01(\r\"X\n\tEntityRef\x12\x12\n\nschema_url\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0f\n\x07id_keys\x18\x03 \x03(\t\x12\x18\n\x10\x64\x65scription_keys\x18\x04 \x03(\tB{\n io.opentelemetry.proto.common.v1B\x0b\x43ommonProtoP\x01Z(go.opentelemetry.io/proto/otlp/common/v1\xaa\x02\x1dOpenTelemetry.Proto.Common.V1b\x06proto3"
9
9
 
10
- pool = Google::Protobuf::DescriptorPool.generated_pool
10
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
11
11
  pool.add_serialized_file(descriptor_data)
12
12
 
13
13
  module Opentelemetry
@@ -10,7 +10,7 @@ require 'opentelemetry/proto/resource/v1/resource_pb'
10
10
 
11
11
  descriptor_data = "\n&opentelemetry/proto/logs/v1/logs.proto\x12\x1bopentelemetry.proto.logs.v1\x1a*opentelemetry/proto/common/v1/common.proto\x1a.opentelemetry/proto/resource/v1/resource.proto\"L\n\x08LogsData\x12@\n\rresource_logs\x18\x01 \x03(\x0b\x32).opentelemetry.proto.logs.v1.ResourceLogs\"\xa3\x01\n\x0cResourceLogs\x12;\n\x08resource\x18\x01 \x01(\x0b\x32).opentelemetry.proto.resource.v1.Resource\x12:\n\nscope_logs\x18\x02 \x03(\x0b\x32&.opentelemetry.proto.logs.v1.ScopeLogs\x12\x12\n\nschema_url\x18\x03 \x01(\tJ\x06\x08\xe8\x07\x10\xe9\x07\"\xa0\x01\n\tScopeLogs\x12\x42\n\x05scope\x18\x01 \x01(\x0b\x32\x33.opentelemetry.proto.common.v1.InstrumentationScope\x12;\n\x0blog_records\x18\x02 \x03(\x0b\x32&.opentelemetry.proto.logs.v1.LogRecord\x12\x12\n\nschema_url\x18\x03 \x01(\t\"\x83\x03\n\tLogRecord\x12\x16\n\x0etime_unix_nano\x18\x01 \x01(\x06\x12\x1f\n\x17observed_time_unix_nano\x18\x0b \x01(\x06\x12\x44\n\x0fseverity_number\x18\x02 \x01(\x0e\x32+.opentelemetry.proto.logs.v1.SeverityNumber\x12\x15\n\rseverity_text\x18\x03 \x01(\t\x12\x35\n\x04\x62ody\x18\x05 \x01(\x0b\x32\'.opentelemetry.proto.common.v1.AnyValue\x12;\n\nattributes\x18\x06 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12 \n\x18\x64ropped_attributes_count\x18\x07 \x01(\r\x12\r\n\x05\x66lags\x18\x08 \x01(\x07\x12\x10\n\x08trace_id\x18\t \x01(\x0c\x12\x0f\n\x07span_id\x18\n \x01(\x0c\x12\x12\n\nevent_name\x18\x0c \x01(\tJ\x04\x08\x04\x10\x05*\xc3\x05\n\x0eSeverityNumber\x12\x1f\n\x1bSEVERITY_NUMBER_UNSPECIFIED\x10\x00\x12\x19\n\x15SEVERITY_NUMBER_TRACE\x10\x01\x12\x1a\n\x16SEVERITY_NUMBER_TRACE2\x10\x02\x12\x1a\n\x16SEVERITY_NUMBER_TRACE3\x10\x03\x12\x1a\n\x16SEVERITY_NUMBER_TRACE4\x10\x04\x12\x19\n\x15SEVERITY_NUMBER_DEBUG\x10\x05\x12\x1a\n\x16SEVERITY_NUMBER_DEBUG2\x10\x06\x12\x1a\n\x16SEVERITY_NUMBER_DEBUG3\x10\x07\x12\x1a\n\x16SEVERITY_NUMBER_DEBUG4\x10\x08\x12\x18\n\x14SEVERITY_NUMBER_INFO\x10\t\x12\x19\n\x15SEVERITY_NUMBER_INFO2\x10\n\x12\x19\n\x15SEVERITY_NUMBER_INFO3\x10\x0b\x12\x19\n\x15SEVERITY_NUMBER_INFO4\x10\x0c\x12\x18\n\x14SEVERITY_NUMBER_WARN\x10\r\x12\x19\n\x15SEVERITY_NUMBER_WARN2\x10\x0e\x12\x19\n\x15SEVERITY_NUMBER_WARN3\x10\x0f\x12\x19\n\x15SEVERITY_NUMBER_WARN4\x10\x10\x12\x19\n\x15SEVERITY_NUMBER_ERROR\x10\x11\x12\x1a\n\x16SEVERITY_NUMBER_ERROR2\x10\x12\x12\x1a\n\x16SEVERITY_NUMBER_ERROR3\x10\x13\x12\x1a\n\x16SEVERITY_NUMBER_ERROR4\x10\x14\x12\x19\n\x15SEVERITY_NUMBER_FATAL\x10\x15\x12\x1a\n\x16SEVERITY_NUMBER_FATAL2\x10\x16\x12\x1a\n\x16SEVERITY_NUMBER_FATAL3\x10\x17\x12\x1a\n\x16SEVERITY_NUMBER_FATAL4\x10\x18*Y\n\x0eLogRecordFlags\x12\x1f\n\x1bLOG_RECORD_FLAGS_DO_NOT_USE\x10\x00\x12&\n!LOG_RECORD_FLAGS_TRACE_FLAGS_MASK\x10\xff\x01\x42s\n\x1eio.opentelemetry.proto.logs.v1B\tLogsProtoP\x01Z&go.opentelemetry.io/proto/otlp/logs/v1\xaa\x02\x1bOpenTelemetry.Proto.Logs.V1b\x06proto3"
12
12
 
13
- pool = Google::Protobuf::DescriptorPool.generated_pool
13
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
14
14
  pool.add_serialized_file(descriptor_data)
15
15
 
16
16
  module Opentelemetry
@@ -10,7 +10,7 @@ require 'opentelemetry/proto/resource/v1/resource_pb'
10
10
 
11
11
  descriptor_data = "\n,opentelemetry/proto/metrics/v1/metrics.proto\x12\x1eopentelemetry.proto.metrics.v1\x1a*opentelemetry/proto/common/v1/common.proto\x1a.opentelemetry/proto/resource/v1/resource.proto\"X\n\x0bMetricsData\x12I\n\x10resource_metrics\x18\x01 \x03(\x0b\x32/.opentelemetry.proto.metrics.v1.ResourceMetrics\"\xaf\x01\n\x0fResourceMetrics\x12;\n\x08resource\x18\x01 \x01(\x0b\x32).opentelemetry.proto.resource.v1.Resource\x12\x43\n\rscope_metrics\x18\x02 \x03(\x0b\x32,.opentelemetry.proto.metrics.v1.ScopeMetrics\x12\x12\n\nschema_url\x18\x03 \x01(\tJ\x06\x08\xe8\x07\x10\xe9\x07\"\x9f\x01\n\x0cScopeMetrics\x12\x42\n\x05scope\x18\x01 \x01(\x0b\x32\x33.opentelemetry.proto.common.v1.InstrumentationScope\x12\x37\n\x07metrics\x18\x02 \x03(\x0b\x32&.opentelemetry.proto.metrics.v1.Metric\x12\x12\n\nschema_url\x18\x03 \x01(\t\"\xcd\x03\n\x06Metric\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0c\n\x04unit\x18\x03 \x01(\t\x12\x36\n\x05gauge\x18\x05 \x01(\x0b\x32%.opentelemetry.proto.metrics.v1.GaugeH\x00\x12\x32\n\x03sum\x18\x07 \x01(\x0b\x32#.opentelemetry.proto.metrics.v1.SumH\x00\x12>\n\thistogram\x18\t \x01(\x0b\x32).opentelemetry.proto.metrics.v1.HistogramH\x00\x12U\n\x15\x65xponential_histogram\x18\n \x01(\x0b\x32\x34.opentelemetry.proto.metrics.v1.ExponentialHistogramH\x00\x12:\n\x07summary\x18\x0b \x01(\x0b\x32\'.opentelemetry.proto.metrics.v1.SummaryH\x00\x12\x39\n\x08metadata\x18\x0c \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValueB\x06\n\x04\x64\x61taJ\x04\x08\x04\x10\x05J\x04\x08\x06\x10\x07J\x04\x08\x08\x10\t\"M\n\x05Gauge\x12\x44\n\x0b\x64\x61ta_points\x18\x01 \x03(\x0b\x32/.opentelemetry.proto.metrics.v1.NumberDataPoint\"\xba\x01\n\x03Sum\x12\x44\n\x0b\x64\x61ta_points\x18\x01 \x03(\x0b\x32/.opentelemetry.proto.metrics.v1.NumberDataPoint\x12W\n\x17\x61ggregation_temporality\x18\x02 \x01(\x0e\x32\x36.opentelemetry.proto.metrics.v1.AggregationTemporality\x12\x14\n\x0cis_monotonic\x18\x03 \x01(\x08\"\xad\x01\n\tHistogram\x12G\n\x0b\x64\x61ta_points\x18\x01 \x03(\x0b\x32\x32.opentelemetry.proto.metrics.v1.HistogramDataPoint\x12W\n\x17\x61ggregation_temporality\x18\x02 \x01(\x0e\x32\x36.opentelemetry.proto.metrics.v1.AggregationTemporality\"\xc3\x01\n\x14\x45xponentialHistogram\x12R\n\x0b\x64\x61ta_points\x18\x01 \x03(\x0b\x32=.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\x12W\n\x17\x61ggregation_temporality\x18\x02 \x01(\x0e\x32\x36.opentelemetry.proto.metrics.v1.AggregationTemporality\"P\n\x07Summary\x12\x45\n\x0b\x64\x61ta_points\x18\x01 \x03(\x0b\x32\x30.opentelemetry.proto.metrics.v1.SummaryDataPoint\"\x86\x02\n\x0fNumberDataPoint\x12;\n\nattributes\x18\x07 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\x13\n\tas_double\x18\x04 \x01(\x01H\x00\x12\x10\n\x06\x61s_int\x18\x06 \x01(\x10H\x00\x12;\n\texemplars\x18\x05 \x03(\x0b\x32(.opentelemetry.proto.metrics.v1.Exemplar\x12\r\n\x05\x66lags\x18\x08 \x01(\rB\x07\n\x05valueJ\x04\x08\x01\x10\x02\"\xe6\x02\n\x12HistogramDataPoint\x12;\n\nattributes\x18\t \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05\x63ount\x18\x04 \x01(\x06\x12\x10\n\x03sum\x18\x05 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\rbucket_counts\x18\x06 \x03(\x06\x12\x17\n\x0f\x65xplicit_bounds\x18\x07 \x03(\x01\x12;\n\texemplars\x18\x08 \x03(\x0b\x32(.opentelemetry.proto.metrics.v1.Exemplar\x12\r\n\x05\x66lags\x18\n \x01(\r\x12\x10\n\x03min\x18\x0b \x01(\x01H\x01\x88\x01\x01\x12\x10\n\x03max\x18\x0c \x01(\x01H\x02\x88\x01\x01\x42\x06\n\x04_sumB\x06\n\x04_minB\x06\n\x04_maxJ\x04\x08\x01\x10\x02\"\xda\x04\n\x1d\x45xponentialHistogramDataPoint\x12;\n\nattributes\x18\x01 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05\x63ount\x18\x04 \x01(\x06\x12\x10\n\x03sum\x18\x05 \x01(\x01H\x00\x88\x01\x01\x12\r\n\x05scale\x18\x06 \x01(\x11\x12\x12\n\nzero_count\x18\x07 \x01(\x06\x12W\n\x08positive\x18\x08 \x01(\x0b\x32\x45.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\x12W\n\x08negative\x18\t \x01(\x0b\x32\x45.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\x12\r\n\x05\x66lags\x18\n \x01(\r\x12;\n\texemplars\x18\x0b \x03(\x0b\x32(.opentelemetry.proto.metrics.v1.Exemplar\x12\x10\n\x03min\x18\x0c \x01(\x01H\x01\x88\x01\x01\x12\x10\n\x03max\x18\r \x01(\x01H\x02\x88\x01\x01\x12\x16\n\x0ezero_threshold\x18\x0e \x01(\x01\x1a\x30\n\x07\x42uckets\x12\x0e\n\x06offset\x18\x01 \x01(\x11\x12\x15\n\rbucket_counts\x18\x02 \x03(\x04\x42\x06\n\x04_sumB\x06\n\x04_minB\x06\n\x04_max\"\xc5\x02\n\x10SummaryDataPoint\x12;\n\nattributes\x18\x07 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05\x63ount\x18\x04 \x01(\x06\x12\x0b\n\x03sum\x18\x05 \x01(\x01\x12Y\n\x0fquantile_values\x18\x06 \x03(\x0b\x32@.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\x12\r\n\x05\x66lags\x18\x08 \x01(\r\x1a\x32\n\x0fValueAtQuantile\x12\x10\n\x08quantile\x18\x01 \x01(\x01\x12\r\n\x05value\x18\x02 \x01(\x01J\x04\x08\x01\x10\x02\"\xc1\x01\n\x08\x45xemplar\x12\x44\n\x13\x66iltered_attributes\x18\x07 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12\x16\n\x0etime_unix_nano\x18\x02 \x01(\x06\x12\x13\n\tas_double\x18\x03 \x01(\x01H\x00\x12\x10\n\x06\x61s_int\x18\x06 \x01(\x10H\x00\x12\x0f\n\x07span_id\x18\x04 \x01(\x0c\x12\x10\n\x08trace_id\x18\x05 \x01(\x0c\x42\x07\n\x05valueJ\x04\x08\x01\x10\x02*\x8c\x01\n\x16\x41ggregationTemporality\x12\'\n#AGGREGATION_TEMPORALITY_UNSPECIFIED\x10\x00\x12!\n\x1d\x41GGREGATION_TEMPORALITY_DELTA\x10\x01\x12&\n\"AGGREGATION_TEMPORALITY_CUMULATIVE\x10\x02*^\n\x0e\x44\x61taPointFlags\x12\x1f\n\x1b\x44\x41TA_POINT_FLAGS_DO_NOT_USE\x10\x00\x12+\n\'DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK\x10\x01\x42\x7f\n!io.opentelemetry.proto.metrics.v1B\x0cMetricsProtoP\x01Z)go.opentelemetry.io/proto/otlp/metrics/v1\xaa\x02\x1eOpenTelemetry.Proto.Metrics.V1b\x06proto3"
12
12
 
13
- pool = Google::Protobuf::DescriptorPool.generated_pool
13
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
14
14
  pool.add_serialized_file(descriptor_data)
15
15
 
16
16
  module Opentelemetry
@@ -8,28 +8,29 @@ require 'opentelemetry/proto/common/v1/common_pb'
8
8
  require 'opentelemetry/proto/resource/v1/resource_pb'
9
9
 
10
10
 
11
- descriptor_data = "\n9opentelemetry/proto/profiles/v1development/profiles.proto\x12*opentelemetry.proto.profiles.v1development\x1a*opentelemetry/proto/common/v1/common.proto\x1a.opentelemetry/proto/resource/v1/resource.proto\"g\n\x0cProfilesData\x12W\n\x11resource_profiles\x18\x01 \x03(\x0b\x32<.opentelemetry.proto.profiles.v1development.ResourceProfiles\"\xbe\x01\n\x10ResourceProfiles\x12;\n\x08resource\x18\x01 \x01(\x0b\x32).opentelemetry.proto.resource.v1.Resource\x12Q\n\x0escope_profiles\x18\x02 \x03(\x0b\x32\x39.opentelemetry.proto.profiles.v1development.ScopeProfiles\x12\x12\n\nschema_url\x18\x03 \x01(\tJ\x06\x08\xe8\x07\x10\xe9\x07\"\xae\x01\n\rScopeProfiles\x12\x42\n\x05scope\x18\x01 \x01(\x0b\x32\x33.opentelemetry.proto.common.v1.InstrumentationScope\x12\x45\n\x08profiles\x18\x02 \x03(\x0b\x32\x33.opentelemetry.proto.profiles.v1development.Profile\x12\x12\n\nschema_url\x18\x03 \x01(\t\"\xe0\x07\n\x07Profile\x12J\n\x0bsample_type\x18\x01 \x03(\x0b\x32\x35.opentelemetry.proto.profiles.v1development.ValueType\x12\x42\n\x06sample\x18\x02 \x03(\x0b\x32\x32.opentelemetry.proto.profiles.v1development.Sample\x12J\n\rmapping_table\x18\x03 \x03(\x0b\x32\x33.opentelemetry.proto.profiles.v1development.Mapping\x12L\n\x0elocation_table\x18\x04 \x03(\x0b\x32\x34.opentelemetry.proto.profiles.v1development.Location\x12\x18\n\x10location_indices\x18\x05 \x03(\x05\x12L\n\x0e\x66unction_table\x18\x06 \x03(\x0b\x32\x34.opentelemetry.proto.profiles.v1development.Function\x12@\n\x0f\x61ttribute_table\x18\x07 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12R\n\x0f\x61ttribute_units\x18\x08 \x03(\x0b\x32\x39.opentelemetry.proto.profiles.v1development.AttributeUnit\x12\x44\n\nlink_table\x18\t \x03(\x0b\x32\x30.opentelemetry.proto.profiles.v1development.Link\x12\x14\n\x0cstring_table\x18\n \x03(\t\x12\x12\n\ntime_nanos\x18\x0b \x01(\x03\x12\x16\n\x0e\x64uration_nanos\x18\x0c \x01(\x03\x12J\n\x0bperiod_type\x18\r \x01(\x0b\x32\x35.opentelemetry.proto.profiles.v1development.ValueType\x12\x0e\n\x06period\x18\x0e \x01(\x03\x12\x1a\n\x12\x63omment_strindices\x18\x0f \x03(\x05\x12!\n\x19\x64\x65\x66\x61ult_sample_type_index\x18\x10 \x01(\x05\x12\x12\n\nprofile_id\x18\x11 \x01(\x0c\x12 \n\x18\x64ropped_attributes_count\x18\x13 \x01(\r\x12\x1f\n\x17original_payload_format\x18\x14 \x01(\t\x12\x18\n\x10original_payload\x18\x15 \x01(\x0c\x12\x19\n\x11\x61ttribute_indices\x18\x16 \x03(\x05\"F\n\rAttributeUnit\x12\x1e\n\x16\x61ttribute_key_strindex\x18\x01 \x01(\x05\x12\x15\n\runit_strindex\x18\x02 \x01(\x05\")\n\x04Link\x12\x10\n\x08trace_id\x18\x01 \x01(\x0c\x12\x0f\n\x07span_id\x18\x02 \x01(\x0c\"\x9e\x01\n\tValueType\x12\x15\n\rtype_strindex\x18\x01 \x01(\x05\x12\x15\n\runit_strindex\x18\x02 \x01(\x05\x12\x63\n\x17\x61ggregation_temporality\x18\x03 \x01(\x0e\x32\x42.opentelemetry.proto.profiles.v1development.AggregationTemporality\"\xb1\x01\n\x06Sample\x12\x1d\n\x15locations_start_index\x18\x01 \x01(\x05\x12\x18\n\x10locations_length\x18\x02 \x01(\x05\x12\r\n\x05value\x18\x03 \x03(\x03\x12\x19\n\x11\x61ttribute_indices\x18\x04 \x03(\x05\x12\x17\n\nlink_index\x18\x05 \x01(\x05H\x00\x88\x01\x01\x12\x1c\n\x14timestamps_unix_nano\x18\x06 \x03(\x04\x42\r\n\x0b_link_index\"\xe3\x01\n\x07Mapping\x12\x14\n\x0cmemory_start\x18\x01 \x01(\x04\x12\x14\n\x0cmemory_limit\x18\x02 \x01(\x04\x12\x13\n\x0b\x66ile_offset\x18\x03 \x01(\x04\x12\x19\n\x11\x66ilename_strindex\x18\x04 \x01(\x05\x12\x19\n\x11\x61ttribute_indices\x18\x05 \x03(\x05\x12\x15\n\rhas_functions\x18\x06 \x01(\x08\x12\x15\n\rhas_filenames\x18\x07 \x01(\x08\x12\x18\n\x10has_line_numbers\x18\x08 \x01(\x08\x12\x19\n\x11has_inline_frames\x18\t \x01(\x08\"\xb7\x01\n\x08Location\x12\x1a\n\rmapping_index\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\x04\x12>\n\x04line\x18\x03 \x03(\x0b\x32\x30.opentelemetry.proto.profiles.v1development.Line\x12\x11\n\tis_folded\x18\x04 \x01(\x08\x12\x19\n\x11\x61ttribute_indices\x18\x05 \x03(\x05\x42\x10\n\x0e_mapping_index\"<\n\x04Line\x12\x16\n\x0e\x66unction_index\x18\x01 \x01(\x05\x12\x0c\n\x04line\x18\x02 \x01(\x03\x12\x0e\n\x06\x63olumn\x18\x03 \x01(\x03\"n\n\x08\x46unction\x12\x15\n\rname_strindex\x18\x01 \x01(\x05\x12\x1c\n\x14system_name_strindex\x18\x02 \x01(\x05\x12\x19\n\x11\x66ilename_strindex\x18\x03 \x01(\x05\x12\x12\n\nstart_line\x18\x04 \x01(\x03*\x8c\x01\n\x16\x41ggregationTemporality\x12\'\n#AGGREGATION_TEMPORALITY_UNSPECIFIED\x10\x00\x12!\n\x1d\x41GGREGATION_TEMPORALITY_DELTA\x10\x01\x12&\n\"AGGREGATION_TEMPORALITY_CUMULATIVE\x10\x02\x42\xa4\x01\n-io.opentelemetry.proto.profiles.v1developmentB\rProfilesProtoP\x01Z5go.opentelemetry.io/proto/otlp/profiles/v1development\xaa\x02*OpenTelemetry.Proto.Profiles.V1Developmentb\x06proto3"
11
+ descriptor_data = "\n9opentelemetry/proto/profiles/v1development/profiles.proto\x12*opentelemetry.proto.profiles.v1development\x1a*opentelemetry/proto/common/v1/common.proto\x1a.opentelemetry/proto/resource/v1/resource.proto\"\xf6\x03\n\x12ProfilesDictionary\x12J\n\rmapping_table\x18\x01 \x03(\x0b\x32\x33.opentelemetry.proto.profiles.v1development.Mapping\x12L\n\x0elocation_table\x18\x02 \x03(\x0b\x32\x34.opentelemetry.proto.profiles.v1development.Location\x12L\n\x0e\x66unction_table\x18\x03 \x03(\x0b\x32\x34.opentelemetry.proto.profiles.v1development.Function\x12\x44\n\nlink_table\x18\x04 \x03(\x0b\x32\x30.opentelemetry.proto.profiles.v1development.Link\x12\x14\n\x0cstring_table\x18\x05 \x03(\t\x12T\n\x0f\x61ttribute_table\x18\x06 \x03(\x0b\x32;.opentelemetry.proto.profiles.v1development.KeyValueAndUnit\x12\x46\n\x0bstack_table\x18\x07 \x03(\x0b\x32\x31.opentelemetry.proto.profiles.v1development.Stack\"\xbb\x01\n\x0cProfilesData\x12W\n\x11resource_profiles\x18\x01 \x03(\x0b\x32<.opentelemetry.proto.profiles.v1development.ResourceProfiles\x12R\n\ndictionary\x18\x02 \x01(\x0b\x32>.opentelemetry.proto.profiles.v1development.ProfilesDictionary\"\xbe\x01\n\x10ResourceProfiles\x12;\n\x08resource\x18\x01 \x01(\x0b\x32).opentelemetry.proto.resource.v1.Resource\x12Q\n\x0escope_profiles\x18\x02 \x03(\x0b\x32\x39.opentelemetry.proto.profiles.v1development.ScopeProfiles\x12\x12\n\nschema_url\x18\x03 \x01(\tJ\x06\x08\xe8\x07\x10\xe9\x07\"\xae\x01\n\rScopeProfiles\x12\x42\n\x05scope\x18\x01 \x01(\x0b\x32\x33.opentelemetry.proto.common.v1.InstrumentationScope\x12\x45\n\x08profiles\x18\x02 \x03(\x0b\x32\x33.opentelemetry.proto.profiles.v1development.Profile\x12\x12\n\nschema_url\x18\x03 \x01(\t\"\xb1\x03\n\x07Profile\x12J\n\x0bsample_type\x18\x01 \x01(\x0b\x32\x35.opentelemetry.proto.profiles.v1development.ValueType\x12\x43\n\x07samples\x18\x02 \x03(\x0b\x32\x32.opentelemetry.proto.profiles.v1development.Sample\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\x15\n\rduration_nano\x18\x04 \x01(\x04\x12J\n\x0bperiod_type\x18\x05 \x01(\x0b\x32\x35.opentelemetry.proto.profiles.v1development.ValueType\x12\x0e\n\x06period\x18\x06 \x01(\x03\x12\x12\n\nprofile_id\x18\x07 \x01(\x0c\x12 \n\x18\x64ropped_attributes_count\x18\x08 \x01(\r\x12\x1f\n\x17original_payload_format\x18\t \x01(\t\x12\x18\n\x10original_payload\x18\n \x01(\x0c\x12\x19\n\x11\x61ttribute_indices\x18\x0b \x03(\x05\")\n\x04Link\x12\x10\n\x08trace_id\x18\x01 \x01(\x0c\x12\x0f\n\x07span_id\x18\x02 \x01(\x0c\"9\n\tValueType\x12\x15\n\rtype_strindex\x18\x01 \x01(\x05\x12\x15\n\runit_strindex\x18\x02 \x01(\x05\"z\n\x06Sample\x12\x13\n\x0bstack_index\x18\x01 \x01(\x05\x12\x0e\n\x06values\x18\x02 \x03(\x03\x12\x19\n\x11\x61ttribute_indices\x18\x03 \x03(\x05\x12\x12\n\nlink_index\x18\x04 \x01(\x05\x12\x1c\n\x14timestamps_unix_nano\x18\x05 \x03(\x06\"\x80\x01\n\x07Mapping\x12\x14\n\x0cmemory_start\x18\x01 \x01(\x04\x12\x14\n\x0cmemory_limit\x18\x02 \x01(\x04\x12\x13\n\x0b\x66ile_offset\x18\x03 \x01(\x04\x12\x19\n\x11\x66ilename_strindex\x18\x04 \x01(\x05\x12\x19\n\x11\x61ttribute_indices\x18\x05 \x03(\x05\"!\n\x05Stack\x12\x18\n\x10location_indices\x18\x01 \x03(\x05\"\x8e\x01\n\x08Location\x12\x15\n\rmapping_index\x18\x01 \x01(\x05\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\x04\x12?\n\x05lines\x18\x03 \x03(\x0b\x32\x30.opentelemetry.proto.profiles.v1development.Line\x12\x19\n\x11\x61ttribute_indices\x18\x04 \x03(\x05\"<\n\x04Line\x12\x16\n\x0e\x66unction_index\x18\x01 \x01(\x05\x12\x0c\n\x04line\x18\x02 \x01(\x03\x12\x0e\n\x06\x63olumn\x18\x03 \x01(\x03\"n\n\x08\x46unction\x12\x15\n\rname_strindex\x18\x01 \x01(\x05\x12\x1c\n\x14system_name_strindex\x18\x02 \x01(\x05\x12\x19\n\x11\x66ilename_strindex\x18\x03 \x01(\x05\x12\x12\n\nstart_line\x18\x04 \x01(\x03\"v\n\x0fKeyValueAndUnit\x12\x14\n\x0ckey_strindex\x18\x01 \x01(\x05\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.opentelemetry.proto.common.v1.AnyValue\x12\x15\n\runit_strindex\x18\x03 \x01(\x05\x42\xa4\x01\n-io.opentelemetry.proto.profiles.v1developmentB\rProfilesProtoP\x01Z5go.opentelemetry.io/proto/otlp/profiles/v1development\xaa\x02*OpenTelemetry.Proto.Profiles.V1Developmentb\x06proto3"
12
12
 
13
- pool = Google::Protobuf::DescriptorPool.generated_pool
13
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
14
14
  pool.add_serialized_file(descriptor_data)
15
15
 
16
16
  module Opentelemetry
17
17
  module Proto
18
18
  module Profiles
19
19
  module V1development
20
+ ProfilesDictionary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("opentelemetry.proto.profiles.v1development.ProfilesDictionary").msgclass
20
21
  ProfilesData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("opentelemetry.proto.profiles.v1development.ProfilesData").msgclass
21
22
  ResourceProfiles = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("opentelemetry.proto.profiles.v1development.ResourceProfiles").msgclass
22
23
  ScopeProfiles = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("opentelemetry.proto.profiles.v1development.ScopeProfiles").msgclass
23
24
  Profile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("opentelemetry.proto.profiles.v1development.Profile").msgclass
24
- AttributeUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("opentelemetry.proto.profiles.v1development.AttributeUnit").msgclass
25
25
  Link = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("opentelemetry.proto.profiles.v1development.Link").msgclass
26
26
  ValueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("opentelemetry.proto.profiles.v1development.ValueType").msgclass
27
27
  Sample = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("opentelemetry.proto.profiles.v1development.Sample").msgclass
28
28
  Mapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("opentelemetry.proto.profiles.v1development.Mapping").msgclass
29
+ Stack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("opentelemetry.proto.profiles.v1development.Stack").msgclass
29
30
  Location = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("opentelemetry.proto.profiles.v1development.Location").msgclass
30
31
  Line = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("opentelemetry.proto.profiles.v1development.Line").msgclass
31
32
  Function = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("opentelemetry.proto.profiles.v1development.Function").msgclass
32
- AggregationTemporality = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("opentelemetry.proto.profiles.v1development.AggregationTemporality").enummodule
33
+ KeyValueAndUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("opentelemetry.proto.profiles.v1development.KeyValueAndUnit").msgclass
33
34
  end
34
35
  end
35
36
  end
@@ -9,7 +9,7 @@ require 'opentelemetry/proto/common/v1/common_pb'
9
9
 
10
10
  descriptor_data = "\n.opentelemetry/proto/resource/v1/resource.proto\x12\x1fopentelemetry.proto.resource.v1\x1a*opentelemetry/proto/common/v1/common.proto\"\xa8\x01\n\x08Resource\x12;\n\nattributes\x18\x01 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12 \n\x18\x64ropped_attributes_count\x18\x02 \x01(\r\x12=\n\x0b\x65ntity_refs\x18\x03 \x03(\x0b\x32(.opentelemetry.proto.common.v1.EntityRefB\x83\x01\n\"io.opentelemetry.proto.resource.v1B\rResourceProtoP\x01Z*go.opentelemetry.io/proto/otlp/resource/v1\xaa\x02\x1fOpenTelemetry.Proto.Resource.V1b\x06proto3"
11
11
 
12
- pool = Google::Protobuf::DescriptorPool.generated_pool
12
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
13
13
  pool.add_serialized_file(descriptor_data)
14
14
 
15
15
  module Opentelemetry
@@ -10,7 +10,7 @@ require 'opentelemetry/proto/resource/v1/resource_pb'
10
10
 
11
11
  descriptor_data = "\n(opentelemetry/proto/trace/v1/trace.proto\x12\x1copentelemetry.proto.trace.v1\x1a*opentelemetry/proto/common/v1/common.proto\x1a.opentelemetry/proto/resource/v1/resource.proto\"Q\n\nTracesData\x12\x43\n\x0eresource_spans\x18\x01 \x03(\x0b\x32+.opentelemetry.proto.trace.v1.ResourceSpans\"\xa7\x01\n\rResourceSpans\x12;\n\x08resource\x18\x01 \x01(\x0b\x32).opentelemetry.proto.resource.v1.Resource\x12=\n\x0bscope_spans\x18\x02 \x03(\x0b\x32(.opentelemetry.proto.trace.v1.ScopeSpans\x12\x12\n\nschema_url\x18\x03 \x01(\tJ\x06\x08\xe8\x07\x10\xe9\x07\"\x97\x01\n\nScopeSpans\x12\x42\n\x05scope\x18\x01 \x01(\x0b\x32\x33.opentelemetry.proto.common.v1.InstrumentationScope\x12\x31\n\x05spans\x18\x02 \x03(\x0b\x32\".opentelemetry.proto.trace.v1.Span\x12\x12\n\nschema_url\x18\x03 \x01(\t\"\x84\x08\n\x04Span\x12\x10\n\x08trace_id\x18\x01 \x01(\x0c\x12\x0f\n\x07span_id\x18\x02 \x01(\x0c\x12\x13\n\x0btrace_state\x18\x03 \x01(\t\x12\x16\n\x0eparent_span_id\x18\x04 \x01(\x0c\x12\r\n\x05\x66lags\x18\x10 \x01(\x07\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x39\n\x04kind\x18\x06 \x01(\x0e\x32+.opentelemetry.proto.trace.v1.Span.SpanKind\x12\x1c\n\x14start_time_unix_nano\x18\x07 \x01(\x06\x12\x1a\n\x12\x65nd_time_unix_nano\x18\x08 \x01(\x06\x12;\n\nattributes\x18\t \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12 \n\x18\x64ropped_attributes_count\x18\n \x01(\r\x12\x38\n\x06\x65vents\x18\x0b \x03(\x0b\x32(.opentelemetry.proto.trace.v1.Span.Event\x12\x1c\n\x14\x64ropped_events_count\x18\x0c \x01(\r\x12\x36\n\x05links\x18\r \x03(\x0b\x32\'.opentelemetry.proto.trace.v1.Span.Link\x12\x1b\n\x13\x64ropped_links_count\x18\x0e \x01(\r\x12\x34\n\x06status\x18\x0f \x01(\x0b\x32$.opentelemetry.proto.trace.v1.Status\x1a\x8c\x01\n\x05\x45vent\x12\x16\n\x0etime_unix_nano\x18\x01 \x01(\x06\x12\x0c\n\x04name\x18\x02 \x01(\t\x12;\n\nattributes\x18\x03 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12 \n\x18\x64ropped_attributes_count\x18\x04 \x01(\r\x1a\xac\x01\n\x04Link\x12\x10\n\x08trace_id\x18\x01 \x01(\x0c\x12\x0f\n\x07span_id\x18\x02 \x01(\x0c\x12\x13\n\x0btrace_state\x18\x03 \x01(\t\x12;\n\nattributes\x18\x04 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12 \n\x18\x64ropped_attributes_count\x18\x05 \x01(\r\x12\r\n\x05\x66lags\x18\x06 \x01(\x07\"\x99\x01\n\x08SpanKind\x12\x19\n\x15SPAN_KIND_UNSPECIFIED\x10\x00\x12\x16\n\x12SPAN_KIND_INTERNAL\x10\x01\x12\x14\n\x10SPAN_KIND_SERVER\x10\x02\x12\x14\n\x10SPAN_KIND_CLIENT\x10\x03\x12\x16\n\x12SPAN_KIND_PRODUCER\x10\x04\x12\x16\n\x12SPAN_KIND_CONSUMER\x10\x05\"\xae\x01\n\x06Status\x12\x0f\n\x07message\x18\x02 \x01(\t\x12=\n\x04\x63ode\x18\x03 \x01(\x0e\x32/.opentelemetry.proto.trace.v1.Status.StatusCode\"N\n\nStatusCode\x12\x15\n\x11STATUS_CODE_UNSET\x10\x00\x12\x12\n\x0eSTATUS_CODE_OK\x10\x01\x12\x15\n\x11STATUS_CODE_ERROR\x10\x02J\x04\x08\x01\x10\x02*\x9c\x01\n\tSpanFlags\x12\x19\n\x15SPAN_FLAGS_DO_NOT_USE\x10\x00\x12 \n\x1bSPAN_FLAGS_TRACE_FLAGS_MASK\x10\xff\x01\x12*\n%SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK\x10\x80\x02\x12&\n!SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK\x10\x80\x04\x42w\n\x1fio.opentelemetry.proto.trace.v1B\nTraceProtoP\x01Z\'go.opentelemetry.io/proto/otlp/trace/v1\xaa\x02\x1cOpenTelemetry.Proto.Trace.V1b\x06proto3"
12
12
 
13
- pool = Google::Protobuf::DescriptorPool.generated_pool
13
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
14
14
  pool.add_serialized_file(descriptor_data)
15
15
 
16
16
  module Opentelemetry
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-opentelemetry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shizuo Fujita
@@ -51,6 +51,20 @@ dependencies:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '1.18'
54
+ - !ruby/object:Gem::Dependency
55
+ name: get_process_mem
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '1.0'
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '1.0'
54
68
  - !ruby/object:Gem::Dependency
55
69
  name: google-protobuf
56
70
  requirement: !ruby/object:Gem::Requirement
@@ -65,6 +79,20 @@ dependencies:
65
79
  - - "~>"
66
80
  - !ruby/object:Gem::Version
67
81
  version: '4.30'
82
+ - !ruby/object:Gem::Dependency
83
+ name: sys-proctable
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '1.3'
89
+ type: :runtime
90
+ prerelease: false
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '1.3'
68
96
  description: Fluentd input/output plugin to forward OpenTelemetry Protocol data.
69
97
  email:
70
98
  - fujita@clear-code.com
@@ -125,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
153
  - !ruby/object:Gem::Version
126
154
  version: '0'
127
155
  requirements: []
128
- rubygems_version: 3.7.2
156
+ rubygems_version: 4.0.4
129
157
  specification_version: 4
130
158
  summary: Fluentd input/output plugin to forward OpenTelemetry Protocol data.
131
159
  test_files: []