opentelemetry-metrics-api 0.3.0 → 0.4.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: 243304e37087fc9b247c1002b0b16280c65052ce9886bc23fd6fc456c2993392
4
- data.tar.gz: ce47ebaa502b7d056035cd7340b283abd0b91fd4ff15ef2ed156e3c15351421b
3
+ metadata.gz: 11ca6c01c75f4b661a2b67e40f24312889533c36575170671a7977625a4fb2cb
4
+ data.tar.gz: 794dd2e1e001e012a4c398d136e9738a598d860970d1f172ba4baa52758f0b70
5
5
  SHA512:
6
- metadata.gz: 94d194537e4b294d47e36a6228ac6772fcb3d1e512b9676403c8ef343e93e9bfa62e3514a37633763378f161211690c33f9dd44ddae91d2882503c09168ca031
7
- data.tar.gz: f8eecd9fdac206a6318533664cbfdff2169e561f154fc86f9587f112f3ce3b39006861a87611ffc74dad1f93e40f1d0078e9c433ac3df29fc79db9e90cc43fd1
6
+ metadata.gz: 674ba34d11d3d8e152bbd0d59317e03ec4b984db8541d7a6c15e7d375f9707e89f912be1ed5ce427ac14234d18fa25f7260df0dbb138d6bd192cc46faad17fce
7
+ data.tar.gz: 352b08c237d6fe34f344130a6c414a092c4d7091f4e675f03e46ceb35a8e9910f258fd7ff328b29fc7fff99e9602c125c429b13a7adc3876afd6d856964ff51b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Release History: opentelemetry-metrics-api
2
2
 
3
+ ### v0.4.0 / 2025-08-14
4
+
5
+ - ADDED: Support asynchronous instruments: ObservableGauge, ObservableCounter and ObservableUpDownCounter
6
+ - FIXED: Update max instrument name length from 63 to 255 characters and allow `/` in instrument names
7
+
3
8
  ### v0.3.0 / 2025-02-25
4
9
 
5
10
  - ADDED: Support 3.1 Min Version
@@ -9,7 +9,14 @@ module OpenTelemetry
9
9
  module Instrument
10
10
  # No-op implementation of ObservableCounter.
11
11
  class ObservableCounter
12
- # TODO
12
+ # Observe the ObservableCounter with fixed timeout duration.
13
+ #
14
+ # @param [int] timeout The timeout duration for callback to run, which MUST be a non-negative numeric value.
15
+ # @param [Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}] attributes
16
+ # Values must be non-nil and (array of) string, boolean or numeric type.
17
+ # Array values must not contain nil elements and all elements must be of
18
+ # the same basic type (string, numeric, boolean).
19
+ def observe(timeout: nil, attributes: {}); end
13
20
  end
14
21
  end
15
22
  end
@@ -9,7 +9,14 @@ module OpenTelemetry
9
9
  module Instrument
10
10
  # No-op implementation of ObservableGauge.
11
11
  class ObservableGauge
12
- # TODO
12
+ # Observe the ObservableGauge with fixed timeout duration.
13
+ #
14
+ # @param [int] timeout The timeout duration for callback to run, which MUST be a non-negative numeric value.
15
+ # @param [Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}] attributes
16
+ # Values must be non-nil and (array of) string, boolean or numeric type.
17
+ # Array values must not contain nil elements and all elements must be of
18
+ # the same basic type (string, numeric, boolean).
19
+ def observe(timeout: nil, attributes: {}); end
13
20
  end
14
21
  end
15
22
  end
@@ -9,7 +9,14 @@ module OpenTelemetry
9
9
  module Instrument
10
10
  # No-op implementation of ObservableUpDownCounter.
11
11
  class ObservableUpDownCounter
12
- # TODO
12
+ # Observe the ObservableUpDownCounter with fixed timeout duration.
13
+ #
14
+ # @param [int] timeout The timeout duration for callback to run, which MUST be a non-negative numeric value.
15
+ # @param [Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}] attributes
16
+ # Values must be non-nil and (array of) string, boolean or numeric type.
17
+ # Array values must not contain nil elements and all elements must be of
18
+ # the same basic type (string, numeric, boolean).
19
+ def observe(timeout: nil, attributes: {}); end
13
20
  end
14
21
  end
15
22
  end
@@ -16,7 +16,7 @@ module OpenTelemetry
16
16
  UP_DOWN_COUNTER = Instrument::UpDownCounter.new
17
17
  OBSERVABLE_UP_DOWN_COUNTER = Instrument::ObservableUpDownCounter.new
18
18
 
19
- NAME_REGEX = /\A[a-zA-Z][-.\w]{0,62}\z/
19
+ NAME_REGEX = %r{\A[a-zA-Z][-./\w]{0,254}\z}
20
20
 
21
21
  private_constant(:COUNTER, :OBSERVABLE_COUNTER, :HISTOGRAM, :GAUGE, :OBSERVABLE_GAUGE, :UP_DOWN_COUNTER, :OBSERVABLE_UP_DOWN_COUNTER)
22
22
 
@@ -7,6 +7,6 @@
7
7
  module OpenTelemetry
8
8
  module Metrics
9
9
  ## Current OpenTelemetry metrics version
10
- VERSION = '0.3.0'
10
+ VERSION = '0.4.0'
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-metrics-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-25 00:00:00.000000000 Z
11
+ date: 2025-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -196,10 +196,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
196
196
  licenses:
197
197
  - Apache-2.0
198
198
  metadata:
199
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-metrics-api/v0.3.0/file.CHANGELOG.html
199
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-metrics-api/v0.4.0/file.CHANGELOG.html
200
200
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/metrics_api
201
201
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
202
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-metrics-api/v0.3.0
202
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-metrics-api/v0.4.0
203
203
  post_install_message:
204
204
  rdoc_options: []
205
205
  require_paths: