highlight_io 0.1.3 → 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: 0754bd5234409590b25053645a3645641bc25e6ff10f1b12fdedde96ad1036f8
4
- data.tar.gz: a40001ec81b927edbddf710f0299cd1371058df4a7252c5e8d82e8fa98f4dbc2
3
+ metadata.gz: 2c1f3848acbf7cf77d05ac8ef6218eb1fb15f094665a6f0547995e4a4f4d6b06
4
+ data.tar.gz: 03420b8ba7f5f6b1c2a452a3fef8f7d48d24f3e7f038f9ee9b6f3de456016c15
5
5
  SHA512:
6
- metadata.gz: 8aadb4954b99be1d65d60e650e34f6f6475dd8c144e582a548d67e16d69c2b251ff65a2435e15e15e1007f50dc6fab168f50d0a42f7ac6851bba964fa7e874cf
7
- data.tar.gz: 7627e7ca87a7150954875bc046a22a61f8cdd278b9efd615abbcb46d5b156e42d9b9e603b4773c2deae4f8b7dd32336004113702031872cbfcbefa1a10fe11e4
6
+ metadata.gz: 2420cb4092f937c7427f10e0c674b131a81cb5ea0ad33f68376493d67e6ef40129b0273adac416ec2b65fd31d15230a9887bd52e9c8b01b9c326eb05a3999e4d
7
+ data.tar.gz: 96fa150775802c742301a7242b2146024c616215a696b62dd2f6094d1451f2b8e9b72bd816f4a520ce9f1e6d239edb8336ababe1b995c3e92db9787071a627f2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
1
  ## 0.1.2
2
2
 
3
3
  - Add ability to set `service_name` and `service_version`
4
+
5
+ ## 0.1.4
6
+
7
+ - Tune settings of opentelemetry SDK to reduce memory usage.
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.3)
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)
@@ -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.3'.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
@@ -30,8 +30,15 @@ module Highlight
30
30
 
31
31
  OpenTelemetry::SDK.configure do |c|
32
32
  c.add_span_processor(OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
33
- OpenTelemetry::Exporter::OTLP::Exporter.new(endpoint: "#{@otlp_endpoint}/v1/traces")
33
+ OpenTelemetry::Exporter::OTLP::Exporter.new(
34
+ endpoint: "#{@otlp_endpoint}/v1/traces", compression: 'gzip'
35
+ ), schedule_delay: 1000, max_export_batch_size: 128, max_queue_size: 1024
34
36
  ))
37
+
38
+ c.resource = OpenTelemetry::SDK::Resources::Resource.create(
39
+ OpenTelemetry::SemanticConventions::Resource::DEPLOYMENT_ENVIRONMENT => environment
40
+ )
41
+
35
42
  yield c if block_given?
36
43
  end
37
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.3
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-08-23 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