I've made some progress, but I haven't been able to resolve all the issues yet. Using the latest
opentelemetry-ruby
code I can use the following to get metrics into clickhouse (using the otel collector)
otlp_metric_exporter = OpenTelemetry::Exporter::OTLP::MetricsExporter.new
OpenTelemetry.meter_provider.add_metric_reader(otlp_metric_exporter)
meter = OpenTelemetry.meter_provider.meter("test-rails")
counter = meter.create_counter("active_sessions_9", description: "Active Sessions", unit: "1")
counter.add(SecureRandom.random_number(10))
OpenTelemetry.meter_provider.metric_readers.each(&:pull)
I also have the node example app running and recording metrics with that. When I look at the data in clickhouse:
select * from signoz_metrics.time_series_v2 tsv where tsv.metric_name in ('requests_count', 'active_sessions_9');
I see the following for the node app:
{
"__name__": "requests_count",
"__temporality__": "Cumulative",
"service_name": "unknown_service:node",
"telemetry_sdk_language": "nodejs",
"telemetry_sdk_name": "opentelemetry",
"telemetry_sdk_version": "1.0.1"
}
And the following for the ruby code:
{
"__name__": "active_sessions_9",
"__temporality__": "Delta",
"process_command": "bin/rails",
"process_pid": "1477990",
"process_runtime_description": "ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]",
"process_runtime_name": "ruby",
"process_runtime_version": "3.2.2",
"service_name": "test-rails",
"telemetry_sdk_language": "ruby",
"telemetry_sdk_name": "opentelemetry",
"telemetry_sdk_version": "1.4.0"
}
I can also see the key
active_sessions_9
in the query builder when adding a graph. However I always end up with no data. Is there a simple fix for this? or does this come down to the temporality? or am I looking in the wrong place?