opentelemetry-exporter-otlp-metrics 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4900aee75f04656632debac8b989868fb24fc1097ab8dd30d50216143496cbba
4
- data.tar.gz: bc29bb3e4bb368ee6eb3b8aed510d5af2361da1103e7c2d524ddbe2a24e4c601
3
+ metadata.gz: 0a8ea0bca83154e2f0fe67946261aa53d4a05986676407efe116509807020072
4
+ data.tar.gz: 52032cdacbf570403d404d25383bc420226191f5687acb81038e03991d80ecee
5
5
  SHA512:
6
- metadata.gz: b7d1227d845b3cc78f8528e712e99cbeb5ca42a610df51bd9a8de00f4e25dc4d5b4289dffd1edfe8da956c34ac46bf152f65999acdffa03343b2f95ef7c6c69e
7
- data.tar.gz: 1de7c79780328fd7fd48ba000f60e9dd8a2e0eca7ba02fe73bc1fc7b6a56ffff82aa08fa8ad5b2dfd498d86d41a89c55b299c572463827b7528614e7cbd24f41
6
+ metadata.gz: 484c7d08aec25fbac061986edce3bc6656b6a101194d688afb8e77aac53a5076fdf719ea0483e6cd95f67a70db9d863bdb0bee11554cf16d5087e1b9fc5f2574
7
+ data.tar.gz: 2782e920c05e9fd60953a0193bf4d979c5b87c65ae43abc1c53dafb3ab652e8fa5b7eee26fa5c8f539116d02657b1d0525b866b97fd1b962b41f1089a53c7343
data/CHANGELOG.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # Release History: opentelemetry-exporter-otlp-metrics
2
2
 
3
- ### v0.2.0 / 2024-11-19
3
+ ### v0.3.0 / 2025-01-08
4
+
5
+ * ADDED: Gauge metrics exporter encoding
6
+
7
+ ### v0.2.1 / 2024-12-04
8
+
9
+ * FIXED: Handle float value in NumberDataPoint
10
+
11
+ ### v0.2.0 / 2024-11-20
4
12
 
5
13
  * ADDED: Add basic metrics view
6
14
  * FIXED: Remove Metrics OTLP exporter `Util#measure_request_duration` and duplicate files
@@ -214,18 +214,17 @@ module OpenTelemetry
214
214
  end
215
215
 
216
216
  # metrics_pb has following type of data: :gauge, :sum, :histogram, :exponential_histogram, :summary
217
- # current metric sdk only implements instrument: :counter -> :sum, :histogram -> :histogram
217
+ # current metric sdk only implements instrument: :counter -> :sum, :histogram -> :histogram, :gauge -> :gauge
218
218
  #
219
219
  # metrics [MetricData]
220
220
  def as_otlp_metrics(metrics)
221
221
  case metrics.instrument_kind
222
- when :observable_gauge
222
+ when :observable_gauge, :gauge
223
223
  Opentelemetry::Proto::Metrics::V1::Metric.new(
224
224
  name: metrics.name,
225
225
  description: metrics.description,
226
226
  unit: metrics.unit,
227
227
  gauge: Opentelemetry::Proto::Metrics::V1::Gauge.new(
228
- aggregation_temporality: as_otlp_aggregation_temporality(metrics.aggregation_temporality),
229
228
  data_points: metrics.data_points.map do |ndp|
230
229
  number_data_point(ndp)
231
230
  end
@@ -284,13 +283,20 @@ module OpenTelemetry
284
283
  end
285
284
 
286
285
  def number_data_point(ndp)
287
- Opentelemetry::Proto::Metrics::V1::NumberDataPoint.new(
286
+ args = {
288
287
  attributes: ndp.attributes.map { |k, v| as_otlp_key_value(k, v) },
289
- as_int: ndp.value,
290
288
  start_time_unix_nano: ndp.start_time_unix_nano,
291
289
  time_unix_nano: ndp.time_unix_nano,
292
290
  exemplars: ndp.exemplars # exemplars not implemented yet from metrics sdk
293
- )
291
+ }
292
+
293
+ if ndp.value.is_a?(Float)
294
+ args[:as_double] = ndp.value
295
+ else
296
+ args[:as_int] = ndp.value
297
+ end
298
+
299
+ Opentelemetry::Proto::Metrics::V1::NumberDataPoint.new(**args)
294
300
  end
295
301
 
296
302
  # may not need this
@@ -9,7 +9,7 @@ module OpenTelemetry
9
9
  module OTLP
10
10
  module Metrics
11
11
  ## Current OpenTelemetry OTLP exporter version
12
- VERSION = '0.2.0'
12
+ VERSION = '0.3.0'
13
13
  end
14
14
  end
15
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-exporter-otlp-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-20 00:00:00.000000000 Z
11
+ date: 2025-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: googleapis-common-protos-types
@@ -78,28 +78,28 @@ dependencies:
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.1'
81
+ version: '0.2'
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '0.1'
88
+ version: '0.2'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: opentelemetry-metrics-sdk
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '0.2'
95
+ version: '0.5'
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '0.2'
102
+ version: '0.5'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: opentelemetry-sdk
105
105
  requirement: !ruby/object:Gem::Requirement
@@ -324,11 +324,11 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
324
324
  licenses:
325
325
  - Apache-2.0
326
326
  metadata:
327
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp-metrics/v0.2.0/file.CHANGELOG.html
327
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp-metrics/v0.3.0/file.CHANGELOG.html
328
328
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/exporter/otlp-metrics
329
329
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
330
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp-metrics/v0.2.0
331
- post_install_message:
330
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp-metrics/v0.3.0
331
+ post_install_message:
332
332
  rdoc_options: []
333
333
  require_paths:
334
334
  - lib
@@ -344,7 +344,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
344
344
  version: '0'
345
345
  requirements: []
346
346
  rubygems_version: 3.2.33
347
- signing_key:
347
+ signing_key:
348
348
  specification_version: 4
349
349
  summary: OTLP metrics exporter for the OpenTelemetry framework
350
350
  test_files: []