open-telemetry / open-telemetry/opentelemetry-ruby

OTLP::Exporter#encode - bignum too big to convert into `unsigned long long'

Open
#1,771 18 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug keep
Dominant language
Ruby
Stars
606
Forks
301
Avg merge
3d 19h
Merged PRs (30d)
42

Description

Hi Team,

We are using Ruby 3.2.5 and Rails 7.1.3.3

We have installed below opentelemetry gems
Gemfile

gem "opentelemetry-sdk"
gem "opentelemetry-exporter-otlp"
gem "opentelemetry-instrumentation-all"

and done the sdk configuration in opentelemetry.rb

require 'opentelemetry/sdk'
require 'opentelemetry/instrumentation/all'
require 'opentelemetry-exporter-otlp'

OpenTelemetry::SDK.configure do |c|
  c.service_name = <service_name>
  c.use_all()
  c.add_span_processor(
    OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
      OpenTelemetry::Exporter::OTLP::Exporter.new
    )
  )
end
MyAppTracer = OpenTelemetry.tracer_provider.tracer(<tracer>)

We have also configured below environment variables

- name: OTEL_EXPORTER
  value: 'otlp'
- name: JAEGER_DISABLED
  value: 'true'
- name: JAEGER_SERVICE_NAME
  value: <service_name>
- name: JAEGER_AGENT_HOST
  valueFrom:
    fieldRef:
      apiVersion: v1
      fieldPath: status.hostIP
- name: OTEL_EXPORTER_OTLP_ENDPOINT
  value: http://$(JAEGER_AGENT_HOST):4318
- name: OTEL_SERVICE_NAME
  value: <service_name>

But we are seeing below errors in pre-prod environment

ERROR -- : OpenTelemetry error: Unable to export 485 spans
ERROR -- : OpenTelemetry error: unexpected error in OTLP::Exporter#encode - bignum too big to convert into `unsigned long long' - /home/circleci/.rubygems/gems/opentelemetry-exporter-otlp-0.29.0/lib/opentelemetry/exporter/otlp/exporter.rb:327:in `initialize'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the export failure with Ruby 3.2.5, Rails 7.1.3.3, opentelemetry-exporter-otlp 0.29.0, and the shown configuration. Inspect lib/opentelemetry/exporter/otlp/exporter.rb around line 327 and trace the value being converted during OTLP encoding. Done means the reported span batch exports without the bignum conversion error and coverage verifies the case.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.