highlight_io 0.1.4 → 0.2.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: '097aa8d0420fe1617bba3f9bc5358b4f4a4b33fc86c9100add607f0000a21a31'
4
- data.tar.gz: 9c2a3730d42efa5fe5fe7b2406d6e74b660cde344a72842845834f998ccdfc6d
3
+ metadata.gz: 2c1f3848acbf7cf77d05ac8ef6218eb1fb15f094665a6f0547995e4a4f4d6b06
4
+ data.tar.gz: 03420b8ba7f5f6b1c2a452a3fef8f7d48d24f3e7f038f9ee9b6f3de456016c15
5
5
  SHA512:
6
- metadata.gz: 8d8a6b916b6ae7dee9a47c86e8ffba1da90c60b2ccdf12ca44b768f7e6022189377688ec24fa7efdef5defe78b3ee706dff681e447a41e0b082f7c2f182d5b0d
7
- data.tar.gz: '00832a7b4bdad74f86c8d488705eb5f979c2bd05d94ca963afed72fd5d86377e8890630ecb137f5605f3bf16a0b0c7090280ece588378ba0022bff8adc5e2944'
6
+ metadata.gz: 2420cb4092f937c7427f10e0c674b131a81cb5ea0ad33f68376493d67e6ef40129b0273adac416ec2b65fd31d15230a9887bd52e9c8b01b9c326eb05a3999e4d
7
+ data.tar.gz: 96fa150775802c742301a7242b2146024c616215a696b62dd2f6094d1451f2b8e9b72bd816f4a520ce9f1e6d239edb8336ababe1b995c3e92db9787071a627f2
data/CHANGELOG.md CHANGED
@@ -6,3 +6,8 @@
6
6
 
7
7
  - Tune settings of opentelemetry SDK to reduce memory usage.
8
8
  - Enable GZIP compression of exported data.
9
+
10
+ ## 0.2.0
11
+
12
+ - Support setting `environment` attribute to SDK initialization.
13
+ - `otlp_endpoint` updated to keyword parameter when initializing.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- highlight_io (0.1.4)
4
+ highlight_io (0.2.0)
5
5
  grpc (~> 1.52)
6
6
  opentelemetry-exporter-otlp (~> 0.24.0)
7
7
  opentelemetry-instrumentation-all (~> 0.32.0)
@@ -12,10 +12,10 @@ GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
14
  ast (2.4.2)
15
- google-protobuf (3.23.4-x86_64-linux)
15
+ google-protobuf (3.23.4)
16
16
  googleapis-common-protos-types (1.8.0)
17
17
  google-protobuf (~> 3.18)
18
- grpc (1.57.0-x86_64-linux)
18
+ grpc (1.57.0)
19
19
  google-protobuf (~> 3.23)
20
20
  googleapis-common-protos-types (~> 1.0)
21
21
  json (2.6.3)
@@ -231,7 +231,7 @@ GEM
231
231
  unicode-display_width (2.4.2)
232
232
 
233
233
  PLATFORMS
234
- x86_64-linux
234
+ ruby
235
235
 
236
236
  DEPENDENCIES
237
237
  highlight_io!
@@ -240,4 +240,4 @@ DEPENDENCIES
240
240
  rubocop
241
241
 
242
242
  BUNDLED WITH
243
- 2.4.19
243
+ 2.4.22
@@ -1,3 +1,3 @@
1
1
  module Highlight
2
- VERSION = '0.1.4'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
data/lib/highlight.rb CHANGED
@@ -22,7 +22,7 @@ module Highlight
22
22
  @@instance
23
23
  end
24
24
 
25
- def initialize(project_id, otlp_endpoint = OTLP_HTTP)
25
+ def initialize(project_id, environment: '', otlp_endpoint: OTLP_HTTP)
26
26
  @@instance = self # rubocop:disable Style/ClassVars
27
27
 
28
28
  @project_id = project_id
@@ -34,6 +34,11 @@ module Highlight
34
34
  endpoint: "#{@otlp_endpoint}/v1/traces", compression: 'gzip'
35
35
  ), schedule_delay: 1000, max_export_batch_size: 128, max_queue_size: 1024
36
36
  ))
37
+
38
+ c.resource = OpenTelemetry::SDK::Resources::Resource.create(
39
+ OpenTelemetry::SemanticConventions::Resource::DEPLOYMENT_ENVIRONMENT => environment
40
+ )
41
+
37
42
  yield c if block_given?
38
43
  end
39
44
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: highlight_io
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Highlight
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-20 00:00:00.000000000 Z
11
+ date: 2023-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc