Hannes Benson
03/12/2024, 7:50 PMopentelemetry-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?Srikanth Chekuri
03/13/2024, 2:19 AM--prefer-delta=true
for query-service or just upgrade to the latest version which does it automatically.Hannes Benson
03/13/2024, 2:34 AMSrikanth Chekuri
03/13/2024, 2:35 AMHannes Benson
03/13/2024, 2:36 AMHannes Benson
03/13/2024, 6:27 AMhist_quantile_50
?
The actual values are:
78, 138, 84, 40, 176, 166, 0, 168, 150, 173, 7, 186
They are sent 60 seconds apart (testing atm)Srikanth Chekuri
03/13/2024, 4:58 PMHannes Benson
03/13/2024, 6:10 PMSrikanth Chekuri
03/13/2024, 6:23 PMHannes Benson
03/13/2024, 6:24 PMSrikanth Chekuri
03/13/2024, 6:27 PMSrikanth Chekuri
03/13/2024, 6:27 PMHannes Benson
03/13/2024, 6:34 PMSrikanth Chekuri
03/14/2024, 3:29 AMHannes Benson
03/14/2024, 5:00 AM