Skip to content

Commit

Permalink
[backend] fix missing activ users count in telemetry exports (#7211)
Browse files Browse the repository at this point in the history
  • Loading branch information
Archidoit authored Jun 6, 2024
1 parent bfc5f7b commit cfb12e8
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export class TelemetryMeterManager {
registerGauge(name: string, description: string, observer: string, opts: { unit?: string, valueType?: ValueType } = {}) {
const meter = this.meterProvider.getMeter(TELEMETRY_SERVICE_NAME);
const gaugeOptions = { description, unit: opts.unit ?? 'count', valueType: opts.valueType ?? ValueType.INT };
const activUsersCountGauge = meter.createObservableGauge(`opencti_${name}`, gaugeOptions,);
activUsersCountGauge.addCallback((observableResult: ObservableResult) => {
const activeUsersCountGauge = meter.createObservableGauge(`opencti_${name}`, gaugeOptions,);
activeUsersCountGauge.addCallback((observableResult: ObservableResult) => {
/* eslint-disable @typescript-eslint/ban-ts-comment */
// @ts-ignore
observableResult.observe(this[observer]);
Expand All @@ -65,7 +65,7 @@ export class TelemetryMeterManager {
// This kind of gauge count be synchronous, waiting for opentelemetry-js 3668
// https://github.com/open-telemetry/opentelemetry-js/issues/3668
this.registerGauge('total_users_count', 'number of users', 'usersCount');
this.registerGauge('active_users_count', 'number of active users', 'activUsersCount');
this.registerGauge('active_users_count', 'number of active users', 'activeUsersCount');
this.registerGauge('total_instances_count', 'cluster number of instances', 'instancesCount');
this.registerGauge('active_connectors_count', 'number of active connectors', 'activeConnectorsCount');
this.registerGauge('is_enterprise_edition', 'enterprise Edition is activated', 'isEEActivated', { unit: 'boolean' });
Expand Down

0 comments on commit cfb12e8

Please sign in to comment.